Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Bizarre Grub bootloader issues

Linux Kernel, Network, and Services configuration.
Message
Author
tane
Posts: 8
Joined: 2023-01-28 18:24

Re: [Solved] Bizarre Grub bootloader issues

#21 Post by tane »

By picking up, I mean the entries in the bios boot order after pressing f2 on boot to enter bios. Both the debian entries are identical but I checked them with easyuefi and one goes to shimx64.efi and the other to grub64.efi.

By set entry, I mean arrange the boot order in bios.

Output of sudo efiboomgr -v

Code: Select all

BootCurrent: 0003
Timeout: 2 seconds
BootOrder: 0003,0000,0002
Boot0000* Windows Boot Manager  HD(1,GPT,d9324c6c-28bb-4996-aa60-904510f83e00,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0002  debian        HD(1,GPT,d9324c6c-28bb-4996-aa60-904510f83e00,0x800,0x32000)/File(\EFI\DEBIAN\SHIMX64.EFI)
Boot0003* debian        HD(1,GPT,d9324c6c-28bb-4996-aa60-904510f83e00,0x800,0x32000)/File(\EFI\DEBIAN\GRUBX64.EFI)..BO
As you can see grub64.efi is first in boot order. This is going to the grub command line, at which point I write exit and it goes to the normal grub boot selection screen.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [Solved] Bizarre Grub bootloader issues

#22 Post by p.H »

In your previous post you wrote that selecting grubx64.efi led to the GRUB menu, now you write that it leads to the command line ?
Looks like Boot002 is disabled (no *). Did you try to enable it and set if first in BootOrder with efibootmgr ?
Anyway sometimes BIOS boot order setting overrides efibootmgr BootOrder...

tane
Posts: 8
Joined: 2023-01-28 18:24

Re: [Solved] Bizarre Grub bootloader issues

#23 Post by tane »

Yes, it is inconsistent. After the that post I started using the exit command to exit the grub shell into the grub menu whereas before I was going back into bios and rearranging the BIOS boot order until I could get to the grub menu. Using the exit command means I don't have to do that anymore. The problem remains though, sometimes it boots straight to the grub menu and sometimes to the grub command line.

Do you think I should backup the partition, delete shimx64.efi, and then reinstall grub without secure boot as you posted before (grub-install --no-uefi-secure-boot)?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [Solved] Bizarre Grub bootloader issues

#24 Post by p.H »

That would be useful only if booting with shimx64.efi always leads to the command line and booting with grubx64.efi always leads to the menu.

tane
Posts: 8
Joined: 2023-01-28 18:24

Re: [Solved] Bizarre Grub bootloader issues

#25 Post by tane »

OK, so I noticed that 0002 (shimx64.efi) was not enabled so I did this,

Code: Select all

user@LC2:~$ sudo efibootmgr -v
[sudo] password for user: 
BootCurrent: 0003
Timeout: 2 seconds
BootOrder: 0003,0000,0002
Boot0000* Windows Boot Manager  HD(1,GPT,d9324c6c-28bb-4996-aa60-904510f83e00,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0002  debian        HD(1,GPT,d9324c6c-28bb-4996-aa60-904510f83e00,0x800,0x32000)/File(\EFI\DEBIAN\SHIMX64.EFI)
Boot0003* debian        HD(1,GPT,d9324c6c-28bb-4996-aa60-904510f83e00,0x800,0x32000)/File(\EFI\DEBIAN\GRUBX64.EFI)..BO
user@LC2:~$ sudo efibootmgr -o 0002,0000,0003
BootCurrent: 0003
Timeout: 2 seconds
BootOrder: 0002,0000,0003
Boot0000* Windows Boot Manager
Boot0002  debian
Boot0003* debian
user@LC2:~$ sudo efibootmgr -b 0002 -a
BootCurrent: 0003
Timeout: 2 seconds
BootOrder: 0002,0000,0003
Boot0000* Windows Boot Manager
Boot0002* debian
Boot0003* debian
user@LC2:~$ 
Which made absolutely no difference. Booted once fine, the next time to the grub editing screen. :) I have checked the BOOT64.CSV file and all appears in order.

Code: Select all

sudo cat /boot/efi/EFI/debian/BOOTX64.CSV
[sudo] password for user: 
shimx64.efi,debian,,This is the boot entry for debian
So to think out loud, it doesn't change anything to boot off SHIMX64.EFI or GRUBX64.EFI. The fallback BOOTX64.CSV specifies SHIMX64.EFI as the boot device so no help there. Would the next fallback location be bootx64.efi in the top level Boot directory?

Code: Select all

sudo tree -l /boot/efi/                  
/boot/efi/
├── EFI
│   ├── Boot
│   │   └── bootx64.efi
│   ├── debian
│   │   ├── BOOTX64.CSV
│   │   ├── fbx64.efi
│   │   ├── grub.cfg
│   │   ├── grubx64.efi
│   │   ├── mmx64.efi
│   │   └── shimx64.efi

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [Solved] Bizarre Grub bootloader issues

#26 Post by p.H »

GRUBX64.EFI is not used by the UEFI firmware, it is only used by fbx64.efi which is only called by shimx64.efi when invoked as /EFI/Boot/bootx64.efi (fallback path) to (re)create EFI boot entries.
I don't think this bootx64.efi was installed by Debian, there would be other files like in /EFI/debian. Maybe Windows. Debian also installs shim and grub in the fallback path if grub-install is run with --force-extra-removable.

tane
Posts: 8
Joined: 2023-01-28 18:24

Re: [Solved] Bizarre Grub bootloader issues

#27 Post by tane »

Off Topic
What's the Linux command for facepalm? PEBCAK?
Fastboot was on...

Post Reply