LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2004, 05:09 PM   #1
slacker9876
Member
 
Registered: Apr 2004
Location: Colorado
Distribution: Ubuntu 6.10, SLED 10
Posts: 119

Rep: Reputation: 15
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?
 
Old 04-16-2004, 05:16 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
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
 
Old 04-16-2004, 05:53 PM   #3
slacker9876
Member
 
Registered: Apr 2004
Location: Colorado
Distribution: Ubuntu 6.10, SLED 10
Posts: 119

Original Poster
Rep: Reputation: 15
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

Last edited by slacker9876; 04-16-2004 at 05:57 PM.
 
Old 04-16-2004, 06:03 PM   #4
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
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.
 
Old 04-16-2004, 06:04 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,426

Rep: Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938
Try the following:
chroot /mnt/sysimage
grub-install
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accidentally overwrote MBR - Grub rrc124 Linux - Newbie 2 05-20-2005 01:24 AM
windows overwrote my mbr c-- Linux - Newbie 5 03-30-2005 02:23 PM
How to get GRUB from MBR boot the kernel in CD? DrRider Linux - Software 5 03-01-2005 11:19 PM
winxp overwrote MBR :( rohan208 Red Hat 5 05-17-2004 09:05 AM
mdk overwrote MBR without warning!! frankae Linux - General 21 03-03-2003 01:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration