[lfs-dev] grub-2.02~beta2

Dan McGhee beesnees at grm.net
Mon Sep 29 15:50:04 PDT 2014

On 09/29/2014 05:45 PM, Bruce Dubbs wrote:
> Dan McGhee wrote:
>> On 09/29/2014 02:45 PM, Bruce Dubbs wrote:
>>> Dan McGhee wrote:
>>>> I was able to achieve my "grub and uefi" goals using this package.
>>>> Apparently, it is the result of some serious EFI work by the grub
>>>> developers.
>>> Dan, I'm looking at upgrading LFS to grub-2.02~beta2. What options do
>>> you use? Right now we have:
>>> ./configure --prefix=/usr \
>>> --sbindir=/sbin \
>>> --sysconfdir=/etc \
>>> --disable-grub-emu-usb \
>>> --disable-efiemu \
>>> --disable-werror
>>> We still can't drop the --disable-werror. I get the error:
>>> #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
>>> _DEFAULT_SOURCE" [-Werror=cpp]
>>> I do know that this was fixed upstream. We could either leave in
>>> --disable-werror or sed -i s/BSD/DEFAULT/ grub-core/kern/emu/hostfs.c
>>> What I'm not sure about is the --disable-efiemu switch. Did you need
>>> to enable efiemu?
>> No I didn't need them. And I think I remember reading in the configure
>> log that with either --target=x86_64 or --with-platform efi, or both,
>> efiemu is not available.
>> Here the options I used:
>>> --prefix=/usr \
>>> --sbindir=/sbin \
>>> --sysconfdir=/etc \
>>> --disable-grub-emu-usb \
>>> --disable-efiemu \
>>> --enable-grub-mkfont \
>>> --enable-device-mapper \
>>> --with-platform=efi \
>>> --target=x86_64 \ [this one and the next one are required for x86_64
>>> and efi
>>> --program-prefix="" \ [really convenient. If not used grub-install
>>> becomes x86_64-grub install]
>>> --with-bootdir="/boot" \
>>> --with-grubdir="grub" \
>>> --disable-werror
>> I didn't do much experimenting and the group of these is probably
>> overkill. I don't know anything about emu's and probably didn't need the
>> usb one. I used mkfont just in case. It depends on freetype2.
>> What I did learn is that grub won't run in efi if a "suitable graphic"
>> environment is not found. It depends on having unicode.pf2 available in
>> /usr/share/grub. I didn't try to build this font with grub but stole it
>> from my Ubuntu system.
>> With this in mind, the graphic environment, you will discover that
>> creating grub.cfg isn't quite as straightforward as it has been. When
>> you're ready, I'll be more than happy to post my grub.cfg.
> We'll take this a step at a time. First upgrade the package with 
> current instructions that expect uefi to be missing or disabled. Then 
> we can do a hint for uefi. Finally, hopefully before the next release 
> next March incorporate it in the book.

Good plan. I'll start working on the hint. Is there a template? Location?


More information about the lfs-dev mailing list