I am trying to dual boot fedora with windows 10. I am new to linux. I have found this code to be written in 40_custom file in grub.

menuentry "Windows 10" { 
set root='(hd0,1)'
 chainloader +1 

But this does not seem to work. It says cannot find disk. I have my windows in /dev/sda3 What should I write in 40_custom file so that i can use dual boot properly?

EDIT: My laptop had windows 10 pre installed when I had bought it. I have installed fedora 29 workstation. I do see the grub screen but the windows 10 option there(Created due to the above code) tells disk not found. Windows boot entry was not created automatically when I had installed fedora

  • Was your PC sold to you with a Windows 10 logo sticker on it? Basically any pre-installed Windows 10 should be using EFI boot. And EFI boot does not work with the chainloader +1 approach.
    – sourcejedi
    Apr 13, 2019 at 11:33
  • I am not certain, but it is possible that you booted the Fedora installer in BIOS mode instead of EFI mode. Is your Fedora system booting in EFI mode? You can tell because ls -l /sys/firmware/efi will work in EFI mode, otherwise it will show "not found".
    – sourcejedi
    Apr 13, 2019 at 11:37
  • 1
    I have edited the statements accordingly. I think I have installed in BIOS mode as the above command gave "No such file or directory found" message Apr 13, 2019 at 12:15
  • @sourcejedi then what approach should I take? Apr 13, 2019 at 12:17
  • 1
    @sourcejedi yes it does show x86_64. Yes, I can reinstall but I am not sure whether my windows 10 is in UEFI or not becuse I had reinstalled it some months back. Is there any way to be sure about this prior to re-installation? Apr 13, 2019 at 12:23

1 Answer 1


If you want to give it another try to boot Windows...

This only works if your EFI partition is still intact.

  1. Run lsblk -no UUID /dev/sda3 and write down the UUID.

  2. Edit /etc/grub.d/40_custom and change 67E3-17ED to your UUID:

    menuentry "Windows 10" {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt1'
        search --fs-uuid --no-floppy --set=root 67E3-17ED
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
  3. Update grub.cfg

    Please check which file exists, i.e. ls /boot/grub2/grub.cfg or ls /boot/efi/EFI/fedora/grub.cfg. It's probably the first one.

    If you booted from legacy BIOS, this should be

    grub2-mkconfig -o /boot/grub2/grub.cfg

    and from UEFI

    grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
  4. Reboot and test

  • When I executed step 1, many lines came up.. I cannot understand which is the UUID. Any help? Apr 13, 2019 at 19:38
  • @ArnabBanerjee You can see the UUID also with ls -la /dev/disk/by-uuid. Then select the one of ../../sda3.
    – Freddy
    Apr 13, 2019 at 19:42
  • My windows is in dev/sda3... So in the menuentry will it be gpt1 or gpt3? Apr 13, 2019 at 19:42
  • @ArnabBanerjee I think set root='hd0,gpt1' refers to the EFI partition, so leave this as it is. Only change the UUID.
    – Freddy
    Apr 13, 2019 at 19:48
  • Do I need to give single or double quotes around the uuid? Apr 13, 2019 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.