[lfs-support] Grub2 won't boot new UEFI LFS build

jacob jacob at cellsheet.me
Sun Oct 30 15:55:56 PDT 2016


On 2016-10-29 23:48, Wayne Blaszczyk wrote:
> On Sat, 2016-10-29 at 22:44 -0400, jacob wrote:
>> On 2016-10-29 22:04, Wayne Blaszczyk wrote:
>> > On Sat, 2016-10-29 at 15:28 -0400, jacob wrote:
>> > > Hello, I've recently completed an LFS build using GRUB-2.03~beta, and 
>> > > I've installed this using UEFI. When I boot linux however, I'm 
>> > > greeted 
>> > > with a black screen. I'm unsure how to debug this as the kernel 
>> > > doesn't 
>> > > even panic, it just sits.
>> > >
>> > > Here are some configuration files
>> > >
>> > > .config: http://sprunge.us/SMcc
>> > >
>> > > /etc/fstab
>> > >
>> > > # Begin /etc/fstab
>> > >
>> > > # file system  mount-point  type     options             dump  fsck
>> > > #                                                              order
>> > >
>> > > UUID=d6788259-f948-4164-ae29-d1b996ffd6d9     /            ext4    
>> > > defaults            1     1
>> > > UUID=04ED-C3D3     /boot/efi    vfat     defaults            0     1
>> > > efivarfs       /sys/firmware/efi/efivars  efivarfs  defaults  0      1
>> > >
>> > > # End /etc/fstab
>> > >
>> > > /boot/grub/grub.cfg
>> > >
>> > > # Begin /boot/grub/grub.cfg
>> > > set default=0
>> > > set timeout=5
>> > >
>> > > insmod ext2
>> > > set root=(hd0,gpt2)
>> > > insmod efi_gop
>> > > insmod efi_uga
>> > > insmod font
>> > > if loadfont /grub/unicode.pf2; then
>> > >    loadfont /grub/unicode.pf2
>> > >    set gfxmode=auto
>> > >    insmod gfxterm
>> > >    set gfxpayload=keep
>> > >    terminal_output gfxterm
>> > > fi
>> > >
>> > > menuentry "GNU/Linux, Linux From Scratch"  {
>> > >    linux   /boot/vmlinuz-4.7.2-lfs-7.10-systemd 
>> > > root=UUID=d6788259-f948-4164-ae29-d1b996ffd6d9 rw quiet
>> > > }
>> > >
>> >
>> >
>> >  Remove the quiet parameter from the above entry. By doing so, you
>> > might get more details on what is failing.
>> > I'm asumming you are seeing the grub menu, and the blank screen you're
>> > getting is after grub tries to launch the linux kernel.
>> >
>> > Regards,
>> > Wayne.
>> >
>> 
>> 
>> Unfortunately this does not change the behavior :(. I believe I added 
>> this on later in testing just to see what would happen, if anything.
>> 
>> Thanks, Jacob.
>>  
> 
> I still don't understand how you are not getting any output.
> Can you list all the files you have under /boot/efi
> 
> This is what I have:
> /boot/efi/EFI
> /boot/efi/EFI/Boot
> /boot/efi/EFI/Boot/bootx64.efi
> /boot/efi/EFI/LFS
> /boot/efi/EFI/LFS/grubx64.efi
> 
> Also, are you able to remove the font/if part (not sure what that
> does) in your grub.cfg file?
> This is what I have in grub.cfg:
> set default=0
> set timeout=5
> set menu_color_normal=green/black
> set menu_color_highlight=light-green/black
> 
> insmod ext2
> 
> menuentry "GNU/Linux, Linux 4.7.10-lfs-7.10" {
>         set root=(hd0,3)
>         linux   /boot/vmlinuz-4.7.10-lfs-7.10 root=/dev/sda3 
> rootfstype=ext4 ro
> }
> 
> 
> And finaly, how did you execute grub-install?
> This is what I do:
> 
> mkdir -p /boot/efi
> mount /dev/sda1 /boot/efi
> grub-install --modules=part_gpt --bootloader-id=LFS /dev/sda
> cp /boot/efi/EFI/LFS/grubx64.efi /boot/efi/EFI/Boot/bootx64.efi
> 
> and this is my fstab:
> /dev/sda3      /            ext4     defaults            1     1
> /dev/sda2      swap         swap     pri=1               0     0
> /dev/sda1      /boot/efi    vfat     defaults            1     2
> 
> Regards,
> Wayne.


I've changed grub-install to add the --modules flag, so it's now ran as 
grub-install --target=x86_64-efi --efi-directory=/boot/efi 
--bootloader-id=LFS --modules=part_gpt --recheck --debug

Here is my grub.cfg, although it attempted to boot into blind mode 
without loading efi_gop and efi_uga. I believe the grub configuration is 
irrelevant because I can chainload off my arch linux install, and still 
come to the same issue.

# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext2
set root=(hd0,gpt2)
#insmod efi_gop
#insmod efi_uga
insmod font
if loadfont /grub/unicode.pf2; then
   loadfont /grub/unicode.pf2
   set gfxmode=auto
   insmod gfxterm
   set gfxpayload=keep
   terminal_output gfxterm
fi

menuentry "GNU/Linux, Linux From Scratch"  {
   linux   /boot/vmlinuz-4.7.2-lfs-7.10-systemd 
root=UUID=d6788259-f948-4164-ae29-d1b996ffd6d9 rootfstype=ext4 ro
}

I will backup my .config, and attempt to compile with an arch linux 
kernel .config to see if there's any config I'm missing.

Thanks, Jacob.


More information about the lfs-support mailing list