LinuxQuestions.org
Visit Jeremy's Blog.
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 11-02-2003, 01:40 AM   #1
ngrover
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Rep: Reputation: 0
drive with grub died, what now?


Hi, can somebody please point me in the right direction? I have two physical hard drives on my machine, one has win2k and the other has RedHat 9.0.....ok cool. Grub was installed on the win2k drive but today that drive died (it started sparking and fried my power supply!!!). No problem, I havn't used windows in 6 months and nothing important was lost. Tomorrow I'll get a new power supply but my problem is, how will I get RedHat to boot? I don't need dual boot, just need RedHat. Is it possible to create a MBR on the linux drive? How do I do this?

Thanks for any advice

Neil
 
Old 11-02-2003, 02:21 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
When you get the machine back up again, you may need to change the hard drive jumpers to MASTER or CABLE SELECT and go into bios to make sure that it is properly detected.

Now, since you don't have a boot loader setup for now and you may not have a linux boot floppy handy, you can use CDROM1 to get back into the system and repair the grub.

Note: You will need to edit the /etc/grub.conf to have the correct location of the Redhat root partition and remove the Windows entry while you're at it.
You also need to edit the /etc/fstab to point to the new location of your swap partition. For example, /dev/hda2 instead of /dev/hdb2


1. Boot your machine from your boot media (cdrom1) and select linux rescue to install to the command prompt.

2. Redhat displays a message “If you would like to make your system the root environment, run the command: chroot /mnt/sysimage”. Go ahead and do that.

3. Get into the grub configuration utility with the command:grub.

· At the prompt grub> type the command: root (hd0,0) ; this will tell grub that the linux files it needs are in the first partition (0) of your first hard disk (hd0). Change this to meet your configuration needs. For instance, if the linux files are on the second partition (1) of the second hard disk (hd1), then type root (hd1,1).

· If you selected the correct location (where linux is installed), you should see a message as follows.... Filesystem type is Ext2fs, partition type is 0x83.

· Then issue the following command: setup (hd0) ; this will install grub in the MBR of your first hard disk. You could change that to use the /boot partition if desired.

· Exit the grub utility with the command: quit

You can also try to use grub-install /dev/hda to install grub on your first hard drive's MBR, but that doesn't always work.

You still need to edit the /etc/grub.conf and /etc/fstab files.

Reboot and try it!
 
Old 11-02-2003, 04:48 PM   #3
ngrover
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Original Poster
Rep: Reputation: 0
man, thanks....i got my machine running today in no time thanks to your excellent and detailed help. it would have taken me a long time to figure that out.

i thank you!
 
  


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
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 09:48 AM
Laptop DVD drive has died, will linux boot from an external drive? Stevetgn Linux - Newbie 2 05-14-2005 06:18 PM
Installed GRUB on 3rd hard drive, how do I boot 1st drive? jesusphreak Linux - Newbie 4 04-06-2005 10:34 AM
hard drive died? Axion Linux - General 2 07-31-2004 11:57 AM
Dual Boot DIlemma - Windows Hard Drive DIed fortezza Linux - Newbie 1 04-04-2003 05:23 PM


All times are GMT -5. The time now is 03:58 PM.

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