LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2005, 04:39 AM   #1
samjkd
LQ Newbie
 
Registered: Mar 2005
Location: india
Posts: 17

Rep: Reputation: 0
Grub


Hai

i am having windows xp and redhat linux 9.0 on my pc. both were booting from grub loader.i recently re-installed xp, after that i can't find my grub loader. xp resides on hda1 and linux on hda3. is there any method to recover my grub loader.

Last edited by samjkd; 03-11-2005 at 04:40 AM.
 
Old 03-11-2005, 05:11 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there
boot into rescue mode from ur PC

at the end run

chroot /mnt/sysimage

and u will dropped to a shell of ur redhat system
to reinstall grun run

grub-install /dev/hda

this will install grub on the MBR of hda

regards
 
Old 03-11-2005, 05:12 AM   #3
I_Wanna_Kno
LQ Newbie
 
Registered: Mar 2005
Location: India
Distribution: Red Hat 8.0
Posts: 11

Rep: Reputation: 0
This is not very intelligent option, but try installing RH9 all over again(DUH !!?). But it surely works.
 
Old 03-11-2005, 05:13 AM   #4
Lazarus
Member
 
Registered: Dec 2001
Location: Kent in UK
Distribution: Fedora 2
Posts: 170

Rep: Reputation: 30
windows always overwrites the boot sector. It thinks its the only OS.

If you can boot your linux partition with a floppy, or failing that if you have a copy of knoppix boot into linux.

run grub-install /dev/hda

Look at /boot/grub/menu.conf

There should be an entry for windoze, if it helps here is a copy of my menu.conf as an example

#
# This is copied to grub.conf when makeing boot floppies
#
# written 2nd May 2002
#
title hda1 (linux)
root (fd0)
kernel /boot/vmlinuz ro root=/dev/hda1
title hda2 (linux)
root (fd0)
kernel /boot/vmlinuz ro root=/dev/hda2
title cdrom
root (fd0)
kernel /boot/vmlinuz ro root=/dev/hdc init=/sbin/recover
title windows or dos partition 1
rootnoverify (hd0,0)
chainloader +1
title windows or dos partition 2
rootnoverify (hd0,1)
chainloader +1
title floppy ... hit enter after invalid system disk
# note floppy is set to fd1 because on cd boot
# fd0 is used by the boot image
rootnoverify (fd1)
chainloader +1


Good luck!
 
Old 03-11-2005, 05:15 AM   #5
gerardt
Member
 
Registered: Feb 2005
Location: South Africa
Distribution: SuSE
Posts: 60

Rep: Reputation: 15
From your rescue environment, find your boot and root partitions (if they are different) mount the root under /mnt and if there is a boot mount that under /mnt/boot.

Run grub-install --root-directory=/mnt /dev/hd? (where ? is the letter of your drive.)

You may have to set up your MS boot stanza in grub.conf
 
Old 03-11-2005, 05:15 AM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
Quote:
Originally posted by I_Wanna_Kno
This is not very intelligent option, but try installing RH9 all over again(DUH !!?). But it surely works.
what option are u talking about??
 
  


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
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 09:01 PM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 09:33 AM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 09:13 PM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 05:55 AM
1st HDD = RH9.0 (grub) ... How do I modify grub when adding 2nd hard disk ? Onyx^ Linux - Software 1 09-05-2003 10:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:52 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