If you, like me, installed a M$ Windows after Ubuntu installation, you’ll need to restore your Grub loader. To fix it you’ll need to do these simple steps:
Ubuntu-based Live CD/USB
Get your live CD/USB or, if necessary, download and create again, and boot your machine with this live CD/USB.
Mounting your / partition
Once in live CD/USB, open a terminal and mount your root ‘/’ partition, with you don’t remember or don’t know how do this, use GParted app to list all your partitions, or then, use ‘fdisk -l’ command to it. To mount partition use:
1 |
mount /dev/sdaX /mnt/ |
Repoint Grub
On mounted partition, you can repoint grub to MBR sector again, use this command to it:
1 |
sudo grub-install --root-directory=/mnt/ /dev/sda |
Now just reboot and skip the live CD/USB mode and live happy again.