LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 06-21-2004, 07:44 PM   #1
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Rep: Reputation: 0
Reinstalled WinXP -> dual boot w/ RedHat9 doesn't work


Hi everyone,

I had a dual boot with WinXP / RedHat9 and grub (the standard setup when installing Windows first and then RedHat). But, then I reinstalled WinXP and probably overwrote the MBR. I don't know how to recover the MBR.

If go into the rescue mode (by booting from RH CDs) my root partition is mounted under /mnt/sysimage so the Linux is still there.

If I go into the interactive setup and tried to update the existing linux partition on /dev/hda3 and get an error message: "can't enable swap partition /dev/hda3"

If boot from a RH boot disk, I get the syslinux boot prompt and if:
- I press enter and go with the default I get "kernel panic. try passing on init= to kernel"
- 'Linux -boot=/dev/hda -root=/dev/hda3' it goes for 30 seconds and stops because it "can't find driver hda"

Does this make sense to anyone?

I have a feeling that this should be easy and I'm just making it complicated because I don't know enough.

I would appreciate any help,

Toshi
 
Old 06-21-2004, 11:54 PM   #2
lpletch
LQ Newbie
 
Registered: Jun 2004
Posts: 8

Rep: Reputation: 0
You should be able to reinstall grub from the rescue disc.

Your original configuration file for grub should also be still in one piece.

# /sbin/grub-install /dev/hda

# reboot
 
Old 06-22-2004, 08:36 AM   #3
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks.

I went into the rescue mode and:
chroot /mnt/sysimage
/sbin/grub-install /dev/hda
Grub-install prompted that the installation was successful. I reboot the computer and it still boots to WinXP... However, just before WinXP start loading, I can see some text which looks like grub, bur only for a half second.
WinXP and RedHat are on the same hard drive and /boot/grub/grub.conf:

default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hda=ide-scsi
initrd /initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,0)
chainloader +1

I really appreciate your help,

Toshi
 
Old 06-22-2004, 10:26 AM   #4
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Original Poster
Rep: Reputation: 0
Ok. It's fixed now. The Linux partition apperently "moved" from hda2 to hda3, so I just had to change hd(0,1) to hd(0,2) in grub.conf.

Thanks,

Toshi
 
  


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
dual boot info lost after reinstalled win2k chrislee8 Linux - Software 4 10-22-2004 09:55 PM
I'm can't get dual boot to work on MD10.0 and WINXP. richsobi Mandriva 1 06-12-2004 06:30 PM
dual boot with redhat9&winXP scarabs Linux - Newbie 6 03-20-2004 03:30 PM
Reinstalled Windows 98 lost linux dual boot llefty Linux - Newbie 0 08-01-2003 12:23 AM
WinXP/Redhat9 Dual Boot Problems new_user10 Linux - Newbie 2 06-22-2003 03:15 PM

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

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