Windows not shown in GRUB

Hi,

I have been using F34 and F35 successfully with Windows dual boot but then had to reinstall F35 from scratch because of various issues. Since the reinstallation, Windows does not get shown in the grub menu anymore and I do not know how to solve this. I have installed Fedora in UEFI mode.

Things I have checked out so far:

  1. From askubuntu.com:
    Run $ lsblk to find name of /boot/efi, then use $ sudo blkid to get UUID.
    Then, I added
menuentry "Windows 10" {  
   insmod ntfs  
   set root='(hd0,1)'  
   search --no-floppy --fs-uuid --set <UUID>
   chainloader +1  
}

to /etc/grub.d/40_custom. Finally, I updated grub using sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg.
However, this does not work: after booting, the ‘Windows 10’ appears below UEFI Firmware settings.
Upon selecting it (Windows 10), I get the following error message:

error: ../../grub-core/fs/fshelp.c:257:file `/EFI/fedora/x86_64-efi/ntfs.mod' not found.
error: ../../grub-core/loader/efi/chainloader.c:164:invalid EFI file path.

One possible reason for this is that I just copy pasted the menu entry. I do not know enough about this to make appropriate changes.

  1. From askfedora: Windows not shown in Grub (Windows and Fedora installed on separate SSDs). Not really applicable because Windows and Fedora are on the same SSD? Plus I do not really understand @computersavvy’s answer.

  2. From askfedora: Grub menu not show windows. I do not have a folder Windows or Microsoft in /boot/efi/EFI/, and another answer in that post refers to How to repair the EFI bootloader on a GPT Hard Drive for Windows 7, 8, 8.1 and 10 on your Dell personal computer. Again, I am not sure if that is applicable to me (because I am using Windows and Fedora and I do not have a Dell computer).

Any help would be greatly appreciated!

It is for windows not dell specific so it should work you can try.

1 Like

Finally managed to do it. If somebody encounters the same problem, here’s how I did it (following mostly the above-mentioned Dell How-to).

  1. Create a bootable Windows10 USB drive. This can be done on Fedora using WoeUSB:

    1. Install WoeUSB: $ sudo dnf install WoeUSB
    2. Insert a USB drive (min. 8GB, warning: all content on the drive will be deleted), run
      $ lsblk and somewhere in the list, you’ll see an entry such as this one (with sda possibly also being sdb, sdc, …
      sda             8:0    1   7,5G  0 disk  
      └─sda1          8:1    1   7,5G  0 part  /run/media/blatzematze/max
      
    3. run $ sudo woeusb --target-filesystem NTFS --device Downloads/Win10_21H2_English_x64.iso /dev/sda --verbose (takes some time). Note that Downloads/Win10_21H2_English_x64.iso needs to be replaced with the path to your Windows image, which can be downloaded here. Also note that /dev/sda may need to be replaced with sdb, sdc, … depending on what you found in step 1.2.
  2. Follow steps 1 to 7 (included) of How to repair your EFI Bootloader found on the Dell website. Be sure to select “Windows 10”.

  3. Follow step 2 further below on the same page: bcdboot c:\Windows /s <boot letter>: /f UEFI (Step 1, ren BCD BCD.old threw an error in my case)

  4. Now, you should be able to use Windows again. However, I had one last problem: GRUB was not shown and the computer booted Windows as default. To solve this, open Windows’ command prompt with elevated privileges and run bcdedit /set {bootmgr} path \EFI\fedora\shim.efi taken from tecmint.com.

1 Like