Restoring Grub after Windows installations

Restoring Grub after Windows installations

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:

Warning! Change the ‘X’ by your partition number, like /dev/sda5.

Repoint Grub

On mounted partition, you can repoint grub to MBR sector again, use this command to it:

Danger! Don’t inform your partition number, you only inform the letters of him, like sda, sdb, sdn…

Now just reboot and skip the live CD/USB mode and live happy again.

Blog Linux