Help me! I need to manually enter "configfile" command in grub prompt on boot

Hi,

I did a reset of my settings in UEFI. That caused GRUB to not start anymore when I start my computer. Instead, I was booted into Windows.

I did create a new EFI entry using efibootmgr, so now I have this entry:

Boot0001* Fedora	HD(1,GPT,142c0c49-7658-4e53-8f78-0ec521eddf6f,0x800,0x82000)/File(\EFI\fedora\shimx64.efi)

Now when I boot, I’m put into a grub prompt, where I need to enter this to boot:

> configfile (hd0,gpt5)/grub2/grub.cfg

How do I config this to be done automatically?

It’s Fedora 34 that I have installed, with Btrfs, on an NVMe drive.

The partitions that I have are:

/dev/nvme0n1p1      2048     534527    532480   260M EFI System
/dev/nvme0n1p2    534528     567295     32768    16M Microsoft reserved
/dev/nvme0n1p3    567296  439832575 439265280 209.5G Microsoft basic data
/dev/nvme0n1p4 998166528 1000214527   2048000  1000M Windows recovery environment
/dev/nvme0n1p5 439832576  441929727   2097152     1G Linux filesystem
/dev/nvme0n1p6 441929728  998166527 556236800 265.2G Linux filesystem

On partition #1 I have the /boot/efi directory, on partition #5 the /boot directory, and on #6 the root directory.

Please help!

Happy Birthday to you!

You can try reinstall grub bootloader to fix that:
https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader/#sec-Reinstalling_GRUB_2

Thanks daddy, I got it sorted out now. It seems like I already had this in efibootmgr:

Boot0002* Linux-Firmware-Updater	HD(1,GPT,142c0c49-7658-4e53-8f78-0ec521eddf6f,0x800,0x82000)/File(\EFI\fedora\shimx64.efi)\.f.w.u.p.d.x.6.4...e.f.i...

However, it wasn’t first in the boot order. So I moved it to being the first item.

But from your page this command seemed useful:

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

I have fiddled around quite a lot, and in the end I’m not really sure what exactly it was that solved it.

Thanks!

2 Likes