LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Restoring Grub (https://www.linuxquestions.org/questions/suse-opensuse-60/restoring-grub-271969/)

Sevoma 12-30-2004 12:41 PM

Restoring Grub
 
Ok. I has Suse 9.1 dual booted with win2k. I installed xp over win2k not thinking that it would erase my boot loader. I removed xp and now I have to get into linux. Can someone tell me how to restore bootloader. Thanks in advance for any help.

leonscape 12-30-2004 12:54 PM

Since grub should still be setup on your Linux partitions, its just the first stage you should need to restore. and also know which parition the /boot directory was on ( or if it has one of its own ). if its the first partition of the primary master it would be hda1, but in grub parlance (hd0,0).

If you have the SUSE CD, boot with that, and see if theres an emergency or recovery boot, all you need is a login with root. then type the following

Code:

grub
root (hd0,0)
setup (hd0)
quit

You should replace (hd0,0) with where your /boot directory is. If you don't know where it is ( or your unsure ) before typing in the root command type "find /boot/grub/stage1" (without quotes) this should return the proper parameter for the root command. Setup will install stage1 in the master boot record.

Now just reboot and grub should be back.

Sevoma 12-30-2004 01:06 PM

Thanks I'll try that

masand 12-30-2004 01:10 PM

grub-install /dev/hda

will work if u want to install grub on MBR

regards

Sevoma 12-30-2004 01:17 PM

THANK YOU SO MUCH LEONSCAPE! It worked! Thank you masand too, I didn't need to try yours. The bootloader is back to normal thanks guys.

ChronusDark 12-31-2004 01:54 PM

i would like to thank you leonscape i had a similar problem and it fixed thank thanks thanks

leonscape 12-31-2004 10:52 PM

Your very welcome! It's nice to help out.


All times are GMT -5. The time now is 10:12 PM.