Skip to content

Commit

Permalink
make-disk-image: fix broken EFI image builds
Browse files Browse the repository at this point in the history
Work around missing /dev files inside runInLinuxVM by creating a
symlink before calling nixos-enter.

This fixes #93381.
I ran into this issue when trying to create a VMware image that boots from EFI.

Thanks @colemickens for reporting this and @danielfullmer for fixing the same thing in in qemu-vm.nix (37676e7) and explaining what the issue was.
  • Loading branch information
mschwaig committed Apr 25, 2021
1 parent 00fe267 commit f20ae95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nixos/lib/make-disk-image.nix
Expand Up @@ -283,6 +283,9 @@ in pkgs.vmTools.runInLinuxVM (
# Some tools assume these exist
ln -s vda /dev/xvda
ln -s vda /dev/sda
# make systemd-boot find ESP without udev
mkdir /dev/block
ln -s /dev/vda1 /dev/block/254:1
mountPoint=/mnt
mkdir $mountPoint
Expand Down

0 comments on commit f20ae95

Please sign in to comment.