Windows 11 not detecting in dual boot

I initially installed Windows 11 on secondary drive, and then installed it on Primary drive (both Windows were working) and installed Fedora on secondary drive afterwards. And with that my Windows 11 on primary is neither detecting in UEFI boot nor in Fedora grub2 (but drive and files exists). I believe I installed Fedora in UEFI because of my fdisk -l output below:

$ sudo fdisk -l
Disk /dev/nvme1n1: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WD_BLACK SN7100 2TB                     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 262144 bytes
Disklabel type: gpt
Disk identifier: 57848DCF-4910-4FFE-BF41-1BAAD758C8DF

Device              Start        End    Sectors  Size Type
/dev/nvme1n1p1       2048      34815      32768   16M Microsoft reserved
/dev/nvme1n1p2      34816 3905708031 3905673216  1.8T Microsoft basic data
/dev/nvme1n1p3 3905708032 3907026943    1318912  644M Windows recovery environment


Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: CT1000P3PSSD8                           
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: 4750597C-6FA4-4159-B441-A9DDB22FDCEF

Device           Start        End    Sectors   Size Type
/dev/nvme0n1p1    2048    1230847    1228800   600M EFI System
/dev/nvme0n1p2 1230848    3327999    2097152     1G Linux extended boot
/dev/nvme0n1p3 3328000 1953523711 1950195712 929.9G Linux filesystem


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

and lsblk -f:

$ sudo lsblk -f
NAME        FSTYPE FSVER LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
zram0                                                                               [SWAP]
nvme1n1                                                                             
├─nvme1n1p1                                                                         
├─nvme1n1p2 ntfs                2050B6B750B69350                                    
└─nvme1n1p3 ntfs                308A57708A573198                                    
nvme0n1                                                                             
├─nvme0n1p1 vfat   FAT32        0D3A-5E3E                             579.4M     3% /boot/efi
├─nvme0n1p2 ext4   1.0          6a9eb719-d07b-4b91-be04-88cad44cbcef  563.3M    35% /boot
└─nvme0n1p3 btrfs        fedora 1ffab0c4-3be7-42b5-b835-daf640dd1fba  922.4G     1% /home
                                                                                    /

Idk what’s that last slash(/) for on the empty line.

Anyway. I read some other post where they installed Fedora in legacy but this seems not the case for me. What should I do?

It appears that nvme0n1p1 is the only efi partition on the system.

I would guess that you may have had only one efi partition (on that drive) that booted both copies of win11. When you installed fedora I would assume you selected to remove everything previously installed and use the entire drive. Doing so would have wiped out the windows efi boot loader.

It seems you probably need to perform a windows repair, probably with the windows install media, so that windows can restore its own boot loader.

This will actually need to be done in 2 steps.

  1. repair windows booting. (remove the fedora drive before doing so)
  2. repair fedora booting. so grub can boot both OSes.
    a. reinstall the fedora drive
    b. boot fedora and run sudo grub2-mkconfig -o /boot/grub2/grub.cfg which should be able to locate the windows installation on the other drive and configure it for booting.

It may be necessary when performing step 2 to use the bios boot menu (or make settings within bios setup) to select nvme0n1 (fedora) for booting.

1 Like

So I:

  1. Remove Fedora SSD from motherboard
  2. Insert Windows USB and “repair Windows”
  3. Re-insert Fedora SSD and boot into it and run the grub2-mkconfig command

And this should enable grub bootloader to detect both OS, right?

Just a question for my information, for your note regarding using UEFI boot to boot into Fedora for step 2: That might just be because after repairing Windows it might make its bootloader as primary, right? Would Windows bootloader be able to detect Fedora’s already present EFI partition and show Fedora in its bootloader?

Thanks!

Yes, windows will make its bootloader primary.
Yes, you probably will need to use the bios to enable booting the fedora ssd
No, windows will not enable booting from the fedora disk. Only the bios can make that switch

After removing Fedora drive, boot into Windows USB drive and go to “Repair Windows” > “Advance Troubleshooting” > “Command prompt” to manually add EFI partition as shown below,

> diskpart
DISKPART > list disk
DISKPART > select disk #              Note: Select the disk where you want to add the EFI System partition.
DISKPART > list partition
DISKPART > select partition #         Note: Select the Windows OS partition (# number) or your data partition.
DISKPART > shrink desired=100
DISKPART > create partition efi size=100
DISKPART > format quick fs=fat32
DISKPART > assign letter=s
DISKPART > list partition
DISKPART > list volume  #              Note: Note the volume letter where the Windows OS is installed.
DISKPART > exit

> bcdboot X:\windows /s S:             Replace "X" with the volume letter of the Windows OS partition

Note: Windows primary data volume didn’t have a letter assigned and I had to assign a letter separately using the same commands above

After restarting I still couldn’t see fedora disk in the boot order list, only primary SSD (slot#1) was in the list. But in my MSI motherboard, it was under Advance Setting > Boot > UEFI Hard Disk Drive BBS Priorities to select Fedora as primary.

After which I followed @computersavvy step to configure GrUB using grub2-mkconfig, finally giving me the GrUB bootloader.

1 Like