Windows XP won't boot from GRUB2

If none of the more specific forums is the right place to ask

Windows XP won't boot from GRUB2

Postby mauserrifle » 2009-09-22 08:42

Hi all,

I've installed grub2. After installing i've installed os-prober and ran update-grub2. Windows XP get's detected perfectly.
When i reboot and choose Windows XP from grub2, Windows says it can't locate ntoskrnl.exe. Why is this? When I retry with grub legacy, everything works perfectly.

Hope someone is familiar with this and knows a solution!

Regards,
Maurice
mauserrifle
 
Posts: 7
Joined: 2009-09-04 16:56

Re: Windows XP won't boot from GRUB2

Postby jheaton5 » 2009-09-22 13:45

Install os-prober then run update grub. Check /boot/grub/grub.cfg to see if one of the menu items is windows. You have to be logged in as superuser to open grub.cfg.
debian sid
User avatar
jheaton5
 
Posts: 1489
Joined: 2008-08-20 01:40
Location: Newnan, GA, USA

Re: Windows XP won't boot from GRUB2

Postby mauserrifle » 2009-09-22 14:37

Yes it's there and it works from grub legacy.

Code: Select all
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/hda3)" {
        insmod ntfs
        set root=(hd0,3)
        search --no-floppy --fs-uuid --set 04e8b26fe8b25e9c
        drivemap -s (hd0) ${root}
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

It's just i cant boot windows XP from grub2 chainloader. Windows gives ntoskrnl.exe error.
mauserrifle
 
Posts: 7
Joined: 2009-09-04 16:56

Re: Windows XP won't boot from GRUB2

Postby jheaton5 » 2009-09-22 14:48

I had a similar issue yesterday. The chainloader to grub2 would not recognize any os other than the partition it was installed on. I had to remove grub-legacy and install grub2 before it would recognize my other os. to install grub2 use
Code: Select all
# aptitude install grub-pc


I hope this helps.
debian sid
User avatar
jheaton5
 
Posts: 1489
Joined: 2008-08-20 01:40
Location: Newnan, GA, USA

Re: Windows XP won't boot from GRUB2

Postby mauserrifle » 2009-09-22 16:36

Well mine did recognize all my OS'es. But because u mentioned removing legacy fixed your problems i didn't hesitated anymore and used:

Code: Select all
upgrade-from-grub-legacy

Windows XP can now boot fine. So it seems to be not working when running through the chainloader. I guess this will effect more people when they want to test their new grub2 and might keep them away from it :(

Anyway 'don't be scared and just upgrade' fixed it.

thank you!
mauserrifle
 
Posts: 7
Joined: 2009-09-04 16:56

Re: Windows XP won't boot from GRUB2

Postby jheaton5 » 2009-09-22 17:16

Yes, I think there should have been documentation sent out with the upgrade. But, if you google grub2 you don't get much in the way of instructions you can understand.

I'm glad you got it to work.
debian sid
User avatar
jheaton5
 
Posts: 1489
Joined: 2008-08-20 01:40
Location: Newnan, GA, USA

Re: Windows XP won't boot from GRUB2

Postby armandojnc » 2009-10-13 18:32

Grub legacy did boot
but not Grub2 chainloader on my 2 hard disk PC

upgrade-from-grub-legacy

did not work

I did the os-probe and update-grub and it made a /boot/grub/grub.cfg that is identical everytime


I went back to grub-legacy
Some command maybe missing because it is not a single drive system
armandojnc
 
Posts: 3
Joined: 2009-10-13 18:08

Re: Windows XP won't boot from GRUB2

Postby Bulkley » 2009-10-13 19:12

Is Windows on a separate drive?

This may be a long shot but several of us have found that grub2 has difficulty with BIOS settings. If you have two or more drives, you may have to make BIOS changes. Grub-legacy simply cruised through BIOS configurations but grub2 does not. BIOS has to be correct.
Bulkley
 
Posts: 5940
Joined: 2006-02-11 18:35

Re: Windows XP won't boot from GRUB2

Postby faziaty » 2009-10-13 19:24

Maybe try this one:
I have this working perfectly, and it looks less complicated than your code.
Yes, XP boots off NTFS partition.

Code: Select all
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda3
title      Microsoft Windows XP Professional
root      (hd0,2)
savedefault
makeactive
chainloader   +1


EDIT: just noticed you guys talk about Grub 2...
Bravo my perceptiveness... ;)
User avatar
faziaty
 
Posts: 44
Joined: 2009-10-09 14:55
Location: Poland

Re: Windows XP won't boot from GRUB2

Postby armandojnc » 2009-10-15 17:02

Windows is on a separate drive

It boots from grub legacy
but when i try grub2 it does not boot:
    not from the chainload list it gives to test
    and not when i did
    upgrade-from-grub-legacy

that's why i went back to grub legacy
armandojnc
 
Posts: 3
Joined: 2009-10-13 18:08

Re: Windows XP won't boot from GRUB2

Postby Insoo » 2009-10-17 23:49

Try to add following menuentry under other menuentries at /boot/grub/grub.cfg
It assumes that XP is installed at the first partition fo the first hdd.

menuentry "WinXP" {
set root=(hd0, 1)
insmod chain
chainloader +1
}

Good luck!
Insoo
 
Posts: 1
Joined: 2009-10-17 23:37

Re: Windows XP won't boot from GRUB2

Postby glct12 » 2009-12-16 01:56

i had same problem booting in winxp from GRUB2, but your simple solution
solved it.
Thank you Insoo
glct12
 
Posts: 1
Joined: 2009-12-16 01:51


Return to General Questions

Who is online

Users browsing this forum: Lysander and 10 guests

fashionable