GRUB cant boot windows XP.
Hi, hope you lot can help me fix this. My trouble is that I have XP Pro installed on my SATA drive, MBR is as XP installed. If i choose (in BIOS) to boot straight from SATA then XP works. I also have Fedora 3 in a seperate disc (normal ATA) and can boot linux if i choose to boot straight to this drive too.
Hi, hope you lot can help me fix this.
My trouble is that I have XP Pro installed on my SATA drive, MBR is as XP installed. If i choose (in BIOS) to boot straight from SATA then XP works.
I also have Fedora 3 in a seperate disc (normal ATA) and can boot linux if i choose to boot straight to this drive too. I installed GRUB onto the ATA disc with Fedora, and told the BIOS to boot from the ATA. During installation i told GRUB where windows was and set it to the default boot option.
Now when i boot i get grub, can select Fedora and boot it, but if i choose Windows it fails to boot. Anyway i can point GRUB to
Windows?
My trouble is that I have XP Pro installed on my SATA drive, MBR is as XP installed. If i choose (in BIOS) to boot straight from SATA then XP works.
I also have Fedora 3 in a seperate disc (normal ATA) and can boot linux if i choose to boot straight to this drive too. I installed GRUB onto the ATA disc with Fedora, and told the BIOS to boot from the ATA. During installation i told GRUB where windows was and set it to the default boot option.
Now when i boot i get grub, can select Fedora and boot it, but if i choose Windows it fails to boot. Anyway i can point GRUB to
Windows?
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.
Responses to this topic
Just thought, had Mandrake 10.0 previosly and it boot loader (LILO I think) had no trouble booting either
I just got a sata drive and am still scratching my head. Where did you tell grub to boot Windows from? Specifically, what was the drive designation, hda1, or otherwise?
What I am interested in is where does Mandrake see the sata drive at? Hopefully I can learn something in the process as well. Sata drives should be seen as a designaton other than hda??? dependant on the sata hardware on the motherboard.
This will help identify where to tell grub to boot from.
What I am interested in is where does Mandrake see the sata drive at? Hopefully I can learn something in the process as well. Sata drives should be seen as a designaton other than hda??? dependant on the sata hardware on the motherboard.
This will help identify where to tell grub to boot from.
I believe that when i was installing fedora i pointed Grub to windows at a harddrive with an s in it, (sa1 or something i believe) I also dont know how to login as root, tried to login as su but it wont work. I cant change menu.list as a normal user!
Just fiqured out that the root username is root and so thought i would post my grub.conf here.
# 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 (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdc1
# initrd /boot/initrd-version.img
#boot=/dev/hdc
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.667)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title Microsoft Windows XP Pro
rootnoverify (hd2,0)
chainloader +1
title Other
rootnoverify (hd0,1)
chainloader +1
As you can see XP Pro is pointing to hd2,0 (but i think it should be sa1 (would the MBR be sa1,0)?
What do you make of it all?
# 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 (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdc1
# initrd /boot/initrd-version.img
#boot=/dev/hdc
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.667)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title Microsoft Windows XP Pro
rootnoverify (hd2,0)
chainloader +1
title Other
rootnoverify (hd0,1)
chainloader +1
As you can see XP Pro is pointing to hd2,0 (but i think it should be sa1 (would the MBR be sa1,0)?
What do you make of it all?
Tried (sa1,0) and no luck
Dont have a clue!
Dont have a clue!
Since i don't have XP on sata, I am not sure, but try something like this...
Remember, that grub sees the first partition on a master drive as (hd0,0).
Linux will say that the drive is hda1.
Grub starts with "0" and Linux starts the partition series as "1"
So, if the drive is seen as sa1 by linux, then the proper entry might be (sa0,0) since grub uses "0" to see the first partition, not "1"
Let's try this. Get into a console window and type in dmesg
Scroll up until you see an entry for the drive.
You can also go to the console as root uer and type in fdisk -l (that's the letter l, not the number 1) and see what the drive and partition structure looks like.
Sometimes sata will be seen as hde, which is very much like using a raid connection for an ide drive.
Let us know what you find out. I think that we are getting closer. but I admit my knowledge of sata is not good, so perhaps someone else has the proper answer right off.
Remember, that grub sees the first partition on a master drive as (hd0,0).
Linux will say that the drive is hda1.
Grub starts with "0" and Linux starts the partition series as "1"
So, if the drive is seen as sa1 by linux, then the proper entry might be (sa0,0) since grub uses "0" to see the first partition, not "1"
Let's try this. Get into a console window and type in dmesg
Scroll up until you see an entry for the drive.
You can also go to the console as root uer and type in fdisk -l (that's the letter l, not the number 1) and see what the drive and partition structure looks like.
Sometimes sata will be seen as hde, which is very much like using a raid connection for an ide drive.
Let us know what you find out. I think that we are getting closer. but I admit my knowledge of sata is not good, so perhaps someone else has the proper answer right off.
Maybe this can help :
If you have installed Windows on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command map (see map), like this:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
(from: http://www.gnu.org/software/grub/manual/html_node/DOS-Windows.html#DOS%2fWindows)
If you have installed Windows on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command map (see map), like this:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
(from: http://www.gnu.org/software/grub/manual/html_node/DOS-Windows.html#DOS%2fWindows)
Hello people.
Used dmesg and fdisk -l to gather drive information. Both report my sata as sda (with partition sda1 (where windows is) using system sfs) and a second partition sda2 (that little 8Mb partition that windows doesnt format). Tried these in grub.conf and no luck
Using the command line in grub and the geometry command i get the following:
hd0 = linux harddrive
hd1 = Windows harddrive (SATA)
hd2 = further drive
so i tried pointing Grub to hd1. no use!
i got an unrecognised format/file system type error! (Could this mean that GRUB cant boot from NTFS?)
then i did hd1,0 hd1,1 and hd1,2 (also all no use!)
I am going to try the Grub map (hd0)(hd1) line now!
Used dmesg and fdisk -l to gather drive information. Both report my sata as sda (with partition sda1 (where windows is) using system sfs) and a second partition sda2 (that little 8Mb partition that windows doesnt format). Tried these in grub.conf and no luck
Using the command line in grub and the geometry command i get the following:
hd0 = linux harddrive
hd1 = Windows harddrive (SATA)
hd2 = further drive
so i tried pointing Grub to hd1. no use!
i got an unrecognised format/file system type error! (Could this mean that GRUB cant boot from NTFS?)
then i did hd1,0 hd1,1 and hd1,2 (also all no use!)
I am going to try the Grub map (hd0)(hd1) line now!
The unrecognised format/file system type error thing i mentioned actually appeared as this in grub:
Error 13: Invalid or Unsupported executable format.
And swapping (ie map (hd0)(hd1)) doesnt make a difference.
Error 13: Invalid or Unsupported executable format.
And swapping (ie map (hd0)(hd1)) doesnt make a difference.
No the problem is not booting from NTFS, it's the way sata is handled by the bios and if the bios is also set up to enable sata raid, as well. I need to think about this.
The drive swap technique would work, I think, except for the issue, as noted in the reference that fousage made;
Quote:Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won't work.
Let me think about this some more.
One more issue that I thought of. What does the file /boot/grub/device.map say the valid drives are on the system?
Does it say that hd1 or hd2 is /dev/sda?
BTW, what motherboard is this; or what system - HP or Compaq by any chance? This may give me a clue.
The drive swap technique would work, I think, except for the issue, as noted in the reference that fousage made;
Quote:Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won't work.
Let me think about this some more.
One more issue that I thought of. What does the file /boot/grub/device.map say the valid drives are on the system?
Does it say that hd1 or hd2 is /dev/sda?
BTW, what motherboard is this; or what system - HP or Compaq by any chance? This may give me a clue.
Found this very good and looong description for booting from sata and any other dev
http://www.linuxquestions.org/questions/showthread.php?s=&threadid=237511
http://www.linuxquestions.org/questions/showthread.php?s=&threadid=237511
IT WORKS!!!!!!!.
The device map says that /dev/sda as (hd1)
so i recheck grub.conf
and then read all the way through that HUGE article. In the article i noticed that the author says that there should be a space between my "map (hd0)(hd1)" so i change it to "map (hd0) (hd1)". I do this on both map lines. I change "rootnoverify" to "root" as the article suggests and also enter the "makeactive" line. My grub.conf now reads like this:
#
# 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 (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdc1
# initrd /boot/initrd-version.img
#boot=/dev/hdc
default=1
timeout=8
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.667)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title Microsoft Windows XP Pro
root (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
makeactive
chainloader +1
As for the motherboard i was using it is an ABIT AV8.
It has a SATA controller on board, but i dont use RAID as I have only connected one HD to it.
Who would have thought that a couple of spaces would cause so much trouble. I must pay more attention to SYNTAX in the future!!
The device map says that /dev/sda as (hd1)
so i recheck grub.conf
and then read all the way through that HUGE article. In the article i noticed that the author says that there should be a space between my "map (hd0)(hd1)" so i change it to "map (hd0) (hd1)". I do this on both map lines. I change "rootnoverify" to "root" as the article suggests and also enter the "makeactive" line. My grub.conf now reads like this:
#
# 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 (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdc1
# initrd /boot/initrd-version.img
#boot=/dev/hdc
default=1
timeout=8
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.667)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title Microsoft Windows XP Pro
root (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
makeactive
chainloader +1
As for the motherboard i was using it is an ABIT AV8.
It has a SATA controller on board, but i dont use RAID as I have only connected one HD to it.
Who would have thought that a couple of spaces would cause so much trouble. I must pay more attention to SYNTAX in the future!!