LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Gentoo: Grub: Can't boot Windows XP (http://www.linuxquestions.org/questions/linux-software-2/gentoo-grub-cant-boot-windows-xp-667182/)

thursgun 09-02-2008 06:03 PM

Gentoo: Grub: Can't boot Windows XP
 
Ok, this is how my single disk's partitions looks like:

Code:

From hda1 to hda6:
|----PRIMARY-------||---------------LOGICAL----------------------------|
[/boot][swap][/root][extended for logical][windowsXP][many random files]

First I installed Windows on hda4, and set hda1 with NTFS (so windows could manage the MBR..)

Then I installed Gentoo using hda1 (changed fs to ext2), hda2 and hda3. Grub is on hda1. Gentoo boots just fine with Grub.

So, then I added to /boot/grub/menu.lst the following:

Code:

#Windows XP
title windows xp
rootnotverify (hd0,4) #that would be hda5
savedefault
makeactive
chainloader +1

Then reboot, select windows xp and get this:

Code:

Booting 'Windows XP'
rootnotverify (hd0,4)
savedefault
makeactive

Error12: Invalid device requested

Press any key to continue...

How can this be fixed? Did I make something wrong with windows installation?

thursgun 09-02-2008 06:18 PM

Nvm, it seems I never should have installed windows on a logical partition.

http://users.bigpond.net.au/hermanzone/p15.htm#12_

Guess, I'll install from scratch everything again. It was new windows installation anyway.

elprawn 09-02-2008 06:21 PM

I'm pretty sure you have to install Windows XP on a primary partition.

elprawn 09-02-2008 06:23 PM

There's no need for the root and swap partitions of Gentoo to be primary, however.

bcwagne 09-02-2008 09:59 PM

Part of the problem is that Windows likes to think it is on THE partition on the machine, or in other words, it likes to be first, and just expects everything else to be second place (okay, so that was a little prejudiced on my part), so what you have to do is fool windows into thinking it is on the first partition...here is a bit from my menu.lst:

Code:

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

Here grub is, in essence, switching which partition is first and second. Windows is actually on hd1 (which is the second hard drive), and linux is on hd0 (the first hard drive). Grub just tells windows that the first one is the second, and the second is the first, (using the map commands), then tells windows not to check (using the rootnoverify command).

Hope this helps.

Good luck.

syg00 09-02-2008 11:53 PM

Quote:

Originally Posted by thursgun (Post 3267680)
First I installed Windows on hda4, and set hda1 with NTFS (so windows could manage the MBR..)

Then I installed Gentoo using hda1 (changed fs to ext2), hda2 and hda3. Grub is on hda1.

that was a mistake.

Windoze must have a primary partition for install - for the ntldr and associated files. Even when installed into a logical partition this is still required. This is what you chainload to from grub.
Reinstall is the only answer.

No need for the mapping - that isn't required on a single disk.


All times are GMT -5. The time now is 10:32 PM.