Update my grub to also let me boot Windows 11

I installed Fedora a while back and have been enjoying it. But sometimes i need to use Windows for some games etc. When i installed Fedora i might have done something wrong, because Windows is not listed in the bootloader. My disk drive has the following partitions:

/dev/nvme0n1p1 → EFI System Partition (fat16)
/dev/nvme0n1p2 → Microsoft reserved partition (unknown)
/dev/nvme0n1p3 → Basic Data partition (ntfs) ← The partition containing windows
/dev/nvme0n1p4 → (ntfs) ← I think its some recovery partition for windows
/dev/nvme0n1p5 → My fedora partition (ext4)

Not sure if its usable for helping me with this, but my Grub doesn’t show my Windows partition neither does my BIOS. Also running “sudo os-prober” returns nothing

How can i update grub to list my Windows 11 installation, and let me boot it?

Could you show the output of these commands:

efibootmgr

sudo tree -L 2 /boot/efi/EFI

Thanks for tuning in!

efibootmgr:

BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0001,0002,0000
Boot0000 Ubuntu VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0001* Fedora HD(1,GPT,ad587f8c-5f91-4adc-b7c8-aae9f55655fb,0x800,0x32000)/\EFI\fedora\shimx64.efi
Boot0002 Windows Boot Manager VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d000000653e0100000010000000040000007fff0400

sudo tree -L 2 /boot/efi/EFI:

/boot/efi/EFI
├── BOOT
│ ├── BOOTIA32.EFI
│ ├── BOOTX64.EFI
│ ├── fbia32.efi
│ └── fbx64.efi
└── fedora
├── BOOTIA32.CSV
├── BOOTX64.CSV
├── gcdia32.efi
├── gcdx64.efi
├── grub.cfg
├── grubia32.efi
├── grubx64.efi
├── mmia32.efi
├── mmx64.efi
├── shim.efi
├── shimia32.efi
└── shimx64.efi

OK, there’s no “Microsoft” directory there, so the Windows bootloader has been removed.

The easiest way to restore it is probably using Windows install media - but the easiest way to make that is to do so on a Windows machine. There are alternatives but they are more fiddly.

Do you by any chance have a Windows machine available, or is this your only machine?

I have another WIndows computer available so no problem there :slight_smile:

Cool, so if you create a Windows 11 installation USB, you should be able to boot into that and select “repair this Windows installation” or similar to restore the bootloader.

After that, you should be able to boot into Windows from the BIOS, and os-prober should be able to detect the Windows installation so you can add it to Grub.

There’s some level of risk that Windows affects the Fedora bootloader. This is less of a risk on EFI systems than it used to be on MBR, but it has been known to happen (mostly through bad Windows updates). If that does happen, then it can be fixed from a Fedora live USB. There’s a guide to doing so, but no need to study that in advance - just posting it in case it’s needed for reference.

2 Likes

Thank you so much! I will get working and report back! :smiley: