Wednesday, April 23, 2008

How to reinstall GRUB on PCLinuxOS

Every now and then we install two distributions as dual boot or dual boot Windows with Linux and then we are puzzled how to reinstall GRUB. Below is a simple command line re-installation method of  GRUB for PCLinuxOS and which works for any other distribution running GRUB legacy.

Reinstalling GRUB:

a ) Boot system from PCLinuxOS Live CD
b ) Log in as root
c ) Open a Konsole window, and at the prompt  ( [root@home-pc saleem]# )    type;

                                 [root@home-pc saleem]# grub

                                 grub> : The grub prompt will appear

d) From the grub prompt type;

grub> find /boot/grub/stage2

(hd0,0)
(hd0,4)
(hd0,5)
(hd0,9)

A list similar to the above one  will appear.

e ) You need to know which partition your Linux OS is located. For example it is (hd0,4) thus I type these commands

     grub> root (hd0,4)

     grub> setup (hd0)

f ) Exit GRUB by typing "quit"


Some Screenshots here


 g ) Restart you computer. The GRUB bootloader should now appear.

7 comments:

Anonymous said...

thank you very much . it saved my work after installing windows

Anonymous said...

Thanks for posting this! After using the Windows repair console for XP Pro my Grub menu was removed. This quick fix got me back to multi-boot in minutes. Nice that it showed up at the top of my Google search too ;-)

bathmate said...

very nice blog......
i like your posting ,this is the better blog.

bathmateus

bathmate said...

very nice blog......
i like your posting ,this is the better blog.

bathmateus

Anonymous said...

thanks a lot for this vital tip. I tried several times with nearly similar code, but failed. It was your tip that precisely made my machine restart with grub. Thanks again!

Anonymous said...

thq.. it was really helpful :)

Anonymous said...

Wow It actually worked, very nice instructions,
easy and accurate! Thank you for sharing with the rest of us!