In this article we’ll show you how to repair restore or reinstall Grub 2 with Ubuntu CD or USB. Grub 2 usually gets overridden when you install another OS. In order to make Ubuntu to control the boot process you’re going to need to Reinstall Grub using and Ubuntu live CD.
Warning: By using the “sudo” commant, especially form a live CD you can seriously harm your system. Make sure that you read and understand all the instructions before executing any commands. Also, be sure that when you want to paste into the terminal use Ctrl+Shift+V and NOT Ctrl+V.
Repair Restore or Reinstall Grub 2 with Ubuntu CD or USB
Step 1 – Mount the partition
Start by mounting the partition on which your Ubuntu installation is. In case you’re not sure, lauch Gparted(this is included in live CD also). Replace the XY with your drive letter and ofcourse your partition number
sudo mount /dev/sdXY /mnt
Step 2 – Bind the directories
Now proceed by binding the directories that grub needs access to, so to detect the other Operating systems.
sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys
Step 3 – Use chroot
Now we’re going to use chroot
sudo chroot /mnt
Step 4 – Install and update Grub
Now install and update Grub. This tie you need only to add the drive letter, which is usually a, to replace the “X”.
grub-install <span class="editable">/dev/sdX</span> grub-install --recheck <span class="editable">/dev/sdX</span>
Step 5 – exit the chrooted system
Now grub is back, the only thing that left to do is to exit the chrooted system and then unmount everything.
exit && sudo umount /mnt/sys && sudo umount /mnt/proc && sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt
Now restart your computer, and everything should work fine.
comments powered by Disqus