1 |
Peter Humphrey <prh@××××××××××.uk> posted |
2 |
200710280822.59398.prh@××××××××××.uk, excerpted below, on Sun, 28 Oct |
3 |
2007 08:22:59 +0000: |
4 |
|
5 |
> On Saturday 27 Oct 2007, Julien Cassette wrote: |
6 |
>> Hello, |
7 |
>> I needed to install Windows XP on a logical partition, but I found that |
8 |
>> it can't boot from such a partition because NTLDR needs to be installed |
9 |
>> on a primary one. |
10 |
>> So I set up the following partition scheme: |
11 |
>> /dev/sda1 ext3 Gentoo root |
12 |
>> /dev/sda2 ntfs NTLDR |
13 |
>> /dev/sda4 Extended |
14 |
>> /dev/sda5 ext2 Gentoo portage |
15 |
>> /dev/sda6 swap Gentoo swap |
16 |
>> /dev/sda7 ext3 Gentoo home |
17 |
>> /dev/sda8 ntfs Windows XP |
18 |
>> |
19 |
>> Win xp installed and booted without problem |
20 |
> |
21 |
> This is interesting. I've had various versions of Windows on various |
22 |
> machines over the years and I've never managed to get grub to start |
23 |
> Windows unless Windows was on the first primary partition. Yet in your |
24 |
> case no part of Windows is on the first primary partition. What's your |
25 |
> secret? Or has the latest version of grub been fixed in this respect? |
26 |
|
27 |
By the time I switched to GRUB, I was off of MS/proprietaryware forever |
28 |
(or at least until it's no longer proprietary- aka slaveryware), but back |
29 |
on LILO, and from the GRUB documentation and what I've read of other |
30 |
users, it should be similar -- and even on MS itself (at least 9x, I left |
31 |
it instead of switching to eXPrivacy, precisely because it /was/ |
32 |
eXPrivacy, and that was a line I could not and would not cross, period, |
33 |
if neither Linux nor other alternatives were there I'd have been driven |
34 |
to piracy, but luckily they were, and I wasn't), there was and is no need |
35 |
to have anything MS as the first partition. |
36 |
|
37 |
What MS OSs *DO* seem to require is that the boot partition be a primary |
38 |
partition, that is, one of the first four, not a logical partition (>4) |
39 |
in a secondary partition. I'm not sure if it's possible to have GRUB/ |
40 |
LILO fake this or not. |
41 |
|
42 |
MS also normally requires that its boot partition, in addition to being a |
43 |
primary partition, is set bootable. (Only one of the primary partitions |
44 |
can be set bootable.) However, I believe both GRUB and LILO can fake |
45 |
this, making the MS bootloader believe it's on the bootable partition |
46 |
when it's not. |
47 |
|
48 |
As Beso mentioned, you also have to configure GRUB/LILO to do the |
49 |
chainloader thing. Basically what the chainloader functionality does is |
50 |
fake out the MS bootloader, making it think it's booting straight out of |
51 |
BIOS, and that whatever previous bootloader (GRUB/LILO in our case) is |
52 |
that BIOS. IOW, the MS bootloader directly parallels GRUB/LILO on its |
53 |
own, so just as you can use Loadln to chainload GRUB/LILO, you can |
54 |
configure GRUB/LILO as a chainloader to load the MS bootloader. |
55 |
|
56 |
>> but now that I need to restore GRUB, I am wondering if I need to write |
57 |
>> "root (hd0,1)" or "root (hd0,7)" into the grub.conf to boot windows. |
58 |
|
59 |
As Beso mentioned, hd0,1, but don't forget the chainloader, or it's not |
60 |
going to work, because it expects to be booting from BIOS, and the |
61 |
chainloader makes it look as if that's what's happening. |
62 |
|
63 |
The reason you use hd0,1 is because that's where the MS bootloader is. |
64 |
If you were booting Linux, you'd put the Linux partition (hd0,7), if |
65 |
something else (say one of the BSDs, or a Fedora/Ubuntu/Mandriva/Mint/ |
66 |
whatever Linux install), you'd put its partition. The chainloader... |
67 |
well I explained that above. |
68 |
|
69 |
-- |
70 |
Duncan - List replies preferred. No HTML msgs. |
71 |
"Every nonfree program has a lord, a master -- |
72 |
and if you use the program, he is your master." Richard Stallman |
73 |
|
74 |
-- |
75 |
gentoo-amd64@g.o mailing list |