Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Grub won't boot Windows XP...

UV_Power

Posted 29 August 2009 - 09:06 PM

UV_Power

Member

Member

391 posts

Hello everyone,

On my laptop, I have two hard drives. One is loaded with Windows XP and the other is loaded with Linux Fedora. I use GRUB to select which OS I want to boot into and it has been working for a long time, but suddenly (for reasons beyond my understanding) when I booted up my computer, instead of the boot menu I would get a "Grub Error 17" message (can't remember exactly what it said). GRUB was installed on the hard drive with Fedora on it, so I bypassed this by switching the primary boot disk to be the Windows drive. At this point I could boot straight into Windows, but I couldn't boot into Fedora.

After doing some research on how to fix this, I tried repairing GRUB. Using "rescue mode" from a Fedora 11 Live DVD, I used grub-install. The contents of the generated /boot/grub/device.map look like this (I decided to use CODE boxes in my post to control the formatting):

(hd0) /dev/sda
(hd1) /dev/sdb

At this point, I was now able to boot into my Fedora partition just fine, but now I can't boot into my Windows XP partition. D'oh! Whenever I choose to boot Windows via my "repaired" GRUB, I get a black screen for about 2 seconds and then the GRUB boot menu appears again. I can do this over and over with the same result.

Now, after doing some more research, the only thing that everyone keeps suggesting is changing the /boot/grub/menu.lst. Here are those contents, with the lines I added in:

title Windows XP
map (hd0) (hd2) <~~~~~~~added this line
map (hd2) (hd0) <~~~~~~~added this line
rootnoverify (hd0,0)
makeactive <~~~~~~~added this line
chainloader +1

The changes above were based on suggestions considering a single hard drive and two partitions, and I would like to remind everyone that my setup is two different hard drives with a single partition on each.

The only other suggestion I have heard is to use "fixmbr" on the Windows disk and then reload grub, but I also heard that this should be a last resort. So, I thought I would try my luck on G2G before doing so.

hawklord

Posted 30 August 2009 - 12:55 PM

UV_Power

Posted 30 August 2009 - 03:20 PM

UV_Power

Member

Topic Starter

Member

391 posts

is the fdisk -l output your current one ?

Yes.

you have 2 hdd's, which is master ?

The 80GB (dev/sda).

Something else I figured out, if I choose to boot the other hard drive (the 100GB) first, I get the GRUB Error 17 message right away without a menu. I don't know if that helps at all. Here is the message:

I decided to put X's in the place of the hex digits for the UUID. It was probably not necessary to do so, but I am still unsure about what is safe to post to a public forum, so I didn't want to take any chances.

Also, this is the latest of what is written in the menu.lst following different suggestions. The original lines written underneath "title Windows XP" said this:

rootnoverify (hd0,0)chainloader +1

EDIT: Sorry. I mistyped the mappings under Windows XP, but corrected them now.

It appears as if I created an empty partition on the 80.0GB master disk and am choosing to boot from it...? I dunno how to read this. Rather than try to fix this mess (and most likely dig myself deeper), I will just wait for advice on what to do next. I guess this is what happens when I try to jump ahead

UV_Power

Posted 31 August 2009 - 04:47 PM

UV_Power

Member

Topic Starter

Member

391 posts

have you changed boot order in your bios ?

No.

can you put your fedora drive back as master and repair grub

I don't know what you mean by this. This is all on a laptop, and the only experience I have with changing "master/slave" hard drive settings is by using jumpers, but I have only done that on a desktop. Could you clarify what you mean by "put your fedora drive back as master"?

hawklord

Posted 01 September 2009 - 05:46 AM

you stated that grub was installed on the fedora drive and you were using grub to dual boot, which means that this must have been the primary boot drive,

when you switched primary boot drive to the windows drive then you could only boot into windows - which means that the fedora drive (and grub) became slave,windows would use ntldr as its loader

if you return fedora to primary boot and repair grub you should then be able to boot into fedora,

i don't know whats gone on with your windows drive - but i'm a little confused

from post 1

GRUB was installed on the hard drive with Fedora on it, so I bypassed this by switching the primary boot disk to be the Windows drive. At this point I could boot straight into Windows, but I couldn't boot into Fedora.