Windows Not in GRUB After Fedora Re-Install

Hi,

I had to re-install Fedora a while back when 42 towards the end was having a lot of issues. So I did a fresh install of 43. Since then, I haven’t been able to dual boot as first there was no GRUB menu (just booted straight into Fedora). Even when I did get GRUB working and re-built, still no entry for Windows.

What I’ve done so far, re-installed Fedora again (thought I might have done something wrong initially when I installed it the first time). Still didn’t find Windows..

To get GRUB working, I used a few other posts:

Deleted /boot/efi/EFI/fedora/grub.cfg and /boot/grub2/grub.cfg and then ran
sudo dnf reinstall grub2-efi* grub2-common

Even then, GRUB wouldn’t appear for some reason until I pressed the BIOS key (F2 for my PC), then it showed up (instead of going to the BIOS?) - still only with the last 3 Kernels and no Windows entry. Good start.

I’ve tried previously to get it working (can’t remember exactly but used suggestions from other posts on rebuilding GRUB.

The output of lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
└─sda1 ntfs 7D365FA21B493918 1.3T 30% /run/media/schmidtp/
7D365FA21B493918
zram0 swap 1 zram0 045d7945-7fd5-450b-9457-dc922de713ce [SWAP]
nvme0n1
├─nvme0n1p1 vfat FAT32 581A-AB61 579.5M 3% /boot/efi
├─nvme0n1p2
├─nvme0n1p3 ntfs Windows 282ABD3D2ABD0938
├─nvme0n1p4 ext4 1.0 caaeea4c-8028-44b0-9e48-4c11e946e1a9 1.3G 24% /boot
├─nvme0n1p5 ntfs Files (MSI) 48D641D1D641BFC4 14.7G 99% /home/schmidtp/Mount
/Files-Local
├─nvme0n1p6 ntfs Win Recovery 1AF8C4ABF8C4868B
└─nvme0n1p7 btrfs Ultramarine 0dc43982-c800-4941-9e31-6d9db351eff7 61.5G 60% /home
/

The output from efibootmgr
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0006
Boot0000* Fedora HD(1,GPT,10dba0f3-d8cc-41e9-ab53-9cc9792d514c,0xea9b000,0x12c000)/\EFI\Fedora\grubx64.
efi
Boot0006* Ultramarine Linux HD(1,GPT,10dba0f3-d8cc-41e9-ab53-9cc9792d514c,0xea9b000,0x12c000)/\EFI\fedora\
shimx64.efi

Windows is still definitely there on Partition 3 and there’s also an EFI on Partition 1

But if I edit

nano /etc/default/grub

Its contents

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

Where there’s a timeout of 5sec, but in the output from efibootmgr there’s 0 sec. Which probably means some symbolic links aren’t pointing to the same files? Still doesn’t explain why there’s no Windows entry GRUB at all.

Any help would be appreciated.

Windows may not be identified if it uses BitLocker and therefore it won’t be included in the grub menu. Try run sudo os-prober to see if that is the case. Anyway, it is usually still possible to select winddows from the UEFI boot menu and boot it that way.

It looks like you’re trying to triple-boot Fedora, Ultramarine and Windows out of the same EFI partition?

This is likely to be problematic, not because of Windows, but because different Fedora variants (including Ultramarine, Bazzite etc) will fight over the same /EFI/Fedora directory.

Those are two different timeouts. The efibootmgr timeout tells you how long the BIOS gives you to press F11 (or whatever) to bring up the boot menu before the default bootloader (GRUB, Windows Boot Manager etc) starts. The GRUB timeout tells you how long you have within GRUB before it boots its default entry.

Not related to the different timeouts, but this is worth checking. What does sudo cat /boot/efi/EFI/Fedora/grub.cfg show? It should contain the UUID of one of the partitions you see in your lsblk -f. Is it the Fedora partition, or the Ultramarine partition?

It should contain the UUID for the fedora /boot partition

Indeed. But either way, both those EFI boot entries (“Fedora” and “Ultramarine”) are going to boot to the same GRUB config, because there’s only one /EFI/Fedora/grub.cfg and it can only reference one of the boot partitions.

@schmidtp
Please show us the output of sudo ls -lR /boot/efi/EFI

It should show both a fedora and a Microsoft directory located there. If the Microsoft directory does not exist then it would appear that it may have been erased during the fedora reinstall. If so then you may need to do a windows recovery process.

correct, and this is a difficulty with booting different fedora variants (fedora & ultramarine) from a single efi partition. To enable grub to triple boot as the OP desires he would need to reinstall ultramarine with a new efi partition that is separate from the one used for fedora.

If you look at the lsblk -f listing, it would be clear that fedora must have overwritten ultramarine or the other way around and the extra UEFI boot entry was just left over from the previous abandoned installation.

Other wise it is correct that dual booting two fedora versions is a bit problematic unless you keep both strictly separate on their own respective physical disk unit.

Not back to the real problem: Why no Windows boot entry in the grub menu???

This output may answer that question.

If the boot loader does not exist then grub cannot configure the menu entry for it.

Thanks everyone for the suggestions.

Unless Windows did it itself? I never have bitlocker enabled on any Windows install. The Windows install was working previously as well (before the re-install of Fedora). And there’s no Windows boot option in BIOS either - only options are the typical “Fedora, USB, CD” etc.

os-prober didn’t return any results. I’ve used sudo nano /etc/default/grub to edit GRUB and added GRUB_DISABLE_OS_PROBER=false, ran sudo grub2-mkconfig -o /boot/grub2/grub.cfg again and rebooted. Still hasn’t picked up the WIndows partition (and everytime I update GRUB, unless I hit F2 when rebooting GRUB menu doesn’t come up)

I installed Fedora 43 first, then ran the Ultramarine script to convert it (from memory, Ultramarine didn’t have a 43 install at the time).

search --no-floppy --root-dev-only --fs-uuid --set=dev caaeea4c-8028-44b0-9e48-4c11e946e1a9 
set prefix=($dev)/grub2 
export $prefix 
configfile $prefix/grub.cfg
/boot/efi/EFI: 
total 8 
drwx------. 2 root root 4096 Jul 22 16:20 BOOT 
drwx------. 2 root root 4096 Jul 22 16:20 fedora 
 
/boot/efi/EFI/BOOT: 
total 1820 
-rwx------. 1 root root 747681 Mar 19  2024 BOOTIA32.EFI 
-rwx------. 1 root root 949424 Mar 19  2024 BOOTX64.EFI 
-rwx------. 1 root root  70360 Mar 19  2024 fbia32.efi 
-rwx------. 1 root root  87816 Mar 19  2024 fbx64.efi 
 
/boot/efi/EFI/fedora: 
total 17908 
-rwx------. 1 root root     112 Mar 19  2024 BOOTIA32.CSV 
-rwx------. 1 root root     110 Mar 19  2024 BOOTX64.CSV 
-rwx------. 1 root root 3026640 Apr  8 10:00 gcdia32.efi 
-rwx------. 1 root root 4046544 Apr  8 10:00 gcdx64.efi 
-rwx------. 1 root root     159 Jul 22 16:17 grub.cfg 
-rwx------. 1 root root 3026640 Apr  8 10:00 grubia32.efi 
-rwx------. 1 root root 4046544 Apr  8 10:00 grubx64.efi 
-rwx------. 1 root root  673992 Mar 19  2024 mmia32.efi 
-rwx------. 1 root root  848080 Mar 19  2024 mmx64.efi 
-rwx------. 1 root root  949424 Mar 19  2024 shim.efi 
-rwx------. 1 root root  747681 Mar 19  2024 shimia32.efi 
-rwx------. 1 root root  949424 Mar 19  2024 shimx64.efi

I don’t think it’s showing any Windows entries there? But I can access the Windows partition nvme0n1p3 with Dolphin and all of the normal Windowsy type files and directories are still there.

Correct. Ultramarine WAS initially installed. The reinstall was Fedora 43 (actually twice, but overwrote the previous Ultramarine 42 with Fedora 43 install and again when I thought the install wasn’t correct). Then ran the Ultramarine conversion script after Fedora 43 install. Each time, no Windows entry was picked up during the install. And I used the “Install alongside another OS” during the Fedora install.

Correct, but then it would not be possible to boot linux either, let alone see the grub boot menu and find out that there is not windows entry. By the way, the OP did run

which is the recommended way to make sure /boot/efi/EFI/fedora/grub.cfg is created correctly.

I don’t either, and I missed that there is no Windows entry in the UEFI boot menu either. This means you need the Windows install USB which can be tricky to create without a working Windows system.

I’ve probably got an old Windows 10 backup USB from another PC install which may work (probably a few years old too if I do have one). And other Windows installs I could make one from if need be.

I’ve also got Windows ISO’s I can make an install boot drive from. Although I’m pretty sure once I try and recover Windows, it’s probably going to mess with the current Linux install - hence why I was trying to see whether it was possible to fix first rather than a full install of both OS’ (which was my initial thoughts). It would have been nice to get any info off open browser tabs. Files are easy enough as the partition is still accessible.

It seems to me that you should first make sure the Windows system is bootable and working. Then you can do a clean linux install. Just remember that the /boot/efi file system must NOT be reformatted.

Also, I would suggest to become familiar with the UEFI boot menu and how to use that to select the other OS for the next boot. The grub menu has an entry “UEFI Firmware Settings” which brings you into the UEFI where you get access to the UEFI boot menu.

As I said, currently there’s no way of booting Windows at all (not from GRUB and not from the UEFI menu). It might be a case as you said to use a Windows backup or use a live Windows ISO to repair the install. Still means I’ll need to backup the current Linux install, settings etc. I’m not as concerned with that because it’s time to upgrade to Fedora 44 and if I’m re-installing anyway, might as well do the latest.

I’m still wondering what actually happened to that Windows install though when I re-installed Fedora and why it didn’t show up afterwards? Normally I don’t have any issues when I make dual boot systems.

A slip of a finger and the /boot/efi file system got reformatted, perhaps.

It is probably better to download the Fedora44 iso and create the USB device while you still have a working Linux system.

Could very well have been. I think Fedora started changing the installer around 42/43 so who knows?

No rush, I have plenty of working computers to do that on. It’s probably going to take longer to backup the current system than download the ISO and make the USB. Actually tell a lie - it will take longer to get Windows back up and running than either of these combined :joy::rofl:

GRUB can detect windows even if Bit Locker is active, but trying to boot it through GRUB will throw a Bit Locker recovery screen.

So it ended up not being as painful as I thought it would be. ChatGPT helped out a bit as well getting Windows back online. Initially I tried using Windows recovery from the install USB as @vekruse suggested but wouldn’t allow me to as it said the Windows partition was locked (probably in sleep state from the last time it was used) .

What I did:

  • Inserted a USB with Windows install on it
  • Booted into BIOS (F2), Select Boot Tab and move USB up the chain in the boot sequence, saved
  • Re-booted into Windows install then Shift-F10 for a command prompt
  • Type Diskpart to run Partition Manager then
list disk
select disk 0
list volume
  • Found my EFI partition and noted the volume number (3 in my case) and also noted the Windows drive letter (C in my case)
  • Then run these commands to assign the EFI a drive letter (drive letter can be any letter not already assigned)
select volume 3
assign letter=V
exit

Then run the following to forcefully rebuild Windows Bootloader

bcdboot c:\Windows /s V: /f UEFI

Gives out a message saying “Boot files successfully created”

  • Then boot back into BIOS again (F2), select Boot Tab (my MSI has EFI orders as well hidden towards the bottom)
  • Selected that and now there were three options now visible - Fedora, Fedora (Corsair) and Windows.
  • Changed the boot order to Windows, Fedora, Fedora (Corsair) and rebooted.
  • Windows was now available.
  • Did some updated to the Windows OS while I was in there

Now came the tricky part as Windows (as I thought it would) commandeered the PC for itself and now I wasn’t able to get into BIOS anymore (with F2). I had to

  • go into boot options within Windows settings
  • select one of the OS’ options first (Fedora in this case), then
  • reboot.

Now it booted up with the old Fedora GRUB menu, from which I could now go into BIOS and change the boot sequence back to Fedora, Fedora (Corsair), Windows and reboot back into Fedora (Ultramarine).

I’d previously updated GRUB to put this line in at the end
GRUB_DISABLE_OS_PROBER=false

But rebuilding GRUB with

sudo grub2-mkconfig -o /boot/efi

(as suggested by ChatGPT) found Windows, but when I rebooted there still was no entry in GRUB for it. So, I deleted
/boot/efi/EFI/fedora/grub.cfg and /boot/grub2/grub.cfg as I had done previously.

And then ran
sudo dnf reinstall grub2-efi* grub2-common again (which failed because it didn’t like the ‘*’ in there now?)

So I used
sudo dnf reinstall grub2-efi grub2-common
which worked, found Windows and put an entry in GRUB for it.

Everythings now working as it should again.

Thanks everyone for your help and suggestions

* should be escaped when used like this, because you want the shell to treat it as a non-wildcard. (You want only dnf to regard it as a wildcard.) So:

sudo dnf reinstall grub2-efi\* grub2-common

(Not the only way to do it, you can use quotes if you prefer.)

Otherwise, the behaviour is dependent on whether the shell can resolve the wildcard. In this case:

  1. Say there is a file grub2-efi.txt in the working directory. Then the shell resolves the wildcard and invokes dnf with the args reinstall grub2-efi.txt grub-common, which isn’t what you want.
  2. Say there is no file matching the wildcard in the working directory. Then you get away with it: the shell can’t resolve the wildcard and invokes dnf with the args reinstall grub2-efi* grub2-common.