Adding UEFI Windows 10 Menu Entry to Grub

If you install Ubuntu first and Windows later, you'll notice that it's not possible to boot into Linux anymore. As Windows boot loader doesn't really handle Linux, you'll need to tell Windows to use Grub.

Once you're in command prompt with administrative privileges, you can execute:

CMD
bcdedit /set {bootmgr} path \EFI\Ubuntu\grubx64.efi

After reboot Grub will show it's ugly face and you'll have another problem - there are no Windows entries.

To get them into Grub menu, one can simply update grub:

Terminal
sudo update-grub

On most Linux distributions this will trigger OS Prober and Windows Boot Manager entry will magically appear. However, if you have OS Prober disabled or you want to disable it in future for some reason, you can add manual entry too:

Terminal
cat << EOF | sudo tee /etc/grub.d/25_windows
#!/bin/sh
exec tail -n +3 \$0
menuentry 'Windows 10' {
savedefault
search --no-floppy --set=root --file /EFI/Microsoft/Boot/bootmgfw.efi
chainloader (\${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
EOF

sudo chmod +x /etc/grub.d/25_windows

sudo update-grub

In either case, boot menu should now offer you option to get into Windows.

5 thoughts to “Adding UEFI Windows 10 Menu Entry to Grub”

  1. Only solution that worked! I only had to delete the “\” escape character. So I changed from:
    chainloader (\${root})/EFI/Microsoft/Boot/bootmgfw.efi

    to:
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi

Leave a Reply

Your email address will not be published. Required fields are marked *