Os-prober not seeing windows 10

Hello I have fedora 41 dual booted with windows 10. The grub menu is only showing fedora enteries, and I can’t get os-prober to do anything. When I run it I simply get no output.

Info on my system below.

moksh@fedora:~$ sudo fdisk -l
Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WD Blue SA510 2.
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 98B70714-B08B-4BAC-B1AA-91637FBE0B00

Device     Start        End    Sectors  Size Type
/dev/sda1     34      32767      32734   16M Microsoft reserved
/dev/sda2  32768 3907026943 3906994176  1.8T Microsoft basic data


Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WD Green SN350 1TB                      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E2F80440-DFD4-462F-8840-9A29FE840712

Device           Start        End    Sectors   Size Type
/dev/nvme0n1p1    2048    1230847    1228800   600M EFI System
/dev/nvme0n1p2 1230848    3328110    2097263     1G Linux extended boot
/dev/nvme0n1p3 3328111 1953525134 1950197024 929.9G Linux filesystem


Disk /dev/nvme1n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500P2SSD8                             
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x64b8a218

Device         Boot     Start       End   Sectors   Size Id Type
/dev/nvme1n1p1 *         2048    104447    102400    50M  7 HPFS/NTFS/exFAT
/dev/nvme1n1p2         104448 975649181 975544734 465.2G  7 HPFS/NTFS/exFAT
/dev/nvme1n1p3      975650816 976769023   1118208   546M 27 Hidden NTFS WinRE


Disk /dev/zram0: 8 GiB, 8589934592 bytes, 2097152 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

I tried turning off/on secure boot. I tried mounting sudo mount /dev/nvme1n1p1 /mnt then running os-prober, still nothing. I have made sure fast boot is off. Here are my grub settings.

moksh@fedora:~$ cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet rd.driver.blacklist=nouveau,nova_core modprobe.blacklist=nouveau,nova_core"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
GRUB_DISABLE_OS_PROBER=false

Does anyone have any ideas on what else I can do?

Hello @mokshc
Welcome to Fedora.
Have you tried: sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Based on the output of fdisk -l, it looks like you have Fedora installed on a GPT disk (with an EFI system partition, so you must be booting in UEFI mode), and Windows on an MBR disk.

From a quick look at the source code, seems like os-prober doesn’t play well with this setup. If you booted in UEFI mode then os-prober doesn’t look for MBR bootloaders:

You might consider converting your Windows disk to GPT. I did this on a Windows 10 install a few years ago and it was fairly painless, but of course make sure you have everything backed up that you wouldn’t want to lose.

2 Likes

This is reliant on os-prober to find Windows installations. So if os-prober isn’t finding Windows, the regenerated GRUB config won’t include Windows.

1 Like

The output of ‘fdisk -l’ shows only 3 partitions on /dev/nvme1n1, and does not show an efi partition.

There is always a problem when having 2 different OSes installed if one is booting uefi and the other is booting legacy bios.

If you wish fedora grub (uefi) to see the windows OS then windows must also be installed with uefi boot.

Usually with this situation users can still boot both OSes, but must select the one to be booted from the bios boot menu.

1 Like

I’m assuming /dev/sda (GPT) is a data drive, /dev/nvme0n1 (GPT) has the Fedora installation and /dev/nvme1n1 (MBR) has the Windows installation.

1 Like

Thanks, I edited my post.

Thank you for the clarity! Do you think I can avoid reformatting my windows nvme by appending the following to /etc/grub.d/40_custom:

menuentry "Windows 10" {
        insmod part_gpt
        insmod fat
        search --no-floppy --fs-uuid --set <boot_efi_uuid>
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

I saw this on an Ubuntu forum for someone having a similar issue.

Unfortunately that won’t work for you, because it relies on Windows being installed in GPT / UEFI fashion. On your install there will be no bootmgfw.efi because Windows is installed in legacy style.

There are some hints on the Gentoo Wiki that might help, though I don’t have experience doing this myself.

Probably the most straightforward one would be to add this to 40_custom:

menuentry "Windows 10" {
     insmod ntfs
     insmod ntldr
     insmod part_msdos
     insmod search_fs_uuid
     search --no-floppy --fs-uuid --set=root 1AECC5A1ECC57811
     ntldr /bootmgr
}

(replace 1AEC... with the UUID of your Windows OS partition, which you can find from lsblk -f)

I can’t promise, but it’s a fairly easy thing to try.

1 Like

This didnt work, guess I’ll need to reformat windows!