If you install a dual boot of Windows or Mac OSX on your Ubuntu machine, you may find that your Grub bootloader are wiped out and you can’t boot into any of your OS. If this is the case, the only way is to restore Grub back in your Ubuntu system.
Restoration of Grub is very easy. All you need is the Ubuntu Live CD (you should already have it if you install Ubuntu).
Boot up your live CD.
In the desktop, open terminal (“Applications -> Accessories -> Terminal”).
sudo grub
This will set it to grub mode
find /boot/grub/stage1
This will locate your boot partition. If you already know the location, you can ignore this step.
root (hd0,0)
Replace the (hd0,0) by your boot partition number. If your Ubuntu is installed in the second partition, then change it to (hd0,1)
setup (hd0) quit
Reboot your system. You should be able to access the Grub bootloader now.
Our latest tutorials delivered straight to your inbox