

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.50 - (show annotations) (download) (as text)
Mon Oct 17 19:51:45 2011 UTC (2 years, 8 months ago) by swift
Branch: MAIN
Changes since 1.49: +13 -7 lines
File MIME type: application/xml
Enhancing information on downsides wrt multiple partitions.

This hopefully also clears up some of the confusion that is surrounding
separate /usr partitions. Yes, it now mentions that an initramfs might be
needed in that case.

And no, we do not "recommend" a separate /usr partition, nor do we
"not recommend" it.

7 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.49 2010/07/21 01:28:29 nightmorph Exp $ -->
9 <sections>
11 <abstract>
12 To be able to install Gentoo, you must create the necessary partitions.
13 This chapter describes how to partition a disk for future usage.
14 </abstract>
16 <version>11</version>
17 <date>2011-10-17</date>
19 <section>
20 <title>Introduction to Block Devices</title>
22 <subsection>
23 <include href="hb-install-blockdevices.xml"/>
24 </subsection>
26 <subsection>
27 <title>Partitions</title>
28 <body>
30 <p>
31 Although it is theoretically possible to use a full disk to house your Linux
32 system, this is almost never done in practice. Instead, full disk block devices
33 are split up in smaller, more manageable block devices. On most systems,
34 these are called <e>partitions</e>.
35 </p>
37 </body>
38 </subsection>
39 </section>
40 <section>
41 <title>Designing a Partitioning Scheme</title>
42 <subsection>
43 <title>Default Partitioning Scheme</title>
44 <body>
46 <p>
47 If you are not interested in drawing up a partitioning scheme for your system,
48 you can use the partitioning scheme we use throughout this book. Choose the
49 filesystem layout that best matches the type of PowerPC system you are
50 installing on.
51 </p>
53 </body>
54 </subsection>
55 <subsection>
56 <title>Apple New World</title>
57 <body>
59 <p>
60 Apple New World machines are fairly straightforward to configure. The first
61 partition is always an <e>Apple Partition Map</e>. This partition keeps track of
62 the layout of the disk. You cannot remove this partition. The next partition
63 should always be a bootstrap partition. This partition contains a small (800k)
64 HFS filesystem that holds a copy of the bootloader Yaboot and its configuration
65 file. This partition is <e>not</e> the same as a <path>/boot</path> partition as
66 found on other architectures. After the boot partition, the usual Linux
67 filesystems are placed, according to the scheme below. The swap partition is a
68 temporary storage place for when your system runs out of physical memory. The
69 root partition will contain the filesystem that Gentoo is installed on. If you
70 wish to dual boot, the OSX partition can go anywhere after the bootstrap
71 partition to insure that yaboot starts first.
72 </p>
74 <note>
75 There may be "Disk Driver" partitions on your disk such as
79 for this, you can remove them by initializing the disk with <c>mac-fdisk</c>'s
81 let them be.
82 </note>
84 <note>
85 If you partitioned this disk with Apple's Disk Utility, there may be
86 128Mb spaces between partitions which Apple reserves for "future use". You
87 can safely remove these.
88 </note>
90 <table>
91 <tr>
92 <th>Partition</th>
93 <th>Size</th>
94 <th>Filesystem</th>
95 <th>Description</th>
96 </tr>
97 <tr>
99 <ti>32k</ti>
100 <ti>None</ti>
101 <ti>Apple Partition Map</ti>
102 </tr>
103 <tr>
105 <ti>800k</ti>
106 <ti>HFS</ti>
107 <ti>Apple Bootstrap</ti>
108 </tr>
109 <tr>
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>
123 </body>
124 </subsection>
125 <subsection>
126 <title>Apple Old World</title>
127 <body>
129 <p>
130 Apple Old World machines are a bit more complicated to configure. The first
133 BootX, the configuration below assumes that MacOS is installed on a seperate
135 Disk Drivers" such as <path>Apple_Driver63, Apple_Driver_ATA, Apple_FWDriver,
136 Apple_Driver_IOKit, Apple_Patches</path> and the MacOS install. If you are
138 other Apple boot methods. After the boot partition, the usual Linux filesystems
139 are placed, according to the scheme below. The swap partition is a temporary
140 storage place for when your system runs out of physical memory. The root
141 partition will contain the filesystem that Gentoo is installed on.
142 </p>
144 <note>
145 If you are using an OldWorld machine, you will need to keep MacOS available.
146 The layout here assumes MacOS is installed on a separate drive.
147 </note>
149 <table>
150 <tr>
151 <th>Partition</th>
152 <th>Size</th>
153 <th>Filesystem</th>
154 <th>Description</th>
155 </tr>
156 <tr>
158 <ti>32k</ti>
159 <ti>None</ti>
160 <ti>Apple Partition Map</ti>
161 </tr>
162 <tr>
164 <ti>32Mb</ti>
165 <ti>ext2</ti>
166 <ti>Quik Boot Partition (quik only)</ti>
167 </tr>
168 <tr>
170 <ti>512Mb</ti>
171 <ti>Swap</ti>
172 <ti>Linux Swap</ti>
173 </tr>
174 <tr>
176 <ti>Rest of Disk</ti>
177 <ti>ext3, reiserfs, xfs</ti>
178 <ti>Linux Root</ti>
179 </tr>
180 </table>
182 </body>
183 </subsection>
184 <subsection>
185 <title>Pegasos</title>
186 <body>
188 <p>
189 The Pegasos partition layout is quite simple compared to the Apple layouts.
190 The first partition is a Boot Partition, which contains kernels to be booted,
191 along with an Open Firmware script that presents a menu on boot. After the boot
192 partition, the usual Linux filesystems are placed, according to the scheme
193 below. The swap partition is a temporary storage place for when your system
194 runs out of physical memory. The root partition will contain the filesystem
195 that Gentoo is installed on.
196 </p>
198 <table>
199 <tr>
200 <th>Partition</th>
201 <th>Size</th>
202 <th>Filesystem</th>
203 <th>Description</th>
204 </tr>
205 <tr>
207 <ti>32Mb</ti>
208 <ti>affs1 or ext2</ti>
209 <ti>Boot Partition</ti>
210 </tr>
211 <tr>
213 <ti>512Mb</ti>
214 <ti>Swap</ti>
215 <ti>Linux Swap</ti>
216 </tr>
217 <tr>
219 <ti>Rest of Disk</ti>
220 <ti>ext3, reiserfs, xfs</ti>
221 <ti>Linux Root</ti>
222 </tr>
223 </table>
225 </body>
226 </subsection>
227 <subsection>
228 <title>IBM PReP (RS/6000)</title>
229 <body>
231 <p>
232 The IBM PowerPC Reference Platform (PReP) requires a small PReP boot partition
233 on the disk's first partition, followed by the swap and root partitions.
234 </p>
236 <table>
237 <tr>
238 <th>Partition</th>
239 <th>Size</th>
240 <th>Filesystem</th>
241 <th>Description</th>
242 </tr>
243 <tr>
245 <ti>800k</ti>
246 <ti>None</ti>
247 <ti>PReP Boot Partition (Type 0x41)</ti>
248 </tr>
249 <tr>
251 <ti>512Mb</ti>
252 <ti>Swap</ti>
253 <ti>Linux Swap (Type 0x82)</ti>
254 </tr>
255 <tr>
257 <ti>Rest of Disk</ti>
258 <ti>ext3, reiserfs, xfs</ti>
259 <ti>Linux Root (Type 0x83)</ti>
260 </tr>
261 </table>
263 <warn>
265 may be issues with resizing HFS+ journaled filesystems, so, for the best
266 results, switch off journaling in Mac OS X before resizing. Remember that any
267 resizing operation is dangerous, so attempt at your own risk! Be sure to always
268 have a backup of your data before resizing!
269 </warn>
271 <p>
273 partitions you need, read on. Otherwise continue now with
276 Partition your Disk</uri>.
277 </p>
279 </body>
280 </subsection>
281 <subsection>
282 <title>How Many and How Big?</title>
283 <body>
285 <p>
286 The number of partitions is highly dependent on your environment. For instance,
287 if you have lots of users, you will most likely want to have your
291 choice of filesystem will then maximise your performance. Game servers should
295 will it contain the majority of applications, the Portage tree alone takes
296 more than 500Mb excluding the various sources that are stored in it.
297 </p>
299 <p>
301 partitions or volumes have the following advantages:
302 </p>
304 <ul>
305 <li>
306 You can choose the best performing filesystem for each partition or volume
307 </li>
308 <li>
309 Your entire system cannot run out of free space if one defunct tool is
310 continuously writing files to a partition or volume
311 </li>
312 <li>
313 If necessary, file system checks are reduced in time, as multiple checks can
314 be done in parallel (although this advantage is more with multiple disks than
315 it is with multiple partitions)
316 </li>
317 <li>
318 Security can be enhanced by mounting some partitions or volumes read-only,
320 </li>
321 </ul>
323 <p>
324 However, multiple partitions have disadvantages as well. If not configured
325 properly, you will have a system with lots of free space on one partition and
326 none on another. Another nuisance is that separate partitions - especially
327 for important mountpoints like <path>/usr</path> or <path>/var</path> - often
328 require the administrator to boot with an initramfs to mount the partition
329 before other boot scripts start. This isn't always the case though, so YMMV.
330 </p>
332 <p>
333 There is also a 15-partition limit for SCSI and SATA.
334 </p>
336 </body>
337 </subsection>
338 </section>
339 <section id="mac-fdisk">
341 <body>
343 <p>
345 </p>
347 <pre caption="Starting mac-fdisk">
348 # <i>mac-fdisk /dev/sda</i>
349 </pre>
351 <p>
352 If you used Apple's Disk Utility to leave space for Linux, first delete the
353 partitions you have created previously to make room for your new install. Use
355 partition number to delete. Usually the first partition on NewWorld machines
356 (Apple_partition_map) cannot be deleted. If you would like to start with a
358 will completely erase the disk, so use this with caution.
359 </p>
361 <p>
363 ask for what block you want to start. Enter the number of your first free
365 </p>
367 <note>
371 </note>
373 <p>
376 before to create the Apple_Bootstrap partition, you now have to enter
380 </p>
382 <p>
384 from what block the root partition should start. When asked for the size, enter
387 </p>
389 <p>
391 quit <c>mac-fdisk</c>.
392 </p>
394 <note>
396 whether all the partitions are there. If you don't see any of the partitions you
397 created, or the changes you made, you should reinitialize your partitions by
398 pressing <c>i</c> in <c>mac-fdisk</c>. Note that this will recreate the
399 partition map and thus remove all your partitions.
400 </note>
402 <p>
403 Now that your partitions are created, you can continue with
404 <uri link="#filesystems">Creating Filesystems</uri>.
405 </p>
407 </body>
408 </section>
409 <section id="parted">
411 <body>
413 <p>
416 create space for your Linux partitions. Nevertheless, the example below
417 describes partitioning for Pegasos machines only.
418 </p>
420 <p>
421 To begin let's fire up <c>parted</c>:
422 </p>
424 <pre caption="Starting parted">
425 # <i>parted /dev/sda</i>
426 </pre>
428 <p>
430 disklabel for the drive.
431 </p>
433 <p>
436 <c>Ctrl-c</c> to abort <c>parted</c>.
437 </p>
439 <p>
440 If you intend to also install MorphOS on your Pegasos create an affs1 filesystem
443 ext3, you will also have to store your Linux kernel on this partition (the
448 create an ext2 or ext3 partition instead, substitute ext2 or ext3 for affs1 in
449 the <c>mkpart</c> command.
450 </p>
452 <p>
453 You will need to create two partitions for Linux, one root filesystem and one
456 </p>
458 <p>
459 It is generally recommended that you create a swap partition that is two times
460 bigger than the amount of RAM in your computer, but at least 512Mb is
461 recommended. To create the swap partition, run
463 the partition boundries.
464 </p>
466 <p>
467 When you are done in <c>parted</c> simply type <c>quit</c>.
468 </p>
470 </body>
471 </section>
472 <section id="filesystems">
473 <title>Creating Filesystems</title>
474 <subsection>
475 <title>Introduction</title>
476 <body>
478 <p>
480 If you're not sure which filesystems to choose and are happy with our defaults,
481 continue with
483 Otherwise, read on to learn about the available filesystems.
484 </p>
486 </body>
487 </subsection>
489 <subsection>
490 <include href="hb-install-filesystems.xml"/>
491 </subsection>
493 <subsection>
494 <title>Activating the Swap Partition</title>
495 <body>
497 <p>
499 </p>
501 <pre caption="Creating a swap signature">
502 # <i>mkswap /dev/sda3</i>
503 </pre>
505 <p>
506 To activate the swap partition, use <c>swapon</c>:
507 </p>
509 <pre caption="Activating the swap partition">
510 # <i>swapon /dev/sda3</i>
511 </pre>
513 <p>
514 Create and activate the swap now before creating other filesystems.
515 </p>
517 </body>
518 </subsection>
519 <subsection id="filesystems-apply">
520 <title>Applying a Filesystem to a Partition</title>
521 <body>
523 <p>
524 To create a filesystem on a partition or volume, there are tools available for
525 each possible filesystem:
526 </p>
528 <table>
529 <tr>
530 <th>Filesystem</th>
531 <th>Creation Command</th>
532 </tr>
533 <tr>
534 <ti>ext2</ti>
535 <ti><c>mke2fs</c></ti>
536 </tr>
537 <tr>
538 <ti>ext3</ti>
540 </tr>
541 <tr>
542 <ti>reiserfs</ti>
543 <ti><c>mkreiserfs</c></ti>
544 </tr>
545 <tr>
546 <ti>xfs</ti>
547 <ti><c>mkfs.xfs</c></ti>
548 </tr>
549 </table>
551 <p>
552 For instance, to make an ext3 filesystem on the root partition
553 (<path>/dev/sda4</path> in our example), you would use:
554 </p>
556 <pre caption="Applying a filesystem on a partition">
557 # <i>mke2fs -j /dev/sda4</i>
558 </pre>
560 <p>
561 Now create the filesystems on your newly created partitions (or logical
562 volumes).
563 </p>
565 <impo>
566 If you choose to use ReiserFS for <path>/</path>, do not change its default
567 block size if you will also be using <c>yaboot</c> as your bootloader, as
568 explained in <uri link="?part=1&amp;chap=10">Configuring the Bootloader</uri>.
569 </impo>
571 <note>
572 On the PegasosII your partition which holds the kernel must be ext2, ext3 or
574 even HFS/HFS+ filesystems. On OldWorld machines booting with BootX, the kernel
575 must be placed on an HFS partition, but this will be completed when you
576 configure your bootloader.
577 </note>
579 </body>
580 </subsection>
581 </section>
582 <section>
583 <title>Mounting</title>
584 <body>
586 <p>
587 Now that your partitions are initialized and are housing a filesystem, it is
589 mount the root partition:
590 </p>
592 <pre caption="Mounting partitions">
593 # <i>mount /dev/sda4 /mnt/gentoo</i>
594 </pre>
596 <note>
598 change its permissions after mounting and unpacking with
600 </note>
602 <p>
604 Installation Files</uri>.
605 </p>
607 </body>
608 </section>
609 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20