/[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.38
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.38 2007/05/07 18:11:41 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 <path>Apple_Driver63,
98Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches</path>.
99These are used to boot MacOS, so if you have no need for this, you can remove
100them by initializing the disk with mac-fdisk's <c>i</c> option. This will
101completely erase the disk! If you are in doubt, just let them be.
102</note>
103
104<note>
105If you partitioned this disk with Apple's Disk Utility, there may be
106128Mb spaces between partitions which Apple reserves for "future use". You
107can safely remove these.
108</note>
70 109
71<table> 110<table>
72<tr> 111<tr>
73 <th>Partition NewWorld</th>
74 <th>Partition OldWorld</th>
75 <th>Partition Pegasos</th> 112 <th>Partition</th>
113 <th>Size</th>
76 <th>Filesystem</th> 114 <th>Filesystem</th>
115 <th>Description</th>
116</tr>
117<tr>
118 <ti><path>/dev/hda1</path></ti>
119 <ti>32k</ti>
120 <ti>None</ti>
121 <ti>Apple Partition Map</ti>
122</tr>
123<tr>
124 <ti><path>/dev/hda2</path></ti>
125 <ti>800k</ti>
126 <ti>HFS</ti>
127 <ti>Apple Bootstrap</ti>
128</tr>
129<tr>
130 <ti><path>/dev/hda3</path></ti>
131 <ti>512Mb</ti>
132 <ti>Swap</ti>
133 <ti>Linux Swap</ti>
134</tr>
135<tr>
136 <ti><path>/dev/hda4</path></ti>
137 <ti>Rest of Disk</ti>
138 <ti>ext3, reiserfs, xfs</ti>
139 <ti>Linux Root</ti>
140</tr>
141</table>
142
143</body>
144</subsection>
145<subsection>
146<title>Apple Old World</title>
147<body>
148
149<p>
150Apple Old World machines are a bit more complicated to configure. The first
151partition is always an <e>Apple Partition Map</e>. This partition keeps track
152of the layout of the disk. You cannot remove this partition. If you are using
153BootX, the configuration below assumes that MacOS is installed on a seperate
154disk. If this is not the case, there will be additional partitions for "Apple
155Disk Drivers" such as <path>Apple_Driver63, Apple_Driver_ATA, Apple_FWDriver,
156Apple_Driver_IOKit, Apple_Patches</path> and the MacOS install. If you are
157using Quik, you will need to create a boot partition to hold the kernel, unlike
158other Apple boot methods. After the boot partition, the usual Linux filesystems
159are placed, according to the scheme below. The swap partition is a temporary
160storage place for when your system runs out of physical memory. The root
161partition will contain the filesystem that Gentoo is installed on.
162</p>
163
164<note>
165If you are using an OldWorld machine, you will need to keep MacOS available.
166The layout here assumes MacOS is installed on a separate drive.
167</note>
168
169<table>
170<tr>
171 <th>Partition</th>
77 <th>Size</th> 172 <th>Size</th>
173 <th>Filesystem</th>
78 <th>Description</th> 174 <th>Description</th>
79</tr> 175</tr>
80<tr> 176<tr>
81 <ti><path>/dev/hda1</path></ti> 177 <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> 178 <ti>32k</ti>
179 <ti>None</ti>
86 <ti>Apple_partition_map</ti> 180 <ti>Apple Partition Map</ti>
87</tr> 181</tr>
88<tr> 182<tr>
89 <ti><path>/dev/hda2</path></ti> 183 <ti><path>/dev/hda2</path></ti>
90 <ti>(Not needed)</ti> 184 <ti>32Mb</ti>
91 <ti>(Not applicable)</ti> 185 <ti>ext2</ti>
92 <ti>(bootstrap)</ti> 186 <ti>Quik Boot Partition (quik only)</ti>
187</tr>
188<tr>
189 <ti><path>/dev/hda3</path></ti>
190 <ti>512Mb</ti>
191 <ti>Swap</ti>
192 <ti>Linux Swap</ti>
193</tr>
194<tr>
195 <ti><path>/dev/hda4</path></ti>
196 <ti>Rest of Disk</ti>
197 <ti>ext3, reiserfs, xfs</ti>
198 <ti>Linux Root</ti>
199</tr>
200</table>
201
202</body>
203</subsection>
204<subsection>
205<title>Pegasos</title>
206<body>
207
208<p>
209The Pegaos partition layout is quite simple compared to the Apple layouts.
210The first partition is a Boot Partition, which contains kernels to be booted,
211along with an OpenFirmware script that presents a menu on boot. After the boot
212partition, the usual Linux filesystems are placed, according to the scheme
213below. The swap partition is a temporary storage place for when your system
214runs out of physical memory. The root partition will contain the filesystem
215that Gentoo is installed on.
216</p>
217
218<table>
219<tr>
220 <th>Partition</th>
221 <th>Size</th>
222 <th>Filesystem</th>
223 <th>Description</th>
224</tr>
225<tr>
226 <ti><path>/dev/hda1</path></ti>
227 <ti>32Mb</ti>
228 <ti>affs1 or ext2</ti>
229 <ti>Boot Partition</ti>
230</tr>
231<tr>
232 <ti><path>/dev/hda2</path></ti>
233 <ti>512Mb</ti>
234 <ti>Swap</ti>
235 <ti>Linux Swap</ti>
236</tr>
237<tr>
238 <ti><path>/dev/hda3</path></ti>
239 <ti>Rest of Disk</ti>
240 <ti>ext3, reiserfs, xfs</ti>
241 <ti>Linux Root</ti>
242</tr>
243</table>
244
245</body>
246</subsection>
247<subsection>
248<title>IBM PReP (RS/6000)</title>
249<body>
250
251<p>
252The Pegaos partition layout is quite simple compared to the Apple layouts.
253The first partition is a Boot Partition, which contains kernels to be booted,
254along with an OpenFirmware script that presents a menu on boot. After the boot
255partition, the usual Linux filesystems are placed, according to the scheme
256below. The swap partition is a temporary storage place for when your system
257runs out of physical memory. The root partition will contain the filesystem
258that Gentoo is installed on.
259</p>
260
261<table>
262<tr>
263 <th>Partition</th>
264 <th>Size</th>
265 <th>Filesystem</th>
266 <th>Description</th>
267</tr>
268<tr>
269 <ti><path>/dev/hda1</path></ti>
93 <ti>800k</ti> 270 <ti>800k</ti>
94 <ti>Apple_Bootstrap</ti> 271 <ti>None</ti>
272 <ti>PReP Boot Partition (Type 0x41)</ti>
273</tr>
274<tr>
275 <ti><path>/dev/hda2</path></ti>
276 <ti>512Mb</ti>
277 <ti>Swap</ti>
278 <ti>Linux Swap (Type 0x82)</ti>
95</tr> 279</tr>
96<tr> 280<tr>
97 <ti><path>/dev/hda3</path></ti> 281 <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> 282 <ti>Rest of Disk</ti>
110 <ti>Root partition</ti> 283 <ti>ext3, reiserfs, xfs</ti>
284 <ti>Linux Root (Type 0x83)</ti>
111</tr> 285</tr>
112</table> 286</table>
113 287
114<note> 288<warn>
115There are some partitions named like this: <path>Apple_Driver43, 289<c>parted</c> is able to resize partitions including HFS+. Unfortunately there
116Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, 290may 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 291results, switch off journaling in Mac OS X before resizing. Remember that any
118delete them, because MacOS X and Linux don't need them. 292resizing 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. 293have a backup of your data before resizing!
120</note> 294</warn>
121 295
122<p> 296<p>
123If you are interested in knowing how big a partition should be, or even how many 297If 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 298partitions you need, read on. Otherwise continue now with
125link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your Disk</uri> 299<uri link="#mac-fdisk"> Default: Using mac-fdisk (Apple) to Partition your Disk
126or <uri link="#parted">Alternative: Using parted (especially Pegasos) to 300</uri> or <uri link="#parted">Alternative: Using parted (IBM/Pegasos) to
127Partition your Disk</uri>. 301Partition your Disk</uri>.
128</p> 302</p>
129 303
130</body> 304</body>
131</subsection> 305</subsection>
136<p> 310<p>
137The number of partitions is highly dependent on your environment. For instance, 311The 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 312if 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. 313<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> 314If 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 315should 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 316choice of filesystem will then maximise your performance. Game servers should
143a separate <path>/opt</path> as most gaming servers are installed there. The 317have a separate <path>/opt</path> as most game servers are installed there. The
144reason is similar for <path>/home</path>: security and backups. 318reason is similar for <path>/home</path>: security and backups. Whatever layout
319you chose, you will definitely want to keep <path>/usr</path> large: not only
320will it contain the majority of applications, the Portage tree alone takes
321more than 500Mb excluding the various sources that are stored in it.
145</p> 322</p>
146 323
147<p> 324<p>
148As you can see, it very much depends on what you want to achieve. Separate 325As you can see, it very much depends on what you want to achieve. Separate
149partitions or volumes have the following advantages: 326partitions or volumes have the following advantages:
161 If necessary, file system checks are reduced in time, as multiple checks can 338 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 339 be done in parallel (although this advantage is more with multiple disks than
163 it is with multiple partitions) 340 it is with multiple partitions)
164</li> 341</li>
165<li> 342<li>
166 Security can be enhanced by mounting some partitions or volumes read-only, 343 Security can be enhanced by mounting some partitions or volumes read-only,
167 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. 344 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
168</li> 345</li>
169</ul> 346</ul>
170 347
171<p> 348<p>
172However, multiple partitions have one big disadvantage: if not configured 349However, multiple partitions have one big disadvantage: if not configured
173properly, you might result in having a system with lots 350properly, 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 351partition and none on another. There is also a 15-partition limit for SCSI and
175limit for SCSI and SATA. 352SATA.
176</p> 353</p>
177 354
178</body> 355</body>
179</subsection> 356</subsection>
180</section> 357</section>
181<section id="fdisk"> 358<section id="mac-fdisk">
182<title>Default: Using mac-fdisk (Apple/IBM) Partition your Disk</title> 359<title>Default: Using mac-fdisk (Apple) Partition your Disk</title>
183<body> 360<body>
184 361
185<p> 362<p>
186At this point, create your partitions using <c>mac-fdisk</c>: 363At this point, create your partitions using <c>mac-fdisk</c>:
187</p> 364</p>
189<pre caption="Starting mac-fdisk"> 366<pre caption="Starting mac-fdisk">
190# <i>mac-fdisk /dev/hda</i> 367# <i>mac-fdisk /dev/hda</i>
191</pre> 368</pre>
192 369
193<p> 370<p>
194First delete the partitions you have cleared previously to make room for your 371If 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). 372partitions you have created previously to make room for your new install. Use
373<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 374partition number to delete. Usually the first partition on NewWorld machines
197NewWorld machines (Apple_partition_map) could not be deleted. 375(Apple_partition_map) could not be deleted. If you would like to start with a
376clean disk, you can simply initialize the disk by pressing <c>i</c>. This
377will completely erase the disk, so use this with caution.
198</p> 378</p>
199 379
200<p> 380<p>
201Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will 381Second, 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 382ask 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>. 383partition, followed by a <c>p</c>. For instance this is <c>2p</c>.
204</p> 384</p>
205 385
206<note> 386<note>
207This partition is <e>not</e> a "boot" partition. It is not used by Linux at all; 387This 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 388Linux 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>. 389mount it. Apple users don't need an extra partition for <path>/boot</path>.
210</note> 390</note>
211 391
212<p> 392<p>
213Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will 393Now 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> 394ask 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 395before 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 396<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> 397you want -- a minimum of 512MB is recommended, but 2 times your physical memory
218(mandatory). 398is the generally accepted size). When asked for a name, enter <c>swap</c>.
219</p> 399</p>
220 400
221<p> 401<p>
222To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select 402To 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 403from 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 404<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). 405space". When asked for the name, enter <c>root</c>.
226</p> 406</p>
227 407
228<p> 408<p>
229To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to 409To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to
230quit <c>mac-fdisk</c>. 410quit <c>mac-fdisk</c>.
231</p> 411</p>
232 412
233<note> 413<note>
234To make sure everything is ok, you should run mac-fdisk once more and check 414To 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 415whether 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 416you 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 417by pressing "i" in mac-fdisk. Note that this will recreate the partition map
238and thus remove all your partitions. 418and thus remove all your partitions.
239</note> 419</note>
240 420
241<p> 421<p>
242Now that your partitions are created, you can continue with <uri 422Now that your partitions are created, you can continue with
243link="#filesystems">Creating Filesystems</uri>. 423<uri link="#filesystems">Creating Filesystems</uri>.
244</p> 424</p>
245 425
246</body> 426</body>
247</section> 427</section>
248<section id="parted"> 428<section id="parted">
249<title>Using parted (especially Pegasos) to Partition your Disk</title> 429<title>Using parted to Partition your Disk (Pegasos and RS/6000)</title>
250<body> 430<body>
251 431
252<p> 432<p>
253<c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by 433<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 434Mac 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 435create space for your Linux partitions. Nevertheless, the example below
256describes partitioning for Pegasos machines only. 436describes partitioning for Pegasos machines only.
257</p> 437</p>
258 438
259<p> 439<p>
263<pre caption="Starting parted"> 443<pre caption="Starting parted">
264# <i>parted /dev/hda</i> 444# <i>parted /dev/hda</i>
265</pre> 445</pre>
266 446
267<p> 447<p>
268If the drive is unpartitioned, run <c>mklabel amiga</c> to create a new 448If the drive is unpartitioned, run <c>mklabel amiga</c> to create a new
269disklabel for the drive. 449disklabel for the drive.
270</p> 450</p>
271 451
272<p> 452<p>
273You can type <c>print</c> at any time in parted to display the current partition 453You 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 454table. 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 455<c>Ctrl-c</c> to abort parted.
276parted.
277</p> 456</p>
278 457
279<p> 458<p>
280If you intend to also install MorphOS on your Pegasos create an affs1 filesystem 459If 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 460at 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 461kernel. 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 462ext3, 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 463Pegasos 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 464partition 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 465<c>END</c> should be replaced with the megabyte range (e.g. <c>0 32</c> which
287starting at 5MB and ending at 55MB. 466creates a 32 MB partition starting at 0MB and ending at 32MB. If you chose to
288</p> 467create an ext2 or ext3 partition instead, substitute ext2 or ext3 for affs1 in
289 468the mkpart command.
290<p> 469</p>
291You need to create two partitions for Linux, one root filesystem for all your 470
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> 471<p>
299 472You will need to create two partitions for Linux, one root filesystem and one
473swap partition. Run <c>mkpart primary START END</c> to create each partition,
474replacing <c>START</c> and <c>END</c> with the desired megabyte boundries.
300<p> 475</p>
476
477<p>
301It is generally recommended that you create a swap partition the same size as 478It 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 479bigger 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 480recommended. To create the swap partition, run
304same time (although at least 512MB is recommended). To create the swap 481<c>mkpart primary linux-swap START END</c> with START and END again denoting
305partition, run <c>mkpart primary linux-swap START END</c>. 482the partition boundries.
306</p>
307
308<p> 483</p>
309Write down the partition minor numbers as they are required during the 484
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> 485<p>
314
315<p>
316When you are done in parted simply run <c>quit</c>. 486When you are done in parted simply type <c>quit</c>.
317</p> 487</p>
318 488
319</body> 489</body>
320</section> 490</section>
321<section id="filesystems"> 491<section id="filesystems">
323<subsection> 493<subsection>
324<title>Introduction</title> 494<title>Introduction</title>
325<body> 495<body>
326 496
327<p> 497<p>
328Now that your partitions are created, it is time to place a filesystem on them. 498Now 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 499If you're not sure which filesystems to choose and are happy with our defaults,
330as default in this handbook, continue with <uri 500continue with
331link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. 501<uri link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
332Otherwise read on to learn about the available filesystems... 502Otherwise, read on to learn about the available filesystems.
333</p> 503</p>
334 504
335</body> 505</body>
336</subsection> 506</subsection>
337<subsection> 507<subsection>
338<title>Filesystems?</title> 508<title>Filesystems?</title>
339<body> 509<body>
340 510
341<p> 511<p>
342Several filesystems are available. ext2, ext3, ReiserFS and XFS are found stable 512Several filesystems are available for use on the PowerPC architecture including
343on the PPC architecture. jfs is unsupported. 513ext2, ext3, ReiserFS and XFS, each with their strengths and faults.
344</p> 514</p>
345 515
346<p> 516<p>
347<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata 517<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 518journaling, which means that routine ext2 filesystem checks at startup time can
349be quite time-consuming. There is now quite a selection of newer-generation 519be quite time-consuming. There is now quite a selection of journaled
350journaled filesystems that can be checked for consistency very quickly and are 520filesystems that can be checked for consistency very quickly and are thus
351thus generally preferred over their non-journaled counterparts. Journaled 521generally 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> 522</p>
355 523
356<p> 524<p>
357<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata 525<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 526journaling for fast recovery in addition to other enhanced journaling modes
359full data and ordered data journaling. ext3 is a very good and reliable 527like 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 528enables high performance in almost all situations. In short, ext3 is a very
362filesystem. 529good and reliable filesystem and is highly recommended for most installs.
363</p>
364
365<p> 530</p>
531
532<p>
366<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall 533<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 534performance 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 535files (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 536extremely well and has metadata journaling. ReiserFS is solid and usable as
370solid and usable as both general-purpose filesystem and for extreme cases such 537both 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 538large filesystems, very large files and directories containing tens of
372files and directories containing tens of thousands of files. 539thousands of small files.
373</p> 540</p>
374 541
375<p> 542<p>
376<b>XFS</b> is a filesystem with metadata journaling which comes with a robust 543<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 544feature-set and is optimized for scalability. We only recommend using this
382deal of data if the system goes down unexpectedly. 549deal of data if the system goes down unexpectedly.
383</p> 550</p>
384 551
385</body> 552</body>
386</subsection> 553</subsection>
554<subsection>
555<title>Activating the Swap Partition</title>
556<body>
557
558<p>
559<c>mkswap</c> is the command that is used to initialize swap partitions:
560</p>
561
562<pre caption="Creating a swap signature">
563# <i>mkswap /dev/hda3</i>
564</pre>
565
566<p>
567To activate the swap partition, use <c>swapon</c>:
568</p>
569
570<pre caption="Activating the swap partition">
571# <i>swapon /dev/hda3</i>
572</pre>
573
574<p>
575Create and activate the swap now before creating other filesystems.
576</p>
577
578</body>
579</subsection>
387<subsection id="filesystems-apply"> 580<subsection id="filesystems-apply">
388<title>Applying a Filesystem to a Partition</title> 581<title>Applying a Filesystem to a Partition</title>
389<body> 582<body>
390 583
391<p> 584<p>
415 <ti><c>mkfs.xfs</c></ti> 608 <ti><c>mkfs.xfs</c></ti>
416</tr> 609</tr>
417</table> 610</table>
418 611
419<p> 612<p>
420For instance, to have the root partition (<path>/dev/hda4</path> in our example) 613For instance, to make an ext3 filesystem on the root partition
421in ext3 (as in our example), you would use: 614(<path>/dev/hda4</path> in our example), you would use:
422</p> 615</p>
423 616
424<pre caption="Applying a filesystem on a partition"> 617<pre caption="Applying a filesystem on a partition">
425# <i>mke2fs -j /dev/hda4</i> 618# <i>mke2fs -j /dev/hda4</i>
426</pre> 619</pre>
429Now create the filesystems on your newly created partitions (or logical 622Now create the filesystems on your newly created partitions (or logical
430volumes). 623volumes).
431</p> 624</p>
432 625
433<note> 626<note>
434On OldWorld machines and the PegasosII your partition which holds the kernel must 627On 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, 628affs1. NewWorld machines can boot from any of ext2, ext3, XFS, ReiserFS or
436ReiserFS or even HFS/HFS+ filesystems. 629even HFS/HFS+ filesystems. On OldWorld machines booting with BootX, the kernel
630must be placed on an HFS partition, but this will be completed when you
631configure your bootloader.
437</note> 632</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 633
465</body> 634</body>
466</subsection> 635</subsection>
467</section> 636</section>
468<section> 637<section>
469<title>Mounting</title> 638<title>Mounting</title>
470<body> 639<body>
471 640
472<p> 641<p>
473Now that your partitions are initialized and are housing a filesystem, it is 642Now 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 643time 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 644mount the root partition:
476example we create a mount-point and mount the root partition:
477</p> 645</p>
478 646
479<pre caption="Mounting partitions"> 647<pre caption="Mounting partitions">
480# <i>mkdir /mnt/gentoo</i>
481# <i>mount /dev/hda4 /mnt/gentoo</i> 648# <i>mount /dev/hda4 /mnt/gentoo</i>
482</pre> 649</pre>
483 650
484<note> 651<note>
485If you want your <path>/tmp</path> to reside on a separate partition, be sure to 652If 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 653change its permissions after mounting and unpacking with
487also holds for <path>/var/tmp</path>. 654<c>chmod 1777 /mnt/gentoo/tmp</c>. This is also true for <path>/var/tmp</path>.
488</note> 655</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 656
507<p> 657<p>
508Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo 658Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
509Installation Files</uri>. 659Installation Files</uri>.
510</p> 660</p>

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

  ViewVC Help
Powered by ViewVC 1.1.20