Home > Linux, User Tips > Recover GRUB after Windows Installation

Recover GRUB after Windows Installation

September 27, 2010 Leave a comment Go to comments

Often we lose GRUB boot loader whenever we install Windows after Linux installation. This is a terrible hazard to all who love to use dual, triple or even quadrapole or even higher boot systems on their Lappys or Desktop PCs. Here’s the fix🙂

Step 1. Boot with your Ubuntu Live CD or DVD
Step 2. Open gnome-terminal or konsole
Step 3.

$ sudo grub

You’ll get a” grub>” prompt.

Step 4.

grub>find /boot/grub/stage1

You’ll have an output like (hd0,0) ,  it’ll be the number of your partition.

For hda1,sda1 it’ll be (hd0,0),

For hda2,sda2 it’ll be (hd0,1),

For hdb1,sdb1 it’ll be (hd1,0).

Step 5.

grub>root (hd0,1)

Step 6.

grub>setup (hd0)

Step 7.

grub>quit

Step 8.

Reboot the machine.

The boot loader should be recovered now😀.
Another way to fix is to enter into the single user mode at the time of boot from the selection menu & when you have the root prompt do the following:

# grub

You’ll have “grub>” prompt like before.

Now repeat from Step 4 to Step 8 as before and you’re done🙂

  1. noman
    April 17, 2011 at 6:57 pm

    hi,

    nice article

  2. July 11, 2011 at 4:29 pm

    thanks @ Noman

  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: