Gentoo Archives: gentoo-amd64

From: Peter Humphrey <prh@××××××××××.uk>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Late in the game Windows dual-boot question
Date: Mon, 01 May 2006 10:45:27
Message-Id: 200605011141.50417.prh@gotadsl.co.uk
In Reply to: Re: [gentoo-amd64] Late in the game Windows dual-boot question by Mark Knecht
1 On Sunday 30 April 2006 16:51, Mark Knecht wrote:
2
3 > 2) When I built the machine I had 512MB in the machine so a 1GB swap
4 > seemed fine. I have since updated to 1GB so the swap seemed a bit
5 > small anyway.
6
7 I've read somewhere that more than 1 GB swap would be wasted.
8
9 > 3) I will create two partitions early on the drive:
10 >
11 > c:\ -> approximately 1GB
12 > d:\ -> approximately 100MB
13
14 The former will have to be a primary if Windows is to boot it; where will
15 you put the latter?
16
17 > The only reason to create the d:\ partition would be to ensure that
18 > the /dev/sda# numbers do not change and thus cause any problems for my
19 > existing Linux installation.
20
21 It's easy enough to decrement the disk letters in /etc/fstab, and the disk
22 numbers in /boot/grub/grub.conf, don't you think?
23
24 > 4) I have already created /dev/sda9 and copied everything on
25 > /dev/sda1, my boot partition, there.
26
27 You may find that a partition that far up the disk can't be booted. It
28 depends on your BIOS, I think. Once the kernel image has been fetched from
29 your /boot partition, of course the BIOS is not used, but in the first step
30 it has to be. BIOSes used to be unable to boot a partition above cylinder
31 1023 but some (most? all?) now can. There's also the question of what
32 constitutes cylinder 1023, what with LBA etc.
33
34 > Since I am not changing the root partition it should remain /dev/sda3.
35 > Since grub will eventually go back on (hd0,0) after Windows is
36 > installed I assume that doesn't change either. However since the new
37 > /boot will be /dev/sda9 I'm thinking that grub.conf should change to
38 > point there. I'm guessing this is what it might need to look like:
39 >
40 > title 2.6.16-gentoo-r2
41 > root (hd0,0)
42
43 That's the first partition on the first disk, which won't be your /boot
44 partition. If you want grub installed in the MBR of the first disk, specify
45 (hd0).
46
47 > kernel (hd0,8)/boot/bzImage-2.6.16-gentoo-r2 root=/dev/sda3
48
49 That's fine, assuming that your BIOS boots sda before hda, which I suppose
50 it must or you'd have described it differently :-)
51
52 > I will change fstab to understand the changes when I'm reinstalling
53 > grub, I think. I am really not clear about how to point grub on
54 > /dev/sda1 to a /boot/grub directory sitting on /dev/sda9.
55
56 Your grub should be installed either in the MBR of the disk your BIOS boots
57 first, or in one of your ext2fs or ext3fs partitions which you should make
58 active (i.e. mark bootable). It's conventional and sensible for the latter
59 to be the partition that contains your /boot directory and the bootable
60 kernel image: in your case the alternatives are /dev/sda and /dev/sda9
61 respectively.
62
63 If your /boot partition isn't the active primary partition on the first
64 disk, to get grub to boot from that partition you'll need some other boot
65 manager to point the BIOS to it; that's why most people install grub into
66 the MBR.
67
68 > Does all that make sense? It doesn't to me which worries me a bit, but
69 > hopefully I'll sort it out.
70
71 I think you're pretty nearly there, but with the provisos I've suggested.
72
73 > QUESTION: I am also unclear about marking partitions as 'bootable' in
74 > this configuration. Is a partition marked bootable because it has grub
75 > on it (my guess) or because it has the kernel residing on it? (Not my
76 > guess)
77
78 The BIOS needs to know where to fetch the system boot code from.
79 Traditionally that meant the master boot record of the first physical disk.
80 The MBR is a small block of code at the beginning of the disk, outside all
81 the partitions. It's called "master" because each primary partition also
82 starts with a boot record, which can hold bootstrap code if you want it to
83 (that's what you do if you install grub into hd(0,0), say, i.e. /dev/sda1).
84 In this case, "traditionally" means "in the M$ FAT design", which all other
85 file systems on PCs have had to work with for compatibility. Just as 640KB
86 was supposedly all the memory anyone could want thirty years ago, so four
87 disk partitions were ditto, so the MBR only needed a two-bit pointer to the
88 partition the BIOS was to boot. That's why you can't boot a logical
89 partition directly. I believe there is a boot record in the primary
90 partition that's modified to become an extended partition, a container for
91 logical partitions, but I've never managed to make my systems boot through
92 it. And of course I'm as liable as anyone else to being wrong.
93
94 > Again, thanks in advance for any info you can provide on this.
95
96 I hope this has helped, not just added to the confusion :-)
97
98 > Fortunately I have many other machines here to work from while I go
99 > through this change over.
100
101 A boon, indeed.
102
103 --
104 Rgds
105 Peter.
106 --
107 gentoo-amd64@g.o mailing list

Replies

Subject Author
[gentoo-amd64] Re: Late in the game Windows dual-boot question Duncan <1i5t5.duncan@×××.net>