So, you had Ubuntu (or any of its derivative) installed on your system and then decided to install Windowswith it? And after installing Windows, you can’t load Ubuntu again, just follow the steps to get this working:
- Boot the system using a Ubuntu Live disk.
- After you reach the desktop, open Terminal (press Alt+F2, type “gnome-terminal” without quotes and press enter).
- Execute:
sudo fdisk -l
- Execute (after replacing sda7 with your corresponding linux root partition, which you will be able to identify from the output of the previous command – it’s usually marked as Linux):
sudo mount /dev/sda7 /mnt
- Just check whether you got the root partition right, if you have more than 1 linux partition on your hard disk:
cd /mnt
lsIf the listing contains names like bin, boot, dev, etc, home, tmp, usr, var, et cetera then you are in the right partition. If not, unmount this using:
sudo umount /mnt
and follow the above step again using another partition.
- Now:
sudo grub-install –root-directory=/mnt /dev/sda
and grub will get installed if it shows no errors.
- As a last step unmount your /mnt directory using:
sudo umount /mnt
and restart the system. You will find the friendly grub boot manager giving you the choice to boot into Linux or Windows.
Hope that helps and saves you from scratching your head. Do let me know if you have questions / comments.
Stay Digified !!
Kartik