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

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.50

  ViewVC Help
Powered by ViewVC 1.1.20