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

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.51

  ViewVC Help
Powered by ViewVC 1.1.20