After re-installing Windows on your computer, if you need dual boot (Windows and Ubuntu), you should restore Ububtu grub because MBR has been rewritten. Today we would like to share How to recover Ubuntu after installing Windows. You can easily restore Ubuntu GRUB2 from a Ubuntu live CD. You should ensure the version of Ubuntu on the CD is the same as the version of Ubuntu installed on your system.
How to Restore Ubuntu after installing Windows (Recommended Method)
- You should boot Ubuntu from live CD (Try Ubuntu without any changes to you Computer)
- Open a terminal (You can achieve this by going to Applications -> Accessories -> Terminal / CTRL+ALT+T / Right click on the desktop and select Open in Terminal)
- Then type in the terminal sudo fdisk -l and press Enter button, If asking password, enter your password.
- Then type sudo mount /dev/sdaX /mnt (Where X is the number you have found Linux word in. For example : sudo mount /dev/sda8 /mnt)
- Type another command sudo grub-install --root-directory=/mnt /dev/sda to install grub.
- Then update ubuntu grub, type sudo update-grub (if this command didn't work run it after rebooting)