Ludovic Courtès writes: > Marius Bakke skribis: > >> Ludovic Courtès writes: >> >>> Hi Marius, >>> >>> Marius Bakke skribis: >>> >>>> Ludovic Courtès writes: >>>> >>>>>> Relatedly, I think the way to build a 'multi-grub' is to have one >>>>>> expression for each supported grub platform, and then consolidate >>>>>> out/lib/grub from each. >>>>> >>>>> So in essence, GRUB itself supports only one platform at a time? >>>> >>>> AFAICT yes. Gentoo works around this by running the build for each >>>> user-specified platform and combining the outputs. Most other distros >>>> just carry separate grub-pc and grub-efi packages. >>>> >>>>>>> Now there are things I didn’t quite get. Apparently you’re supposed to >>>>>>> have a /boot/efi as a vfat partition, and ‘grub-install’ is supposed to >>>>>>> detect it and install the EFI stuff, or so I thought (info "(grub) >>>>>>> Installing GRUB using grub-install"). >>>>>>> >>>>>>> However, ‘grub-install’ still seems to be installing for “i386-pc” >>>>>>> instead of EFI. >>>>>>> >>>>>>> What am I missing? >>>>>> >>>>>> IIRC grub-install will detect and install for the running mode (pc, efi, >>>>>> etc). So in a classic chicken-and-egg situation, you need to be booted >>>>>> with UEFI mode for grub to select the correct installation platform! >>>>> >>>>> My understanding is that it would install for UEFI if it fines >>>>> /boot/efi or if --efi-directory is passed. >>>> >>>> I'm not so sure, but it's been a while since I played around with this. >>>> At least building the 'gnu/system/install.scm' image works fine when >>>> passing --efi-directory (see the bottom two patches from >>>> https://lists.gnu.org/archive/html/guix-devel/2016-12/txtchTym4QVKr.txt ), >>>> and I think it would choose i386-pc even if x86_64-efi was available >>>> since the VM boots in BIOS mode. >>>> >>>> Tangentially, I'm not aware of any way to build a "hybrid" ISO image >>>> using only grub. I've started work on packaging syslinux/isolinux which >>>> is what Debian uses for their hybrid UEFI/BIOS install image. >>> >>> OK. >>> >>> Having checked GRUB’s configure.ac etc., I realize that my suggestion of >>> having one ‘grub’ package doing both EFI and “PC” cannot work. What you >>> suggested initially (a separate ‘grub-efi’ package) is the only thing we >>> can do (we could perhaps merge the lib/grub directories as you >>> suggested, but it’s not even clear that this would work.) >>> >>> Thus, I think we need to revert 3eee16130d858ae96510ec1c7d38d31290de2699 >>> and install your initial ‘grub-efi’ patch. How does that sound? >> >> OK. I'll try to find out why tests don't work with the UEFI variant >> first in order to at least write a meaningful comment. Maybe qemu needs >> UEFI support or something like that. > > It might be that we no longer need QEMU 1.3.1 to run the tests (see the > top of gnu/packages/grub.scm)? The problem is missing UEFI firmware for the qemu calls. But we indeed no longer need qemu@1.3.1 for the tests, at least on x86_64. I replaced it with 'qemu-minimal'. Pushed!