Windows 10 goes undetected by grub

I recently installed Fedora 36.

Previously I had a working installation of manjaro in dual boot with windows.

When I installed fedora I removed manjaro’s boot partition and created separate /boot/ and /boot/efi partitions.

Ever since then windows goes undetected.

Here is the output of lsblk

sdb 8:16 0 465.8G 0 disk
├─sdb1 8:17 0 529M 0 part
├─sdb2 8:18 0 1G 0 part /boot
├─sdb3 8:19 0 16M 0 part
├─sdb4 8:20 0 136G 0 part /run/media/nox/windows
├─sdb5 8:21 0 512M 0 part /boot/efi
└─sdb6 8:22 0 327.6G 0 part /var
/usr/local
/tmp
/opt
/home
/.snapshots
/

It seems like the windows boot partition lies within it’s own main partition and it seems intact

$ ls /run/media/nox/windows/Windows/Boot/
BootDebuggerFiles.ini* DVD/ EFI/ Fonts/ Misc/ PCAT/ Resources/

I have tried to mount the partition and to run $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Do I have to make a manual entry in the grub in order to boot windows again ?

You shouldn’t have to. Normally on grub update, os-prober detects windows and automatically adds the entry for you.

I know I know, but os-prober does not detect windows.

I am far from being knowledgable when it comes to boot loader and EFI, nonetheless here are my 2 cents.

Is the windows install on an external detachable drive? If yes, I am wondering if the issue is that the mount point is /run/media/

Maybe that is not allowed?

Also, not sure grub is able to deal with two EFI partitions in an automatic manner, one even being external? Whenever I have a dualboot system, there is only one EFI partition.

When running efibootmgr -v on Fedora, do you “see” the Windows Boot Loader?

Thank you for the reply.
Windows is on an internal drive and it being mounted to /run/media is just the default.

I have found the solution to my problem.
I have deleted my old efi partition where the windows efi files were stored on, this is why (my newly installed) grub couldn’t see it.
efibootmgr -v did not detect the windows partition either because it detects window’s efi files, which I deleted.

I followed this tutorial and now my grub can see it :slight_smile:

Generating grub configuration file …
Found Windows Boot Manager on /dev/sdb5@/EFI/Microsoft/Boot/bootmgfw.efi
Found Debian GNU/Linux 11 (bullseye) on /dev/sdd3
Adding boot menu entry for UEFI Firmware Settings …
Detecting snapshots …
[…]
Found 10 snapshot(s)
Unmount /tmp/grub-btrfs.fMVBt2wr1n … Success
done

The commands used were the following (in the windows live media rescue shell):

$ diskpart // Start a diskpart shell
diskpart> list disk  // List all disks
diskpart> sel disk <disk_id> // Select the disk with the EFI partition
diskpart> list vol // List all volumes
diskpart> sel vol <volume_id> // Select the EFI volume
diskpart> assign letter=F // Assign a letter to the EFI volume (I choosed F)
diskpart> exit
$ bcdboot C:\Windows /s F: /f ALL // Create all Windows boot files in F:
2 Likes

In a dual boot system you should never remove or format an existing efi partition. Whenever installing a new Linux system, you have the option to use an existing efi partition (mount point /boot/efi) without formatting it. In Fedora’s installer, there is a checkbox for that.

1 Like

Yes, I kind of know.
What led me to deleting this was to have new, clean, separate /boot/ and /boot/efi partitions of sufficient size (which wasn’t the case before, which led to problems).

Anyway I have learned

  • that os-prober looks at the efi partition to find system efi files
  • how to restore windows efi files
1 Like

I have only a 250 GB /boot/efi partition and it is only 16% used with 4 fedora kernels and the windows efi files.

I think that if you do not have enough room in /boot/efi that you have some other problem with files that should not be there. /boot also only needs to be ~500 GB, since with the same machine I have only ~250 GB data in /boot.

1 Like