LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   OOPS! overwrote MBR, GRUB wont boot :( (https://www.linuxquestions.org/questions/linux-newbie-8/oops-overwrote-mbr-grub-wont-boot-171046/)

slacker9876 04-16-2004 04:09 PM

OOPS! overwrote MBR, GRUB wont boot :(
 
I had just finished installing an updating RedHat 9 on my work PC, and decided that I had better check my e-mail (Exchange). I rebooted and selected DOS (didn't change the name) as provided by GRUB in my menu and received the ever loving boot disk not found message.

Admittedly I did not read well why I was installing and had not selected the option to install it to the boot partition.

Anyway since XP would not boot, I ran FIXMBR and FIXBOOT ... oops

I have tried to repair by booting the Red Hat CD1, selecting upgrade and changing to LILO ... it says no kernel changes were made, reboots right into windows.

What do I do to make my drive GRUB bootable again?

david_ross 04-16-2004 04:16 PM

Welcome to LQ.

Boot with CD1 into recovery mode then run:
/sbin/grub-install /dev/hda

Also see:
http://www.redhat.com/docs/manuals/l...nstalling.html

slacker9876 04-16-2004 04:53 PM

Thanks David, I am looking forward to spending time here learning an teaching (eventually). I sure do miss being a know it all.

I tried your suggestion but was unsuccessful. Then I realized that is what happens when you present half the information ... which I did miss something. SCSI ....

So in accordance with your suggestion I booted to the CD1, typed "linux rescue" to enter the rescue mode. I was suprised to find there was no /sbin/grub-install, at whcih point I realized the rescue disk mounted my current install as /mnt/sysimage ... low anb behold there is a /mnt/sysimage/sbin/grub-install ...

so I entered /mnt/sysimage/sbin/grub-install /dev/sda and was told told that is not a vaild option. I typed grub-install --help and tired all the optiions and still have a WindowsXP only system.

LMAO ... I should have re-installed ... it would have been done an hour ago. Anyway, I have come this far as may as well get used to troubleshooting again. Do you have any more ideas? I am goign to get a whiskey on the rocks ... no rush

Andrew Benton 04-16-2004 05:03 PM

If you have a bootable CD that has grub on it (I always use my old faithfull Mandrake 9.1) press whatever buttons you have to to get to the command prompt and then type

grub

If grub is in your path that should take you to a grub prompt. Enter

> root (hd0,7)

That would be for /dev/hda8 . Grub counts from 0 so the 8th partition is 7 to grub and it uses numbers not letters so /dev/hdb5 would be (hd1,4). You need to tell it where the root partition is so it can find /boot/grub/menu.lst
If that went OK tell it to install itself on the MBR

> setup (hd0)

and then quit.

>quit

Good luck.

michaelk 04-16-2004 05:04 PM

Try the following:
chroot /mnt/sysimage
grub-install


All times are GMT -5. The time now is 05:41 AM.