/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.23 Revision 1.40
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.23 2004/11/20 22:23:30 neysx Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.40 2007/05/08 23:38:19 nightmorph Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.19</version> 11<version>8.0</version>
12<date>2004-11-02</date> 12<date>2007-05-07</date>
13 13
14<section> 14<section>
15<title>Introduction to Block Devices</title> 15<title>Introduction to Block Devices</title>
16<subsection> 16<subsection>
17<title>Block Devices</title> 17<title>Block Devices</title>
18<body> 18<body>
19 19
20<p> 20<p>
21We'll take a good look at disk-oriented aspects of Gentoo Linux 21We'll start by taking a good look at disk-oriented aspects of Gentoo Linux
22and Linux in general, including Linux filesystems, partitions and block devices. 22and Linux in general, including Linux filesystems, partitions and block devices.
23Then, once you're familiar with the ins and outs of disks and filesystems, 23Then, once you're familiar with the ins and outs of disks and filesystems,
24you'll be guided through the process of setting up partitions and filesystems 24you'll be guided through the process of setting up partitions and filesystems
25for your Gentoo Linux installation. 25for your Gentoo Linux installation.
26</p> 26</p>
27 27
28<p> 28<p>
29To begin, we'll introduce <e>block devices</e>. The most famous block device is 29To begin, we'll introduce <e>block devices</e>. The most common block device is
30probably the one that represents the first IDE drive in a Linux system, namely 30the one that represents the first IDE drive in a Linux system, namely
31<path>/dev/hda</path>. If your system uses SCSI drives, then your first hard 31<path>/dev/hda</path>. If you are installing onto SCSI, FireWire, USB or SATA
32drive would be <path>/dev/sda</path>. 32drives, then your first hard drive would be <path>/dev/sda</path>. Additional
33drives are enumerated by the next letter in the alphabet. As an example, the
34third IDE disk could be found at <path>/dev/hdc</path>.
33</p> 35</p>
34 36
35<p> 37<p>
36The block devices above represent an abstract interface to the disk. User 38The block devices above represent an abstract interface to the disk. User
37programs can use these block devices to interact with your disk without worrying 39programs can use these block devices to interact with the disk without worrying
38about whether your drives are IDE, SCSI or something else. The program can 40about whether the drives are IDE, SCSI or something else. The program can
39simply address the storage on the disk as a bunch of contiguous, 41simply address the storage on the disk as a bunch of contiguous,
40randomly-accessible 512-byte blocks. 42randomly-accessible 512-byte blocks.
41</p> 43</p>
42 44
43</body> 45</body>
44</subsection> 46</subsection>
45<subsection> 47<subsection>
46<title>Partitions and Slices</title> 48<title>Partitions</title>
47<body> 49<body>
48 50
49<p> 51<p>
50Although it is theoretically possible to use a full disk to house your Linux 52Although it is theoretically possible to use a full disk to house your Linux
51system, this is almost never done in practice. Instead, full disk block devices 53system, this is almost never done in practice. Instead, full disk block devices
52are split up in smaller, more manageable block devices. On most systems, 54are split up in smaller, more manageable block devices. On most systems,
53these are called <e>partitions</e>. Other architectures use a similar technique, 55these are called <e>partitions</e>.
54called <e>slices</e>.
55</p> 56</p>
56 57
57</body> 58</body>
58</subsection> 59</subsection>
59</section> 60</section>
63<title>Default Partitioning Scheme</title> 64<title>Default Partitioning Scheme</title>
64<body> 65<body>
65 66
66<p> 67<p>
67If you are not interested in drawing up a partitioning scheme for your system, 68If you are not interested in drawing up a partitioning scheme for your system,
68you can use the partitioning scheme we use throughout this book: 69you can use the partitioning scheme we use throughout this book. Choose the
70filesystem layout that best matches the type of PowerPC system you are
71installing on.
72</p>
73
74</body>
75</subsection>
76<subsection>
77<title>Apple New World</title>
78<body>
79
69</p> 80<p>
81Apple New World machines are fairly straightforward to configure. The first
82partition is always an <e>Apple Partition Map</e>. This partition keeps track
83of the layout of the disk. You cannot remove this partition. The next
84partition should always be a bootstrap partition. This partition contains a
85small (800k) HFS filesystem that holds a copy of the bootloader Yaboot and its
86configuration file. This partition is <e>not</e> the same as a
87<path>/boot</path> partition as found on other architectures. After the boot
88partition, the usual Linux filesystems are placed, according to the scheme
89below. The swap partition is a temporary storage place for when your system
90runs out of physical memory. The root partition will contain the filesystem
91that Gentoo is installed on. If you wish to dual boot, the OSX partition
92can go anywhere after the bootstrap partition to insure that yaboot starts
93first.
94</p>
95
96<note>
97There may be "Disk Driver" partitions on your disk such as
98<path>Apple_Driver63</path>, <path>Apple_Driver_ATA</path>,
99<path>Apple_FWDriver</path>, <path>Apple_Driver_IOKit</path>, and
100<path>Apple_Patches</path>. These are used to boot MacOS, so if you have no
101need for this, you can remove them by initializing the disk with mac-fdisk's
102<c>i</c> option. This will completely erase the disk! If you are in doubt,
103just let them be.
104</note>
105
106<note>
107If you partitioned this disk with Apple's Disk Utility, there may be
108128Mb spaces between partitions which Apple reserves for "future use". You
109can safely remove these.
110</note>
70 111
71<table> 112<table>
72<tr> 113<tr>
73 <th>Partition NewWorld</th>
74 <th>Partition OldWorld</th>
75 <th>Partition Pegasos</th> 114 <th>Partition</th>
115 <th>Size</th>
76 <th>Filesystem</th> 116 <th>Filesystem</th>
117 <th>Description</th>
118</tr>
119<tr>
120 <ti><path>/dev/hda1</path></ti>
121 <ti>32k</ti>
122 <ti>None</ti>
123 <ti>Apple Partition Map</ti>
124</tr>
125<tr>
126 <ti><path>/dev/hda2</path></ti>
127 <ti>800k</ti>
128 <ti>HFS</ti>
129 <ti>Apple Bootstrap</ti>
130</tr>
131<tr>
132 <ti><path>/dev/hda3</path></ti>
133 <ti>512Mb</ti>
134 <ti>Swap</ti>
135 <ti>Linux Swap</ti>
136</tr>
137<tr>
138 <ti><path>/dev/hda4</path></ti>
139 <ti>Rest of Disk</ti>
140 <ti>ext3, reiserfs, xfs</ti>
141 <ti>Linux Root</ti>
142</tr>
143</table>
144
145</body>
146</subsection>
147<subsection>
148<title>Apple Old World</title>
149<body>
150
151<p>
152Apple Old World machines are a bit more complicated to configure. The first
153partition is always an <e>Apple Partition Map</e>. This partition keeps track
154of the layout of the disk. You cannot remove this partition. If you are using
155BootX, the configuration below assumes that MacOS is installed on a seperate
156disk. If this is not the case, there will be additional partitions for "Apple
157Disk Drivers" such as <path>Apple_Driver63, Apple_Driver_ATA, Apple_FWDriver,
158Apple_Driver_IOKit, Apple_Patches</path> and the MacOS install. If you are
159using Quik, you will need to create a boot partition to hold the kernel, unlike
160other Apple boot methods. After the boot partition, the usual Linux filesystems
161are placed, according to the scheme below. The swap partition is a temporary
162storage place for when your system runs out of physical memory. The root
163partition will contain the filesystem that Gentoo is installed on.
164</p>
165
166<note>
167If you are using an OldWorld machine, you will need to keep MacOS available.
168The layout here assumes MacOS is installed on a separate drive.
169</note>
170
171<table>
172<tr>
173 <th>Partition</th>
77 <th>Size</th> 174 <th>Size</th>
175 <th>Filesystem</th>
78 <th>Description</th> 176 <th>Description</th>
79</tr> 177</tr>
80<tr> 178<tr>
81 <ti><path>/dev/hda1</path></ti> 179 <ti><path>/dev/hda1</path></ti>
82 <ti>/dev/hda1</ti>
83 <ti>(Not applicable)</ti>
84 <ti>(Partition Map)</ti>
85 <ti>32k</ti> 180 <ti>32k</ti>
181 <ti>None</ti>
86 <ti>Apple_partition_map</ti> 182 <ti>Apple Partition Map</ti>
87</tr> 183</tr>
88<tr> 184<tr>
89 <ti><path>/dev/hda2</path></ti> 185 <ti><path>/dev/hda2</path></ti>
90 <ti>(Not needed)</ti> 186 <ti>32Mb</ti>
91 <ti>(Not applicable)</ti> 187 <ti>ext2</ti>
92 <ti>(bootstrap)</ti> 188 <ti>Quik Boot Partition (quik only)</ti>
189</tr>
190<tr>
191 <ti><path>/dev/hda3</path></ti>
192 <ti>512Mb</ti>
193 <ti>Swap</ti>
194 <ti>Linux Swap</ti>
195</tr>
196<tr>
197 <ti><path>/dev/hda4</path></ti>
198 <ti>Rest of Disk</ti>
199 <ti>ext3, reiserfs, xfs</ti>
200 <ti>Linux Root</ti>
201</tr>
202</table>
203
204</body>
205</subsection>
206<subsection>
207<title>Pegasos</title>
208<body>
209
210<p>
211The Pegasos partition layout is quite simple compared to the Apple layouts.
212The first partition is a Boot Partition, which contains kernels to be booted,
213along with an OpenFirmware script that presents a menu on boot. After the boot
214partition, the usual Linux filesystems are placed, according to the scheme
215below. The swap partition is a temporary storage place for when your system
216runs out of physical memory. The root partition will contain the filesystem
217that Gentoo is installed on.
218</p>
219
220<table>
221<tr>
222 <th>Partition</th>
223 <th>Size</th>
224 <th>Filesystem</th>
225 <th>Description</th>
226</tr>
227<tr>
228 <ti><path>/dev/hda1</path></ti>
229 <ti>32Mb</ti>
230 <ti>affs1 or ext2</ti>
231 <ti>Boot Partition</ti>
232</tr>
233<tr>
234 <ti><path>/dev/hda2</path></ti>
235 <ti>512Mb</ti>
236 <ti>Swap</ti>
237 <ti>Linux Swap</ti>
238</tr>
239<tr>
240 <ti><path>/dev/hda3</path></ti>
241 <ti>Rest of Disk</ti>
242 <ti>ext3, reiserfs, xfs</ti>
243 <ti>Linux Root</ti>
244</tr>
245</table>
246
247</body>
248</subsection>
249<subsection>
250<title>IBM PReP (RS/6000)</title>
251<body>
252
253<p>
254The Pegasos partition layout is quite simple compared to the Apple layouts.
255The first partition is a Boot Partition, which contains kernels to be booted,
256along with an OpenFirmware script that presents a menu on boot. After the boot
257partition, the usual Linux filesystems are placed, according to the scheme
258below. The swap partition is a temporary storage place for when your system
259runs out of physical memory. The root partition will contain the filesystem
260that Gentoo is installed on.
261</p>
262
263<table>
264<tr>
265 <th>Partition</th>
266 <th>Size</th>
267 <th>Filesystem</th>
268 <th>Description</th>
269</tr>
270<tr>
271 <ti><path>/dev/hda1</path></ti>
93 <ti>800k</ti> 272 <ti>800k</ti>
94 <ti>Apple_Bootstrap</ti> 273 <ti>None</ti>
274 <ti>PReP Boot Partition (Type 0x41)</ti>
275</tr>
276<tr>
277 <ti><path>/dev/hda2</path></ti>
278 <ti>512Mb</ti>
279 <ti>Swap</ti>
280 <ti>Linux Swap (Type 0x82)</ti>
95</tr> 281</tr>
96<tr> 282<tr>
97 <ti><path>/dev/hda3</path></ti> 283 <ti><path>/dev/hda3</path></ti>
98 <ti><path>/dev/hda2</path></ti>
99 <ti><path>/dev/hda1</path></ti>
100 <ti>(swap)</ti>
101 <ti>512M</ti>
102 <ti>Swap partition</ti>
103</tr>
104<tr>
105 <ti><path>/dev/hda4</path></ti>
106 <ti><path>/dev/hda3</path></ti>
107 <ti><path>/dev/hda2</path></ti>
108 <ti>ext3</ti>
109 <ti>Rest of the disk</ti> 284 <ti>Rest of Disk</ti>
110 <ti>Root partition</ti> 285 <ti>ext3, reiserfs, xfs</ti>
286 <ti>Linux Root (Type 0x83)</ti>
111</tr> 287</tr>
112</table> 288</table>
113 289
114<note> 290<warn>
115There are some partitions named like this: <path>Apple_Driver43, 291<c>parted</c> is able to resize partitions including HFS+. Unfortunately there
116Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, 292may be issues with resizing HFS+ journaled filesystems, so, for the best
117Apple_Patches</path>. If you are not planning to use MacOS 9 you can 293results, switch off journaling in Mac OS X before resizing. Remember that any
118delete them, because MacOS X and Linux don't need them. 294resizing operation is dangerous, so attempt at your own risk! Be sure to always
119You might have to use parted in order to delete them, as mac-fdisk can't delete them yet. 295have a backup of your data before resizing!
120</note> 296</warn>
121 297
122<p> 298<p>
123If you are interested in knowing how big a partition should be, or even how many 299If you are interested in knowing how big a partition should be, or even how many
124partitions you need, read on. Otherwise continue now with <uri 300partitions you need, read on. Otherwise continue now with
125link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your Disk</uri> 301<uri link="#mac-fdisk"> Default: Using mac-fdisk (Apple) to Partition your Disk
126or <uri link="#parted">Alternative: Using parted (especially Pegasos) to 302</uri> or <uri link="#parted">Alternative: Using parted (IBM/Pegasos) to
127Partition your Disk</uri>. 303Partition your Disk</uri>.
128</p> 304</p>
129 305
130</body> 306</body>
131</subsection> 307</subsection>
136<p> 312<p>
137The number of partitions is highly dependent on your environment. For instance, 313The number of partitions is highly dependent on your environment. For instance,
138if you have lots of users, you will most likely want to have your 314if you have lots of users, you will most likely want to have your
139<path>/home</path> separate as it increases security and makes backups easier. 315<path>/home</path> separate as it increases security and makes backups easier.
140If you are installing Gentoo to perform as a mailserver, your <path>/var</path> 316If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
141should be separate as all mails are stored inside <path>/var</path>. A good 317should be separate as all received mail is stored in <path>/var</path>. A good
142choice of filesystem will then maximise your performance. Gameservers will have 318choice of filesystem will then maximise your performance. Game servers should
143a separate <path>/opt</path> as most gaming servers are installed there. The 319have a separate <path>/opt</path> as most game servers are installed there. The
144reason is similar for <path>/home</path>: security and backups. 320reason is similar for <path>/home</path>: security and backups. Whatever layout
321you chose, you will definitely want to keep <path>/usr</path> large: not only
322will it contain the majority of applications, the Portage tree alone takes
323more than 500Mb excluding the various sources that are stored in it.
145</p> 324</p>
146 325
147<p> 326<p>
148As you can see, it very much depends on what you want to achieve. Separate 327As you can see, it very much depends on what you want to achieve. Separate
149partitions or volumes have the following advantages: 328partitions or volumes have the following advantages:
161 If necessary, file system checks are reduced in time, as multiple checks can 340 If necessary, file system checks are reduced in time, as multiple checks can
162 be done in parallel (although this advantage is more with multiple disks than 341 be done in parallel (although this advantage is more with multiple disks than
163 it is with multiple partitions) 342 it is with multiple partitions)
164</li> 343</li>
165<li> 344<li>
166 Security can be enhanced by mounting some partitions or volumes read-only, 345 Security can be enhanced by mounting some partitions or volumes read-only,
167 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. 346 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
168</li> 347</li>
169</ul> 348</ul>
170 349
171<p> 350<p>
172However, multiple partitions have one big disadvantage: if not configured 351However, multiple partitions have one big disadvantage: if not configured
173properly, you might result in having a system with lots 352properly, you might result in having a system with lots of free space on one
174of free space on one partition and none on another. There is also a 15-partition 353partition and none on another. There is also a 15-partition limit for SCSI and
175limit for SCSI and SATA. 354SATA.
176</p> 355</p>
177 356
178</body> 357</body>
179</subsection> 358</subsection>
180</section> 359</section>
181<section id="fdisk"> 360<section id="mac-fdisk">
182<title>Default: Using mac-fdisk (Apple/IBM) Partition your Disk</title> 361<title>Default: Using mac-fdisk (Apple) Partition your Disk</title>
183<body> 362<body>
184 363
185<p> 364<p>
186At this point, create your partitions using <c>mac-fdisk</c>: 365At this point, create your partitions using <c>mac-fdisk</c>:
187</p> 366</p>
189<pre caption="Starting mac-fdisk"> 368<pre caption="Starting mac-fdisk">
190# <i>mac-fdisk /dev/hda</i> 369# <i>mac-fdisk /dev/hda</i>
191</pre> 370</pre>
192 371
193<p> 372<p>
194First delete the partitions you have cleared previously to make room for your 373If you used Apple's Disk Utility to leave space for Linux, first delete the
195Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). 374partitions you have created previously to make room for your new install. Use
375<c>d</c> in <c>mac-fdisk</c> to delete those partition(s). It will ask for the
196It will ask for the partition number to delete. Usually the first partition on 376partition number to delete. Usually the first partition on NewWorld machines
197NewWorld machines (Apple_partition_map) could not be deleted. 377(Apple_partition_map) could not be deleted. If you would like to start with a
378clean disk, you can simply initialize the disk by pressing <c>i</c>. This
379will completely erase the disk, so use this with caution.
198</p> 380</p>
199 381
200<p> 382<p>
201Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will 383Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will
202ask for what block you want to start. Enter the number of your first free 384ask for what block you want to start. Enter the number of your first free
203partition, followed by a <c>p</c>. For instance this is <c>2p</c>. 385partition, followed by a <c>p</c>. For instance this is <c>2p</c>.
204</p> 386</p>
205 387
206<note> 388<note>
207This partition is <e>not</e> a "boot" partition. It is not used by Linux at all; 389This partition is <e>not</e> a <path>/boot</path> partition. It is not used by
208you don't have to place any filesystem on it and you should never mount it. PPC 390Linux at all; you don't have to place any filesystem on it and you should never
209users don't need an extra partition for <path>/boot</path>. 391mount it. Apple users don't need an extra partition for <path>/boot</path>.
210</note> 392</note>
211 393
212<p> 394<p>
213Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will 395Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will
214ask for what block you want to start this partition from. As we used <c>2</c> 396ask for what block you want to start this partition from. As we used <c>2</c>
215before to create the Apple_Bootstrap partition, you now have to enter 397before to create the Apple_Bootstrap partition, you now have to enter
216<c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size 398<c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size
217you want -- 512MB is recommended though). When asked for a name, enter <c>swap</c> 399you want -- a minimum of 512MB is recommended, but 2 times your physical memory
218(mandatory). 400is the generally accepted size). When asked for a name, enter <c>swap</c>.
219</p> 401</p>
220 402
221<p> 403<p>
222To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select 404To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select
223from what block the root partition should start. When asked for the size, enter 405from what block the root partition should start. When asked for the size, enter
224<c>4p</c> again. <c>mac-fdisk</c> will interpret this as "Use all available 406<c>4p</c> again. <c>mac-fdisk</c> will interpret this as "Use all available
225space". When asked for the name, enter <c>root</c> (mandatory). 407space". When asked for the name, enter <c>root</c>.
226</p> 408</p>
227 409
228<p> 410<p>
229To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to 411To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to
230quit <c>mac-fdisk</c>. 412quit <c>mac-fdisk</c>.
231</p> 413</p>
232 414
233<note> 415<note>
234To make sure everything is ok, you should run mac-fdisk once more and check 416To make sure everything is ok, you should run <c>mac-fdisk -l</c> and check
235whether all the partitions are there. If you don't see any of the partitions 417whether all the partitions are there. If you don't see any of the partitions
236you created, or the changes you made, you should reinitialize your partitions 418you created, or the changes you made, you should reinitialize your partitions
237by pressing "i" in mac-fdisk. Note that this will recreate the partition map 419by pressing "i" in mac-fdisk. Note that this will recreate the partition map
238and thus remove all your partitions. 420and thus remove all your partitions.
239</note> 421</note>
240 422
241<p> 423<p>
242Now that your partitions are created, you can continue with <uri 424Now that your partitions are created, you can continue with
243link="#filesystems">Creating Filesystems</uri>. 425<uri link="#filesystems">Creating Filesystems</uri>.
244</p> 426</p>
245 427
246</body> 428</body>
247</section> 429</section>
248<section id="parted"> 430<section id="parted">
249<title>Using parted (especially Pegasos) to Partition your Disk</title> 431<title>Using parted to Partition your Disk (Pegasos and RS/6000)</title>
250<body> 432<body>
251 433
252<p> 434<p>
253<c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by 435<c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by
254Mac OS and Mac OS X. With this tool you can shrink your Mac-partitions and 436Mac OS and Mac OS X. With this tool you can resize your Mac-partitions and
255create space for your Linux partitions. Nevertheless, the example below 437create space for your Linux partitions. Nevertheless, the example below
256describes partitioning for Pegasos machines only. 438describes partitioning for Pegasos machines only.
257</p> 439</p>
258 440
259<p> 441<p>
263<pre caption="Starting parted"> 445<pre caption="Starting parted">
264# <i>parted /dev/hda</i> 446# <i>parted /dev/hda</i>
265</pre> 447</pre>
266 448
267<p> 449<p>
268If the drive is unpartitioned, run <c>mklabel amiga</c> to create a new 450If the drive is unpartitioned, run <c>mklabel amiga</c> to create a new
269disklabel for the drive. 451disklabel for the drive.
270</p> 452</p>
271 453
272<p> 454<p>
273You can type <c>print</c> at any time in parted to display the current partition 455You can type <c>print</c> at any time in parted to display the current partition
274table. Your changes aren't saved until you quit the application; if at any time 456table. If at any time you change your mind or made a mistake you can press
275you change your mind or made a mistake you can press <c>Ctrl-c</c> to abort 457<c>Ctrl-c</c> to abort parted.
276parted.
277</p> 458</p>
278 459
279<p> 460<p>
280If you intend to also install MorphOS on your Pegasos create an affs1 filesystem 461If you intend to also install MorphOS on your Pegasos create an affs1 filesystem
281named "BI0" (BI zero) at the start of the drive. 50MB should be more than enough 462at the start of the drive. 32MB should be more than enough to store the MorphOS
282to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs or 463kernel. If you have a Pegasos I or intend to use any filesystem besides ext2 or
283xfs, you will also have to store your Linux kernel on this partition (the 464ext3, you will also have to store your Linux kernel on this partition (the
284Pegasos II can boot from ext2/ext3 drives). To create the partition run 465Pegasos II can only boot from ext2/ext3 or affs1 partitions). To create the
285<c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should 466partition run <c>mkpart primary affs1 START END</c> where <c>START</c> and
286be replaced with the megabyte range (e.g. <c>5 55</c> creates a 50 MB partition 467<c>END</c> should be replaced with the megabyte range (e.g. <c>0 32</c> which
287starting at 5MB and ending at 55MB. 468creates a 32 MB partition starting at 0MB and ending at 32MB. If you chose to
288</p> 469create an ext2 or ext3 partition instead, substitute ext2 or ext3 for affs1 in
289 470the mkpart command.
290<p> 471</p>
291You need to create two partitions for Linux, one root filesystem for all your 472
292program files etc, and one swap partition. To create the root filesystem you
293must first decide which filesystem to use. Possible options are ext2, ext3,
294reiserfs and xfs. Unless you know what you are doing, use ext3. Run
295<c>mkpart primary ext3 START END</c> to create an ext3 partition. Again, replace
296<c>START</c> and <c>END</c> with the megabyte start and stop marks for the
297partition.
298</p> 473<p>
299 474You will need to create two partitions for Linux, one root filesystem and one
475swap partition. Run <c>mkpart primary START END</c> to create each partition,
476replacing <c>START</c> and <c>END</c> with the desired megabyte boundries.
300<p> 477</p>
478
479<p>
301It is generally recommended that you create a swap partition the same size as 480It is generally recommended that you create a swap partition that is two times
302the amount of RAM in your computer times two. You will probably get away with a 481bigger than the amount of RAM in your computer, but at least 512Mb is
303smaller swap partition unless you intend to run a lot of applications at the 482recommended. To create the swap partition, run
304same time (although at least 512MB is recommended). To create the swap 483<c>mkpart primary linux-swap START END</c> with START and END again denoting
305partition, run <c>mkpart primary linux-swap START END</c>. 484the partition boundries.
306</p>
307
308<p> 485</p>
309Write down the partition minor numbers as they are required during the 486
310installation process. To display the minor numbers run <c>print</c>. Your drives
311are accessed as <path>/dev/hdaX</path> where X is replaced with the minor number
312of the partition.
313</p> 487<p>
314
315<p>
316When you are done in parted simply run <c>quit</c>. 488When you are done in parted simply type <c>quit</c>.
317</p> 489</p>
318 490
319</body> 491</body>
320</section> 492</section>
321<section id="filesystems"> 493<section id="filesystems">
323<subsection> 495<subsection>
324<title>Introduction</title> 496<title>Introduction</title>
325<body> 497<body>
326 498
327<p> 499<p>
328Now that your partitions are created, it is time to place a filesystem on them. 500Now that your partitions are created, it is time to place a filesystem on them.
329If you don't care about what filesystem to choose and are happy with what we use 501If you're not sure which filesystems to choose and are happy with our defaults,
330as default in this handbook, continue with <uri 502continue with
331link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. 503<uri link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
332Otherwise read on to learn about the available filesystems... 504Otherwise, read on to learn about the available filesystems.
333</p> 505</p>
334 506
335</body> 507</body>
336</subsection> 508</subsection>
337<subsection> 509<subsection>
338<title>Filesystems?</title> 510<title>Filesystems?</title>
339<body> 511<body>
340 512
341<p> 513<p>
342Several filesystems are available. ext2, ext3, ReiserFS and XFS are found stable 514Several filesystems are available for use on the PowerPC architecture including
343on the PPC architecture. jfs is unsupported. 515ext2, ext3, ReiserFS and XFS, each with their strengths and faults.
344</p> 516</p>
345 517
346<p> 518<p>
347<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata 519<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
348journaling, which means that routine ext2 filesystem checks at startup time can 520journaling, which means that routine ext2 filesystem checks at startup time can
349be quite time-consuming. There is now quite a selection of newer-generation 521be quite time-consuming. There is now quite a selection of journaled
350journaled filesystems that can be checked for consistency very quickly and are 522filesystems that can be checked for consistency very quickly and are thus
351thus generally preferred over their non-journaled counterparts. Journaled 523generally preferred over their non-journaled counterparts.
352filesystems prevent long delays when you boot your system and your filesystem
353happens to be in an inconsistent state.
354</p> 524</p>
355 525
356<p> 526<p>
357<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata 527<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
358journaling for fast recovery in addition to other enhanced journaling modes like 528journaling for fast recovery in addition to other enhanced journaling modes
359full data and ordered data journaling. ext3 is a very good and reliable 529like full data and ordered data journaling. It uses a hashed B*-tree index that
360filesystem. It has an additional hashed b-tree indexing option that enables
361high performance in almost all situations. In short, ext3 is an excellent 530enables high performance in almost all situations. In short, ext3 is a very
362filesystem. 531good and reliable filesystem and is highly recommended for most installs.
363</p>
364
365<p> 532</p>
533
534<p>
366<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall 535<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
367performance and greatly outperforms both ext2 and ext3 when dealing with small 536performance and greatly outperforms both ext2 and ext3 when dealing with small
368files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales 537files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
369extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is 538extremely well and has metadata journaling. ReiserFS is solid and usable as
370solid and usable as both general-purpose filesystem and for extreme cases such 539both general-purpose filesystem and for extreme cases such as the creation of
371as the creation of large filesystems, the use of many small files, very large 540large filesystems, very large files and directories containing tens of
372files and directories containing tens of thousands of files. 541thousands of small files.
373</p> 542</p>
374 543
375<p> 544<p>
376<b>XFS</b> is a filesystem with metadata journaling which comes with a robust 545<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
377feature-set and is optimized for scalability. We only recommend using this 546feature-set and is optimized for scalability. We only recommend using this
382deal of data if the system goes down unexpectedly. 551deal of data if the system goes down unexpectedly.
383</p> 552</p>
384 553
385</body> 554</body>
386</subsection> 555</subsection>
556<subsection>
557<title>Activating the Swap Partition</title>
558<body>
559
560<p>
561<c>mkswap</c> is the command that is used to initialize swap partitions:
562</p>
563
564<pre caption="Creating a swap signature">
565# <i>mkswap /dev/hda3</i>
566</pre>
567
568<p>
569To activate the swap partition, use <c>swapon</c>:
570</p>
571
572<pre caption="Activating the swap partition">
573# <i>swapon /dev/hda3</i>
574</pre>
575
576<p>
577Create and activate the swap now before creating other filesystems.
578</p>
579
580</body>
581</subsection>
387<subsection id="filesystems-apply"> 582<subsection id="filesystems-apply">
388<title>Applying a Filesystem to a Partition</title> 583<title>Applying a Filesystem to a Partition</title>
389<body> 584<body>
390 585
391<p> 586<p>
415 <ti><c>mkfs.xfs</c></ti> 610 <ti><c>mkfs.xfs</c></ti>
416</tr> 611</tr>
417</table> 612</table>
418 613
419<p> 614<p>
420For instance, to have the root partition (<path>/dev/hda4</path> in our example) 615For instance, to make an ext3 filesystem on the root partition
421in ext3 (as in our example), you would use: 616(<path>/dev/hda4</path> in our example), you would use:
422</p> 617</p>
423 618
424<pre caption="Applying a filesystem on a partition"> 619<pre caption="Applying a filesystem on a partition">
425# <i>mke2fs -j /dev/hda4</i> 620# <i>mke2fs -j /dev/hda4</i>
426</pre> 621</pre>
429Now create the filesystems on your newly created partitions (or logical 624Now create the filesystems on your newly created partitions (or logical
430volumes). 625volumes).
431</p> 626</p>
432 627
433<note> 628<note>
434On OldWorld machines and the PegasosII your partition which holds the kernel must 629On the PegasosII your partition which holds the kernel must be ext2, ext3 or
435be ext2 or ext3. NewWorld machines can boot from any of ext2, ext3, XFS, 630affs1. NewWorld machines can boot from any of ext2, ext3, XFS, ReiserFS or
436ReiserFS or even HFS/HFS+ filesystems. 631even HFS/HFS+ filesystems. On OldWorld machines booting with BootX, the kernel
632must be placed on an HFS partition, but this will be completed when you
633configure your bootloader.
437</note> 634</note>
438
439</body>
440</subsection>
441<subsection>
442<title>Activating the Swap Partition</title>
443<body>
444
445<p>
446<c>mkswap</c> is the command that is used to initialize swap partitions:
447</p>
448
449<pre caption="Creating a Swap signature">
450# <i>mkswap /dev/hda3</i>
451</pre>
452
453<p>
454To activate the swap partition, use <c>swapon</c>:
455</p>
456
457<pre caption="Activating the swap partition">
458# <i>swapon /dev/hda3</i>
459</pre>
460
461<p>
462Create and activate the swap now.
463</p>
464 635
465</body> 636</body>
466</subsection> 637</subsection>
467</section> 638</section>
468<section> 639<section>
469<title>Mounting</title> 640<title>Mounting</title>
470<body> 641<body>
471 642
472<p> 643<p>
473Now that your partitions are initialized and are housing a filesystem, it is 644Now that your partitions are initialized and are housing a filesystem, it is
474time to mount those partitions. Use the <c>mount</c> command. Don't forget to 645time to mount those partitions. Use the <c>mount</c> command. As an example we
475create the necessary mount directories for every partition you created. As an 646mount the root partition:
476example we create a mount-point and mount the root partition:
477</p> 647</p>
478 648
479<pre caption="Mounting partitions"> 649<pre caption="Mounting partitions">
480# <i>mkdir /mnt/gentoo</i>
481# <i>mount /dev/hda4 /mnt/gentoo</i> 650# <i>mount /dev/hda4 /mnt/gentoo</i>
482</pre> 651</pre>
483 652
484<note> 653<note>
485If you want your <path>/tmp</path> to reside on a separate partition, be sure to 654If you want your <path>/tmp</path> to reside on a separate partition, be sure to
486change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This 655change its permissions after mounting and unpacking with
487also holds for <path>/var/tmp</path>. 656<c>chmod 1777 /mnt/gentoo/tmp</c>. This is also true for <path>/var/tmp</path>.
488</note> 657</note>
489
490<p>
491Finally we have to create the <path>/dev</path> files in our new home, which is
492needed during the bootloader installation. This could be done by "bind"-mapping
493the <path>/dev</path>-filesystem from the LiveCD:
494</p>
495
496<pre caption="Bind-mounting the /dev-filesystem">
497# <i>mkdir /mnt/gentoo/dev</i>
498# <i>mount -o bind /dev /mnt/gentoo/dev</i>
499</pre>
500
501<p>
502We will also have to mount the proc filesystem (a virtual interface with the
503kernel) on <path>/proc</path>. But first we will need to place our files on the
504partitions.
505</p>
506 658
507<p> 659<p>
508Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo 660Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
509Installation Files</uri>. 661Installation Files</uri>.
510</p> 662</p>

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.20