This post discusses the easy way of restoring Grub2 using Ubuntu Live CD. First, boot with the Ubuntu Live CD. Now mount the partition, which has Ubuntu installed on it. If you had a separate partition for /boot, then you would have to mount that too. Mounting the partitions is super easy. Just go to Places in the top Gnome menu and try browsing to your corresponding partition by clicking on it. It would automatically get mounted and open in nautilus.
Now just run the following command to install Grub2 in the Master Boot Record (MBR) of your first booting hard drive.
sudo grub-setup -d /media/XXXXX/boot/grub -m /media/YYYYY/boot/grub/device.map /dev/sda
Where XXXXX represents the name or UUID of the partition that you have mounted. If your /boot partition is separate from your / partition then YYYYY above would be different from XXXXX, else both of them would be identical. The command above assumes that /dev/sda is your primary or first device in hard disk boot order. If not then replace it with /dev/sdb or sd_ fill the blank with appropriate letter.
After you have run the command, reboot and you should be able to boot in Ubuntu but not in Windows, to fix it run the following command in a terminal and Grub boot list would be updated to include Windows in it. Also if you want to change boot order read this.
sudo update-grub
Now reboot and you should have the choice to boot in both Windows and Ubuntu.
Comments
Post a Comment