Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-27-2004, 07:15 AM   #1
LQ Newbie
Registered: Apr 2004
Distribution: Gentoo & Red Hat
Posts: 1

Rep: Reputation: 0
Grub: how to recover Boot Record for (hd0,0)?


I have Gentoo & RedHat Linux running on my laptop which came installed with Win XP. While doing "emerge world", I found myself having to re-setup grub. Now, I can boot my Linuxes but not XP (yes, I know, "So what's the problem?

The scenario: XP is on /dev/hda1 (NTFS), my boot partition is /dev/hda5 and is set up to be used by RedHat and Gentoo (different kernels in different subdirectories).

What I did at first: while running grub, I confused (hd0) with (hd0,0):
> root (hd0,4)
> setup (hd0,0)
When this didn't work, I did what I actually meant to do (write to MBR):
> root (hd0,4)
> setup (hd0)
After this, grub starts fine when booting, all the Linuxes boot, but when I try to chainload Win XP, it keeps returning to grub (since I accidentally installed it on (hd0,0)).

Is there a way to clean up (hd0,0) without erasing partitions? I know that the Windows programs FDISK and FIXMBR can rewrite the MBR, but I really want to avoid screwing up my data.

Thanks in advance for any help.


PS: Here's the grub.conf, but I'm quite sure it's not the problem since it was working previously.

# grub.conf generated by anaconda
title Red Hat 9.0 (2.4.20-8)
root (hd0,4)
kernel /RedHat/vmlinuz-2.4.20-8 ro root=LABEL=/RH9.0 hdc=ide-scsi pci=biosirq
initrd /RedHat/initrd-2.4.20-8.img

title Gentoo
root (hd0,4)
kernel /Gentoo/bzImage-2.4.25 ro root=/dev/hda7 hdc=ide-scsi pci=biosirq

title Windows XP
rootnoverify (hd0,0)
chainloader +1
Old 04-27-2004, 10:43 AM   #2
Registered: Feb 2004
Location: Paris
Posts: 398

Rep: Reputation: 31
Not sure, but that's what I would try :
1) Boot on the Win XP CD, it will perform a repair install, repairing the MBR and XP will boot.
2) Then boot on the Linux CD, it will repair the LILO config. I am using LILO (and not Grub) on Mandrake but your Linux should not be so different.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
remove GRUB from windows partition boot record Krun Linux - Newbie 3 09-13-2007 05:51 PM
grub; hda1 == root(hd0,0) ; hda5 = ???? stupidloser Linux - General 6 12-05-2004 02:26 AM
removing grub from the Master boot record olubone Linux - Software 1 11-16-2003 04:06 PM
Grub can't find files on (hd0,0) nathology Linux - Software 6 10-24-2003 11:53 AM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 03:22 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:52 PM.

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