| RSS

Restoring Grub in Ubuntu: How-to

July 13th, 2009 | Comments | Posted in How-to, Linux, Ubuntu

grubiconI had to re-install Windows on my partition and in the process it was obvious that I was going to lose my Grub. However, I knew I could very easily get it back. You can lose grub for various reasons and the most common being installing windows, which unfortunately doesn’t respect your settings and erases your grub. However, there’s nothing to panic in that case because restoring grub is no rocket science.

Let’s see how to restore grub on a machine which has Ubuntu:

1. Boot using a Live CD or pen drive of Ubuntu. You’ll be having a live session running.

2. Start a terminal Window by hitting ALT+F2 and typing gnome-terminal.

3. On the terminal window type the following command:

sudo grub

You’ll see the prompt changing in the terminal window.

4. At the grub prompt, type the following:

find /boot/grub/stage1

This should show you info about location

grublocation

5. As I got (hd0,5) in my case, following is what I am going to enter at the grub prompt:

root (hd0,5)

and hit enter

grubroot

6. Next we’ll install the grub at the mbr using the following command:

setup (hd0)

You’ll see the confirmation of installation of Grub.

grubinstall

7. Type quit to exit grub prompt. Close the terminal window and restart your computer.

You’ll have your grub restored.


Leave a Reply 1626 views, 12 so far today |

Related Posts!

  • chawanakee
    Thanks! These are very clear instructions and they work!
blog comments powered by Disqus
Cornish fauna - Horse fly Tabanus sp. #3There's only one thing stops a hoverfly in mid flight.. Male hoverfly Syritta pipiensSaale BridgeLes Invalides - HDRsanta eufemia de cozuelos - HDRStreet ArtmiraCloud KillerMolino HDRTours Société Générale By Night | HDR