Peter Humphrey <prh@...> posted
200710280822.59398.prh@..., excerpted below, on Sun, 28 Oct
2007 08:22:59 +0000:
> On Saturday 27 Oct 2007, Julien Cassette wrote:
>> I needed to install Windows XP on a logical partition, but I found that
>> it can't boot from such a partition because NTLDR needs to be installed
>> on a primary one.
>> So I set up the following partition scheme:
>> /dev/sda1 ext3 Gentoo root
>> /dev/sda2 ntfs NTLDR
>> /dev/sda4 Extended
>> /dev/sda5 ext2 Gentoo portage
>> /dev/sda6 swap Gentoo swap
>> /dev/sda7 ext3 Gentoo home
>> /dev/sda8 ntfs Windows XP
>> Win xp installed and booted without problem
> This is interesting. I've had various versions of Windows on various
> machines over the years and I've never managed to get grub to start
> Windows unless Windows was on the first primary partition. Yet in your
> case no part of Windows is on the first primary partition. What's your
> secret? Or has the latest version of grub been fixed in this respect?
By the time I switched to GRUB, I was off of MS/proprietaryware forever
(or at least until it's no longer proprietary- aka slaveryware), but back
on LILO, and from the GRUB documentation and what I've read of other
users, it should be similar -- and even on MS itself (at least 9x, I left
it instead of switching to eXPrivacy, precisely because it /was/
eXPrivacy, and that was a line I could not and would not cross, period,
if neither Linux nor other alternatives were there I'd have been driven
to piracy, but luckily they were, and I wasn't), there was and is no need
to have anything MS as the first partition.
What MS OSs *DO* seem to require is that the boot partition be a primary
partition, that is, one of the first four, not a logical partition (>4)
in a secondary partition. I'm not sure if it's possible to have GRUB/
LILO fake this or not.
MS also normally requires that its boot partition, in addition to being a
primary partition, is set bootable. (Only one of the primary partitions
can be set bootable.) However, I believe both GRUB and LILO can fake
this, making the MS bootloader believe it's on the bootable partition
when it's not.
As Beso mentioned, you also have to configure GRUB/LILO to do the
chainloader thing. Basically what the chainloader functionality does is
fake out the MS bootloader, making it think it's booting straight out of
BIOS, and that whatever previous bootloader (GRUB/LILO in our case) is
that BIOS. IOW, the MS bootloader directly parallels GRUB/LILO on its
own, so just as you can use Loadln to chainload GRUB/LILO, you can
configure GRUB/LILO as a chainloader to load the MS bootloader.
>> but now that I need to restore GRUB, I am wondering if I need to write
>> "root (hd0,1)" or "root (hd0,7)" into the grub.conf to boot windows.
As Beso mentioned, hd0,1, but don't forget the chainloader, or it's not
going to work, because it expects to be booting from BIOS, and the
chainloader makes it look as if that's what's happening.
The reason you use hd0,1 is because that's where the MS bootloader is.
If you were booting Linux, you'd put the Linux partition (hd0,7), if
something else (say one of the BSDs, or a Fedora/Ubuntu/Mandriva/Mint/
whatever Linux install), you'd put its partition. The chainloader...
well I explained that above.
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
email@example.com mailing list