LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-19-2005, 05:23 AM   #1
Nilesh.Shah
LQ Newbie
 
Registered: Mar 2005
Location: Mumbai, India
Distribution: RHEL 4
Posts: 29

Rep: Reputation: 15
Restore GRUB


Hello all,


I have done this but cannot figure it out. Reinstalling XP has overwritten the MBR. I dont know thats the commands that you need to type in using CD 1. Its Linux rescue or something else.

A detailed instructions/commands on this would be much appreciated.



Thanks & Regards
Nilesh
 
Old 04-19-2005, 05:39 AM   #2
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
What distribution do you use? On SUSE e.g. you have an option to repair your system, which will restore grub automatically.
 
Old 04-19-2005, 10:17 AM   #3
xukosky
Member
 
Registered: Apr 2005
Distribution: Becoming Sid
Posts: 142

Rep: Reputation: 16
You can easily restore grub using a live cd distro like knoppix or ubuntu live cd

Step 1: Log in a root console.
Step 2: Execute "grub".
Step 3: In the grub shell just type:

root (hd0, 3)
setup (hd0)

Where hd0 is your first hard disk and you have linux installed on the fourth partition of that disk (the first is numbered as 0), just change it to your settings.

Maybe you can find any problems while trying to restore grub, then come back with the message errors and tell us.
 
Old 04-19-2005, 11:41 AM   #4
Nilesh.Shah
LQ Newbie
 
Registered: Mar 2005
Location: Mumbai, India
Distribution: RHEL 4
Posts: 29

Original Poster
Rep: Reputation: 15
Sorry for the incomplete information. I am using Redhat 9.
 
Old 04-19-2005, 11:55 AM   #5
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
So you need to do it the way xukosky suggested. You can use the rescue system from your CD1.
Here is a nice grub manual:
http://portal.suse.com/sdb/en/2002/0..._overview.html
It is written for SUSE sytems, but the commands should be the same in RedHat. The file menu.lst is called grub.conf in RedHat (AFAIK).

Make sure you know on which partition your kernel is located (this will be the above mentioned root).
 
Old 04-19-2005, 11:58 AM   #6
jojotx0
Member
 
Registered: Mar 2004
Distribution: Debian Lenny
Posts: 181

Rep: Reputation: 30
1> Boot RH9 Disc 1 CD
2> Type in linux rescue at RH9 Disc 1 boot screen
3> Type chroot /mnt/sysimage at the rescue console
4> Type grub-install /dev/hda
5> type exit 2x with the CD ejected from the CDROM drive
6> Have fun with GRUB
 
Old 01-09-2010, 11:43 AM   #7
Xerom
LQ Newbie
 
Registered: Jul 2003
Location: Redondo Beach, CA
Distribution: Fedora 12
Posts: 2

Rep: Reputation: 1
Sorry for posting to an old thread but I spent 3hrs searching till I found this post which fixed my system after XP install wiped grub from my mbr.

For my sata drive I had to type
grub-install /dev/sda


-restore grub after windows install-
Insert fedora install dvd, select recovery mode.
After hardware/os detection you'll get a command prompt, run these commands:

[root@eos ~]# chroot /mnt/sysimage
[root@eos ~]# grub-install /dev/hda

OR depending on your system..

[root@eos ~]# grub-install /dev/sda
 
1 members found this post helpful.
  


Reply



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
Grub Restore roopunix Linux - Networking 5 08-29-2005 05:29 PM
Help! Need to restore GRUB after ruining it with XP lamiczka Linux - Software 1 03-22-2005 09:35 AM
Install another MS OS and restore Grub? luwigie Linux - General 5 08-30-2004 01:30 PM
Restore Grub Help gackt3541 Linux - General 8 06-06-2004 04:17 PM
How can I restore GRUB ? xtrips Linux - Software 5 07-30-2003 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:30 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
Open Source Consulting | Domain Registration