guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/6] gnu: Add grub-efi.


From: Ludovic Courtès
Subject: Re: [PATCH 6/6] gnu: Add grub-efi.
Date: Mon, 19 Dec 2016 11:48:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Marius,

Marius Bakke <address@hidden> skribis:

> Ludovic Courtès <address@hidden> 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?

If that’s fine with you, please go ahead.

Apologies for the misguided suggestion!

>> The remaining issue is how to run fsck for vfat.
>>
>> Currently I still have a preference for something like what I suggested
>> at:
>>
>>   https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00095.html
>>
>> Thoughts?
>
> This approach looks better than the one I started working on. It's not
> clear to me how to pass the device to these procedures, or how
> 'check-file-system' will know which checker to use. We should try to
> have this in place before 0.13 :-)

I’ll see if I can work on it if nobody beats me at it!

Thank you!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]