Cannot boot into Fedora. Windows boots directly

Hi, folks.
I feel to be in deep trouble.

I have a laptop with both Windows 11 and Fedora installed in Dual Boot.
At startup the initial menu to choose which operating system was shown.
Today I had to login with Windows to do a task that couldn’t be made in Fedora.
While in Windows it asked to install some updates and I let it do them.
After finishing system restarted and to my scary surprise, Windows logs directly. The initial operating system selection menu doesn’t show up anymore.

Any suggestion?

In the UEFI boot manager, do you have a Fedora entry? If so, can you select that and boot.

Do you know what the UEFI boot menu is?

Once you booted sucessfully into your Fedora install, you can restore grub2 (that is the name of Fedora’s boot loader), following this guide: Working with the GRUB 2 Boot Loader :: Fedora Docs

1.) sudo dnf reinstall grub2-efi* shim* grub2-common
2.) grub2-mkconfig -o /boot/grub2/grub.cfg

1 Like

That is precisely the point, @vekruse @augenauf .
I believe I do know the UEFI boot menu, the one that shows right after turning the computer on, right?
But, that is precisely the point. It doesn’t show up anymore and Windows 11 logs in directly.

What happened?
I’ll try to explain myself a little further.
Yesterday I had to use Windows due a task not available in Fedora.
When in Windows, install of updates to Windows were suggested.
So, I proceeded with them.
To my surprise, when restarting the system, the UEFI boot menu didn’t show up anymore.
Or, if it does, Windows is chosen immediately and so fast you cannot notice it.

Not quite. That menu is the grub menu. The UEFI boot menu is not automatically displayed.

The UEFI menu is the one that appears by pressing a key repeatedly when first applying power. On my desktop that is F12 and on my laptop F10, which then brings up the UEFI boot menu. I also can get the boot menu by opening up the UEFI setup [F1, F2, Del, …] (varies by system & mfgr) and then I see an option to select the UEFI boot menu.

In your UEFI Firmware Settings make sure that Fast Boot is disabled. Maybe windows update somehow changed that setting. In order to bring the UEFI menu press F1 through F12 until you find the key that opens the UEFI settings (during the start-up when your computers logo appears) . Or you can also bring that by following some steps in Windows.

See this post:

I am coming out of the panic feeling.
Found an explanation here though the instructions are for Ubuntu.
However, I also found Windows changed the boot order in BIOS.
I put Fedora first but Windows logs 1st still.
Will watch your link.

My bad. You’re right. As I had some machines that lasted for more then 12 years, they still used BIOS.

OK, yes. I get the UEFI menu with F2.
And, yes, Windows had changed the boot order to Windows 1st.
I moved Windows last but after restarting, Windows still boots 1st.
The grub menu is not shown.

This page shows some instructions from the Windows command but they are shown to apply for Ubuntu.

This page details what happened to my system and shows a way to repair it.
However it requires that tool to be installed.

Any other suggested method?

Don’t rely on the boot sequence (which is what you describe). Instead use the UEFI boot menu to select the fedora install to boot from.

I also have to ask.
Was the windows update a simple update? or was it an upgrade from 10 to 11?

It is possible the windows update may have altered the efi partition and totally removed the fedora grub from that. It is also possible that windows altered the efibootmgr and deleted the fedora options from that. We really need to know the circumstances that caused this.

This thread was about recovery with a windows reinstall after the system was already dual booting properly.
https://discussion.fedoraproject.org/t/fedora-dissappeared-on-boot-after-windows-reinstall/76440/173

Let’s see, @computersavvy .
The machine came with Windows 10 preinstalled. I installed Fedora in Dual Boot.
After some time the chance to update to Windows 11 came in and I upgraded. Everything was working fine with the Dual Boot.
The update of yesterday might not have been mayor.

Now, I am trying to find out what is left in my disks.
I have a
500 GB NVMe with 118 GB destinded to Windows system
1 TB SSD with 128 GB destined to Windows data.
According to the disk administrators, partitions seem not to have been touched.

But up to my knowledge and as Windows loads without asking, I am not able to see the disks. And I don’t remember where is the USB with the Fedora install.

This video shows how to edit the boot manager (bootmgr) from the Windows command as administrator using the following instruction:
C:\WINDOWS\system32>bcdedit /set {bootmgr} path \efi\ubuntu\boot\grubx64.efi
Sure it is for Ubuntu, I cannot see what the path is in Fedora.

1 Like

For Fedora it is \EFI\FEDORA\SHIMX64.EFI

1 Like

The entire command would be bcdedit /set {bootmgr} path \EFI\FEDORA\SHIMX64.EFI

Hey guys, @computersavvy, @augenauf, @vekruse, @eve7,
we made it!

There is just one message showing up before the grub menu. It says

Then the grub menu shows up, Fedora or Windows can be chosen and everything runs smoothly.
Any comment?

Try a few things to clean up the errors. They may be overkill but the end result should be good.

  1. sudo dnf reinstall grub2-common grub2-efi* shim*
  2. sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  3. sudo efibootmgr -c
  4. efibootmgr and look at the current boot device and verify that that one (fedora) is the default and set to be the next one booted. If not then use the options of efibootmgr (can be seen with efibootmgr --help) to make sure that fedora grub is the default so it will always be the boot choice when powering on. As long as fedora grub is the default and you can select to boot windows from there you need nothing else to control booting.

There was recently a user who had ~20 different choices in the list from efibootmgr, and most were from previously installed but removed OSes and needed cleaned up. Keeping the list in efibootmgr clean makes it easy to manage.

sudo dnf reinstall grub2-common grub2-efi* shim*
61787de7e4669380d6b320f19d3b3c07ff496336.png

sudo grub2-mkconfig -o /boot/grub2/grub.cfg
0b6992363a4aa3d4605ad48dec070c0efc860b43.png

efibootmgr
8ac620f1b4600cea21b2cbb4c005f7647d159226.png

Same error message at the beginning.
Let’s close this thread and review that in another topic.

I had a similar issue. My windows boot manager was setup to point to \EFI\fedora\shimx64.efi.

I created a new entry straight to Fedora and the issue is now gone.

Command is:

efibootmgr --create --disk=/dev/nvme0n1 --part=1 --label="Fedora" --loader='\EFI\fedora\shimx64.efi'

You can determine where your efi partition is using lsblk.