System boot suddenly goes to grub shell

I’ve got an Acer TravelMate P236-M
It is probably one of those laptops with a buggy firmware BIOS/UEFI or the like. In addition it doesn’t provide many options.

Indeed, if in the BIOS/UEFI I set UEFI as boot mode, I’m able to boot from the USB stick and to install Fedora, but upon restart, it doesn’t recognize any hard disk from where to boot: it is possible to boot only from the USB stick.

If I select Legacy mode, it looks like Fedora still detect it as UEFI: from the Live sessionefibootmgr still works, and Anaconda automatic partition creates a GPT partiton table and an EFI partition.
Interestingly, once installed Fedora, in this case it detects an hard disk from where to boot, and it actually boots, but… the GRUB shell immediately appears.

In the GRUB menu, editing the Fedora entry, it looks like in these two lines

linux $(root)/vmlinuz-6.8.xxxxxxxxx
initrd $(root)/initramfs-6.8.xxxxxxxxx

the $root variable doesn’t contain a proper value.
Indeed if I modify these lines replacing $root with (hd0,gpt2) Fedora successfully boots!

So. The buggy firmware is not an issue as far as I am able to boot the system (Legacy or UEFI I don’t care), but there is something in the grub configuration that doesn’t correctly detect the boot partition.

Interestingly, if in /boot/grub2/grub.cfg I comment the if condition

### BEGIN /etc/grub.d/10_linux ###
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
#if [ x$feature_platform_search_hint = xy ]; then
#  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  459d1392-2845-4629-b1d4-9431676d2443
#else
#  search --no-floppy --fs-uuid --set=root 459d1392-2845-4629-b1d4-9431676d2443
#fi 

Fedora successfully starts without editing the grub entry at each boot.

Did you check if the uuid 459d1392-2845-4629-b1d4-9431676d2443 matches the uuid of the /boot file system? Run lsblk -fp to get that uuid value.

1 Like

Yes. It matches the uuid of the boot filesystem.
As a side note, I’ve reinstalled the system various times. Wiping all the partitions and using automatic partitioning.

Another note. When the system boot, there is a continuous flashing between Plymouth spinner and tty boot messages. In this case, the boot process never ends.
I have to edit the grub entry and remove rhgb and quiet options. In this case the system boot successfully and GDM greeter appears.

If I add GRUB_DISABLE_UUID=true to /etc/sysconfig/grub and recreate the grub config with grub2-mkconfig -o /boot/grub2/grub.cfg, then such lines

if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  459d1392-2845-4629-b1d4-9431676d2443
else
  search --no-floppy --fs-uuid --set=root 459d1392-2845-4629-b1d4-9431676d2443
fi 

aren’t created anymore.
And the system boot normally as noted when I commented these lines by hand.

Interesting and mysterious, I reinstalled Fedora again, just to replicate the issue and the steps to solve it… and now I haven’t faced any problem, neither the flashing Plymouth boot screen, neither the needings to modify the grub config.
:man_shrugging:

I’ve had 5 Acer computers with InsydeH2O UEFI firmware, and all of them needed me to go into BIOS settings and manually add the shim (Fedora) or grubx64 (other distros) EFI to a custom boot entry. I figured it was some issue with efibootmgr and InsydeH2O or certain versions of it.

With Fedora, some Acer’s used the grubx64 EFI which (iirc) caused Fedora to try to re-create a new entry for the shim on every next boot, but I’m not sure if this ever led to an issue.