Ubuntu – How to change boot order in grub2 to include bootable USB

bootloaderdual-bootgrub2

I want to install Windows OS in an empty partition(dual-boot) using a bootable USB. However I can't seem to enter BIOS to change the boot order. Can I include the USB in the boot menu in GRUB2?

Best Answer

Can I include the USB in the boot menu in GRUB2?

Yes, it is possible. You have to edit the /etc/grub.d/40_custom file and add the following entry. So, open the 40_custom file by:

sudo nano /etc/grub.d/40_custom

and add the following entry right after the last line.

menuentry "Windows-USB" {
        insmod chain
        insmod ntfs
        set root='hd1'
        chainloader +1
}

Here. hd1 is the USB containing bootable media. It can be different for you, so you have to get this number right or this will not work.

Save and close. Then run:

sudo update-grub

Now, when you restart your computer you'll see an entry named Windows-USB.

Related Question