Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Grub won't boot Windows XP...


  • Please log in to reply

#1
UV_Power

UV_Power

    Member

  • Member
  • PipPipPip
  • 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.

Here is the relevant output when I type fdisk -l:

Disk dev/sda: 80.0GB ...
...
...
...

Device	 Boot   Start End Blocks Id	 System
/dev/sda1   *	 ...................	 HPFS/NTFS

Disk dev/sdb: 100.0GB ...
...
...
...

Device	 Boot   Start End Blocks Id	 System
/dev/sdb1		 ...................	 Linux swap / Solaris
/dev/sdb2   *	 ...................	 Linux
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.

Thanks in advance! :)

Edited by UV_Power, 29 August 2009 - 09:07 PM.

  • 0

Advertisements


#2
hawklord

hawklord

    Member

  • Member
  • PipPipPip
  • 400 posts
change this

title Windows XP
	map (hd0) (hd2)  
	map (hd2) (hd0)  
	rootnoverify (hd0,0)
	makeactive	   
	chainloader +1

to this

title Windows XP
	map (hd0) (hd2)  
	map (hd2) (hd0)  
	rootnoverify (hd2,0)
	makeactive	   
	chainloader +1

notice that rootnoverify has changed on the first hd
  • 0

#3
hawklord

hawklord

    Member

  • Member
  • PipPipPip
  • 400 posts
you may find an ntldr missing error - no worries, just let me know what happens
  • 0

#4
UV_Power

UV_Power

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 391 posts
I made the changes and now when I select "Windows XP" it says this

Error 21: Selected disk does not exist

Press any key to continue...

When I hit enter, it brings me back to the GRUB menu.
  • 0

#5
hawklord

hawklord

    Member

  • Member
  • PipPipPip
  • 400 posts
its ok, no worries,

is the fdisk -l output your current one ?

you have 2 hdd's, which is master ?
  • 0

#6
UV_Power

UV_Power

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 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:
GRUB Loading stage1.5.

GRUB loading, please wait...
Error 17

  • 0

#7
hawklord

hawklord

    Member

  • Member
  • PipPipPip
  • 400 posts
ok,

so you are booting fedora first with grub installed to the fedora drive - which is slave = sdb,

windows and ntldr are installed on the master drive = sda,

can you boot to fedora at all ?

to make this a little easier, can you post your /boot/grub/menu.lst (list not first)
(if you can't boot fedora then you can use the live cd to access the file - assuming you have the live cd)
  • 0

#8
UV_Power

UV_Power

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 391 posts
Yes. I can boot to Fedora just fine, through GRUB and through the Live DVD. It's Windows that's giving me trouble.

Here is my entire menu.lst:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#		  all kernel and initrd paths are relative to /, eg.
#		  root (hd1,1)
#		  kernel /boot/vmlinuz-version ro root=/dev/sdb2
#		  initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=15
splashimage=(hd1,1)/boot/grub/splash.xpm.gz
title Fedora 10
	root (hd1,1)
	kernel /boot/vmlinuz-2.6.27.30-170.2.82.fc10.i686 ro root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rhgb quiet selinux=0
	initrd /boot/initrd-2.6.27.30-170.2.82.fc10.i686.img
title Windows XP
	map (hd0) (hd2)
	map (hd2) (hd0)
	rootnoverify (hd2,0)
	makeactive
	chainloader +1
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.

Edited by UV_Power, 31 August 2009 - 04:30 AM.

  • 0

#9
hawklord

hawklord

    Member

  • Member
  • PipPipPip
  • 400 posts
ok,

change

title Windows XP
	map (hd0) (hd2)
	map (hd0) (hd2)
	rootnoverify (hd2,0)
	makeactive
	chainloader +1

to this

title Windows XP
	map (hd1) (hd0)
	map (hd0) (hd1)
	rootnoverify (hd0,1)
	makeactive
	chainloader +1

let me know how you get on
  • 0

#10
UV_Power

UV_Power

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 391 posts
I made the changes and now it says:

Error 22: No such partition
Press any key to continue...


This message appears before the GRUB menu loads.

However, I got a little impatient and I decided to try changing this:

map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd0,1)

to this:

map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd0,0)

...but as it turns out, that was a very stupid thing for me to do. Because now, without any GRUB menu, I get this error:

Error loading operating system

I keep getting this error message no matter what settings I have in the menu.lst

I looked at the output of fdisk -l and I noticed something new. Originally, it said this:
Disk dev/sda: 80.0GB ...
...
...
...

Device	 Boot   Start End Blocks Id	 System
/dev/sda1   *	 ...................	 HPFS/NTFS

...but now it says this:
Disk dev/sda: 80.0GB ...
...
...
...

Device	 Boot   Start End  Blocks  Id	 System
/dev/sda1		 ...................	   HPFS/NTFS
/dev/sda4   *		 1   1	   0   0	 Empty	  <~~~~~~~~NEW!
Partition 4 does not end on cylinder boundary		  <~~~~~~~~NEW!

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 :)
  • 0

Advertisements


#11
hawklord

hawklord

    Member

  • Member
  • PipPipPip
  • 400 posts
can you still boot windows without grub ?,

grub sees hd0,0 as first hard drive, first partition,
  • 0

#12
UV_Power

UV_Power

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 391 posts

can you still boot windows without grub ?

No, I've never been able to do this.

Here is my current status:

If I boot from 80GB drive, I get this message:
Error loading operating system

If I boot from 100GB drive, I get this message:
GRUB Loading stage1.5.

GRUB loading, please wait...
Error 17
Either way, I can't get into Windows or Fedora. And now I can't even get a GRUB selection screen.
  • 0

#13
hawklord

hawklord

    Member

  • Member
  • PipPipPip
  • 400 posts
error 17 is a messed up partition table,

in your first post you said you can boot windows,

At this point I could boot straight into Windows, but I couldn't boot into Fedora.


have you changed boot order in your bios ?

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

I tried repairing GRUB. Using "rescue mode" from a Fedora 11 Live DVD, I used grub-install.


  • 0

#14
UV_Power

UV_Power

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 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"?
  • 0

#15
hawklord

hawklord

    Member

  • Member
  • PipPipPip
  • 400 posts
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.


from post 12

can you still boot windows without grub ?

No, I've never been able to do this.


do you mean you changed the boot order in grub ?

has windows got its bootloader in the mbr of its own drive ?
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP