Restore GRUB

GRUB is the default bootmanager in linux. It helps to choose the desired OS to boot on the booting stage.It shows a list of OS, so that we can choose anyone to boot. GRUB is so powerful that can understand the filesystem without booting the system.

The modern linux come with the latest GRUB and they recognize all the existing operating systems and add them into the list.

But the problem comes with the other OS like windowz. They dont believe that the system can have other OS too. They believe that they are the only OS in the earth.

In the dual boot machines, often the windows should be reinstalled because of various reasons. When we do the reinstallation of windows, it erases the GRUB which resides at MBR normally.

So, after re-installing windows, Most of newbies think that we have to re-install linux too. No. No. No. Linux never went out. It is safely in its partition only, until you deleted that partition.

Only the GRUB is washed out by windows. we can recover it easily.

Here are some ways to do it.

Needed Materials:
1. Any LiveCD or Live DVd like ubuntu, knoppix
The installation CD of your or any Distro.

Way – 1:

1. Pop in the Live CD, boot from it until you reach the desktop.

2. Open a terminal window or switch to a tty.

3. Type “grub”

4. Type “root (hd0,6)”, or whatever your harddisk + boot partition
numbers are (my /boot is at /dev/sda7, which translates to hd0,6 for

5. Type “setup (hd0)”, ot whatever your harddisk nr is.

6. Quit grub by typing “quit”.

7. Reboot.

Way -2:

1. Boot from a Live CD, like Ubuntu Live, Knoppix, Mepis, or similar.

2. Open a Terminal. Go SuperUser (that is, type “su”). Enter root passwords as necessary.

3. Type “grub” which makes a GRUB prompt appear.

4. Type “find /boot/grub/stage1”. You’ll get a response like “(hd0)” or
in my case “(hd0,3)”. Use whatever your computer spits out for the
following lines.

5. Type “root (hd0,3)”.

6. Type “setup (hd0)”. This is key. Other instructions say to use
“(hd0)”, and that’s fine if you want to write GRUB to the MBR. If you
want to write it to your linux root partition, then you want the number
after the comma, such as “(hd0,3)”.

7. Type “quit”.

8. Restart the system. Remove the bootable CD.

Way – 3:

1. Boot with any live CD (I’ve done it with Knoppix 3.x and Ubuntu)

2. Get a root shell and make a folder (mkdir ubuntu)

3. mount the root (/) partition of ubuntu (e.g. mount /dev/hdb ubuntu if you have two disks)

4. chroot the mounted partition (chroot ubuntu)

5. grub-install /dev/hda

5. Exit the shell

6. Reboot

Try any of the three ways.

There may be also so many ways to do this same thing. Try yourself and keep learning.

Powered by ScribeFire.


5 thoughts on “Restore GRUB

  1. Yes.. , i do know chandershekar., we( i and saura (from anna nager) ) learned a lot…
    i think it was some 2 years ago…we were with him in the initial days of his courses..
    but…learned a lot..!

    Thanks .Chandershekar.!

  2. Pingback: Losgatossportsdomain7676$anchor$basketball Betting,final Four,final Four Betting,final Four Gambling,final Four Sports Book,final Four Sportsbook,march Madness,march Madness Betting,march Madness Gambling,march Madness Sports Book,march Madness Sportsbook

  3. Thank you very much for your time and providing this usefull information!
    I’m only using that fat OS in order to help people who do have to work with it (or try to work with it).

    Best regards from xubuntu,

    Open Source Software: be free to choose and actually help each other.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s