GRUB Fails to boot Fedora, boots Windows instead

Hi folks,

First time poster here. I’ve been using Fedora successfully for the past year and a half with no issues. Recently came across a bit of an odd one, I think Windows stomped on my EFI but I still consider myself a novice so hoping to get more eyes on this.

I have Windows 11 (insiders) and Fedora on the same machine but different disks, Fedora is installed on the same disk as the /boot/EFI. Recently when trying to boot any of the Fedora kernels from GRUB I will get: a flash, a reset of USB power (could be normal), then after a few seconds Windows boots up. Pressing ESC during the boot does not show any console logging, it seems to not be attempting to boot Fedora at all.

I thought it was GRUB at first so I followed the instructions here: GRUB 2 - Fedora Project Wiki to reinstall GRUB and then re-create the Grub configs. Unfortunately this didn’t work, and the issue persists.

I’ve made sure to update Fedora to latest using sudo dnf upgrade and I’m on the latest kernel, though in my experience I’ve tried booting various known-working kernels and I have the same issue; hence my belief that a Windows update has done something strange.

My current workaround to boot into Fedora is to choose the Fedora 34 Rescue boot option, wait to watch this fail (Fail to mount boot.cfg), then reboot my machine, all of a sudden I can boot latest kernel no issue. However, every time I power off my machine I need to do this step again.

Lastly, when I hit ESC and Fedora is loading (on a successful boot) I see an error to load nvidia-powerd.service, so I re-installed nvidia drivers from rpmfusion, however I still get it; and after looking it up I don’t think this is affecting my boot problems.

I’m unsure where to go from here, perhaps the MBR/EFI partition is corrupted or something, but I have no idea what to check. Thanks for any help :slight_smile:

Machine Information:
OS Information: Windows 11 Insider, Fedora 37
lsblk:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0   128M  0 part 
└─sda2   8:2    0 232.8G  0 part /media/gamedisk
sdb      8:16   0 465.8G  0 disk 
├─sdb1   8:17   0   300M  0 part 
├─sdb2   8:18   0   100M  0 part 
├─sdb3   8:19   0   128M  0 part 
├─sdb4   8:20   0 464.7G  0 part 
└─sdb5   8:21   0   533M  0 part 
sdc      8:32   0 119.2G  0 disk 
├─sdc1   8:33   0   600M  0 part /boot/efi
├─sdc2   8:34   0     1G  0 part /boot
└─sdc3   8:35   0 117.7G  0 part /home
                                 /
zram0  252:0    0     8G  0 disk [SWAP]

/dev/sdb – Windows 11
/dev/sdc – Boot && Fedora 37
/dev/sda – Purely storage

Hardware:
Cpu: intel i7 4790K
Gpu: Nvidia 1080Ti
Memory: 16GB dual channel
Storage: 3 SATA SSDs

Here’s an instruction for restoring the Fedora bootloader:

It covers both Btrfs and LVM setups with extra steps for EFI and LUKS.

1 Like

Thanks Vladislav, I was working through those steps but rather annoyingly I’m beset by this problem: F37 install media don’t boot in UEFI mode on certain motherboards - Ask Fedora (fedoraproject.org). Which means I can’t boot the same firmware type as my install.

I don’t really want to try messing around with modifying the live USB, and it might introduce more errors if I use Fedora 36 live USB to repair a Fedora 37 install. So I’m tempted to backup my /home directory and install Fedora 36 to just reformat my /root and /boot/efi partitions and upgrade back up to 37.

1 Like

Actually, this is not a problem, you can as well use a Fedora 36 live session since the repair instructions should run in a chroot, so the version of the live system is irrelevant.

Thanks Vladislav,

I went ahead and followed those instructions but with the Fedora 36 live boot and unfortunately it still didn’t fix it.

I think Windows might have been loading because in the UEFI boot priority it sits underneath Fedora, so I’m guessing that if the bootloader fails then it rolls over to the next boot item which just happens to be Windows.

Not sure what this points to, maybe a recent grub update broke it specifically for my system? I’m really not sure

1 Like

On a Live image, type sudo efibootmgr and it will print out your EFI boot menus and the boot order. Paste it here.

Also, if you can actually get into the Fedora GRUB menu, you can hit e on the selected Fedora kernel, and then remove rhgb quiet from the kernel line and boot with ctrl+x. You should then see detailed boot info. Unfortunately nvidia binary drivers often cause issues with displaying that output, so you might just see a black screen instead.

1 Like

Thanks for the help Kamil,

Result of efibootmgr

BootCurrent: 0009
Timeout: 1 seconds
BootOrder: 0001,0000,0007,0009,0003,0005,0008
Boot0000* Windows Boot Manager
Boot0001* Fedora
Boot0003* UEFI: Built-in EFI Shell 
Boot0005  Hard Drive 
Boot0007* UEFI OS
Boot0008  Unknown Device 
Boot0009* UEFI: (FAT) General USB Flash Disk 1.00

When I edit the grub file and remove rhgb quiet I can see the booting command list briefly then it flashes and Windows starts launching.

Quick vid of what’s happening:

From Here: efibootmgr(8): change EFI Boot Manager - Linux man page (die.net)

  • Timeout - the time in seconds between when the boot manager appears on the screen until when it automatically chooses the startup value from BootNext or BootOrder.

I just tested changing this to 60 and it seems to have fixed the issue! Kind of. UEFI now waits for me to press any keys e.g. F11 before I see the GRUB menu. I’ll have a play around here.

Edit:
This didn’t fix it really, I select Fedora, it attempts to boot, fails, and then the timeout tries Fedora again and somehow it works on second attempt.