LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RH7.3 and WINXP: GRUB can't detect WINXP (https://www.linuxquestions.org/questions/linux-newbie-8/rh7-3-and-winxp-grub-cant-detect-winxp-360092/)

Izza 09-04-2005 11:02 AM

RH7.3 and WINXP: GRUB can't detect WINXP
 
Hi! I'm not exactly a newbie, but I'm not a genius either, so I decided to come here to ask the experts for help. Please? :(

In a nutshell, GRUB can't detect my WINXP partition, but I don't think it's as simple as modifying the boot.conf file.

Here's a more detailed explanation:

I have a 40GB hard disk: 25MB for WINXP (15 for OS and programs, 10 for files only) and 15MB reserved for LINUX. Previously, I was dual booting WINXP and Fedora Core 3, and then I changed to Redhat 9 and then down to Redhat 7.3. (If you're wondering why I'm downgrading, I just want to install a program that runs on older versions of Redhat).

Just recently, before installing RH7.3, I got another 3GB from my remaining space and formatted it as FAT32.

Anyway, both FC3 and RH9 worked fine, but come RH7.3, everything went whack! I don't know if it matters, but I din't create a separate partition for /boot. I didn't create one in FC3 or RH9 before, so I thought this should be okay.

What I think matters, though, is that I wrote GRUB into the MBR. I don't know if this is what I did with RH9 and FC3, but I never booted from the GRUB command line before, so I'm assuming that I did write GRUB into the MBR previously.

I booted the PC and GRUB loaded just fine. It presented me with options whether to run Redhat or DOS (which I assume to be WINXP). I chose DOS and to my surprise, the PC just restarted again! O_o So okay, I ran LINUX and looked for the boot.conf file. It showed something like this:

title DOS
rootnoverify (hda0,5)
chainloader +1

This is weird because WINXP is on hda1, not hda5. hda5 actually contains the 3GB of FAT32. So I edited the boot.conf so it would read (hda0,1) instead of (hda0,5). I rebooted, and chose DOS. I was then faced with a black screen quoting the boot.conf file.

title DOS
rootnoverify (hda0,1)
chainloader +1

O_o I decided to boot from my WINXP CD just to check if my files were still intact, and they are. I also decided to delete the FAT32 partition (nothing was written on it anyway). I rebooted again, this time with the RH7.3 installer. I wanted to reinstall 7.3, this time with every intention of creating a /boot partition, and setting the default to Windows (which I didn't do before).

HOWEVER, when I reached the part where I could select my default boot image, I was presented with the following options:

[ ] /dev/hda1 ntfs (my 15GB winxp partition)
[ ] /dev/hda5 ntfs (my 10GB ntfs partition)
[/] /dev/dha7 ext3 (Redhat linux)

I deselected Redhat and tried to select winxp. TRIED, but I couldn't. And now I'm stuck. So here are my questions because I don't know what to do anymore! :( I've already done a dual boot of winXP and 7.3 before, so I don't know what I did wrong this time.

1. Is my WinXP dead? I don't think so, but it might as well be if I can't load it. :(

2. Is there a way of making GRUB detect my WinXP?

3. If I want WINXP to boot, even without 7.3. Is it safe to use FIXMBR? I've done some online searches, and everyone says to use this, but a friend of mine told me that FIXMBR deleted EVERYTHING. Will FIXMBR delete my files?

4. Is there a safe way of uninstalling 7.3 rather than just deleting its partitions using the WINXP CD? When I changed from FC3 to RH9, I simply deleted the partitions, so when I decided to change from RH9 to RH7.3, I just deleted the partitions again. Do you think this affected my system somehow?

You guys don't have to answer all the questions... Just please suggest a nice solution for me... Please? :D

Thanks in advance!!!

syg00 09-04-2005 11:42 AM

Don't go blaming grub - it doesn't give a sh1t what you have installed in the way of operating system(s). When users blindly rely on installers (anaconda in this case) this sort of thing happens.
The old 7.3 installer apparently doesn't know about ntldr (not so surprising considering how old it is) - so when it finds a partition it *does* know about, I guess it goes with that.

Change your attempt to fix this to
Code:

rootnoverify (hda0,0)
- grub counting is zero-based for both disks and partitions.

If you want to just get XP back, run the fixmbr - ignore your mate.

makuyl 09-04-2005 11:43 AM

Grub starts counting from 0, not 1. So hda1 is (hda0,0)

Oh well, someone was faster :)

Izza 09-04-2005 12:33 PM

Hehe Actually, I tried running everything from the grub command line. I kept typing

chainloader +1 rootnoverify (hda0,n)

where I changed n from 0 to 8.

None of it worked. :( Okay, can anyone just tell me how I'm supposed to uninstall redhat7.3 correctly? I mean, can I just delete the partitions or should I do something else?

Oops! Forgot to say thanks. Thanks for replying! :)

syg00 09-04-2005 05:27 PM

Try it as 2 commands, followed by "boot' - order IS importannt
Quote:

rootnoverify (hda0,0) // now hit "Enter"
chainloader +1 // now hit "Enter"
boot // now hit "Enter"
"Boot" isn't required in a conf file.

There is no uninstall, just delete the partition(s). This will leave you with a non-functional boot-loader - either re-install another distro immediately, or use fixmbr to get a "XP only" solution.

Izza 09-04-2005 06:28 PM

Oh. Okay. :D Thanks! I'll try that. As you have probably noticed, I have never booted from the grub command line before.

IF this does work, is there no way of making GRUB detect the winXP partition automatically? I mean, can I modify the boot.conf so that I would at least have the option of booting windows? Maybe adding something like this:

title WINDOWS
rootnoverify (hda0,0)
chainloader+1

Izza 09-04-2005 10:22 PM

Okay, I tried your suggestion but upon typing:

rootnoverify (hda0,0)

and then hitting enter, I got something like "Error 23: Error in parsing number"... or something along that line. Thanks for the suggestion anyway. :( I guess this means my 7.3 can't detect windows? Ever?

Does anybody else have other ideas?

syg00 09-04-2005 11:33 PM

Sorry - my fault. Should be (hd0,0) - that's what happens when you cut-and-paste without checking. :(

Izza 09-05-2005 07:31 AM

That worked nicely! I didn't exactly get it to work on the grub command line, so I just modified the boot.conf instead and it worked! :D

Thanks so much for all your help. :D


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