Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-amd64
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-amd64@g.o
From: Duncan <1i5t5.duncan@...>
Subject: Re: Load NTLDR from GRUB?
Date: Sun, 28 Oct 2007 09:20:48 +0000 (UTC)
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:
>> Hello,
>> 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

-- 
gentoo-amd64@g.o mailing list


Replies:
Re: Re: Load NTLDR from GRUB?
-- Peter Humphrey
Re: Re: Load NTLDR from GRUB?
-- Peter Humphrey
References:
Load NTLDR from GRUB?
-- Julien Cassette
Re: Load NTLDR from GRUB?
-- Peter Humphrey
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Load NTLDR from GRUB?
Next by thread:
Re: Re: Load NTLDR from GRUB?
Previous by date:
Re: Load NTLDR from GRUB?
Next by date:
Re: emerge --sync failed


Updated Jun 17, 2009

Summary: Archive of the gentoo-amd64 mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.