[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66207: Cannot boot VMs with grub-efi-bootloader
From: |
Maxim Cournoyer |
Subject: |
bug#66207: Cannot boot VMs with grub-efi-bootloader |
Date: |
Sun, 01 Oct 2023 15:51:21 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
[...]
> It’s due to the bootloader. This field from the bare bones template
> works:
>
> (bootloader (bootloader-configuration
> (bootloader grub-bootloader)
> (targets '("/dev/sdX"))))
>
> but this from the desktop template doesn’t:
>
> (bootloader (bootloader-configuration
> (bootloader grub-efi-bootloader)
> (targets '("/boot/efi"))))
>
> The manual for “guix system” gives a somewhat complicated invocation
> that I only found out about later:
>
> image=$(guix system image --image-type=qcow2 \
> gnu/system/examples/lightweight-desktop.tmpl)
> cp $image /tmp/my-image.qcow2
> chmod +w /tmp/my-image.qcow2
> qemu-system-x86_64 -enable-kvm -hda /tmp/my-image.qcow2 -m 1000 \
> -bios $(guix build
> ovmf)/share/firmware/ovmf_x64.bin
Ah, I remember tripping on this. GNOME Boxes can be built with ovmf
support and be able to boot with either a BIOS or UEFI bootloader but
bare QEMU cannot do so (and upstream appeared keen on keeping QEMU dumb
and keep the nicer abstractions for virtual-manager or GNOME Boxes
(maybe that's handled by libvirtd, I don't know).
> I haven’t tried it yet, but I assume that providing this extra “-bios”
> option would fix it. It wasn’t necessary before, though, and I think
> it’s an inconvenient complication when running Guix VMs.
>
> Perhaps an example invocation of qemu-system-* could be added as a
> comment to the templates?
Or a simple nudge to the reference in the info manual? This would avoid
duplicating the information (easing maintenance). I think there's a way
to format it so that it opens directly as a URL in Emacs at least,
though I don't know the details.
--
Thanks,
Maxim