qemu-vm: allow bootloader to set EFI vars

Without this, systemd-boot does not add an EFI boot entry for itself.
The reason it worked before this fix is because it would fall back to
the default installed \EFI\BOOT\BOOTX64.EFI
This commit is contained in:
Daniel Fullmer 2020-06-13 23:22:20 -04:00
parent 146e96d9ba
commit 4d14826825

View File

@ -210,6 +210,10 @@ let
mkdir /boot
mount /dev/vda2 /boot
${optionalString config.boot.loader.efi.canTouchEfiVariables ''
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
''}
# This is needed for GRUB 0.97, which doesn't know about virtio devices.
mkdir /boot/grub
echo '(hd0) /dev/vda' > /boot/grub/device.map