Ubuntu – How to manually add windows 7 to grub list

dual-boot

I am desperate to add Windows 7 to grub. I have tried sudo update-grub, I have run sudo os-prober, but I can't seem to get windows to be added to grub.

Can someone please explain how to manually add windows 7 to my grub?

Best Answer

  1. Open a terminal and type:

sudo nano /etc/grub.d/40_custom

  1. Add the following line:
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1
}

by appropriately modifying the location of windows 7 in your computer.

  1. Run sudo update-grub

Note If you are not careful these operations can mess up your computer.

Related Question