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

Contents of /xml/htdocs/doc/en/handbook/hb-install-ppc64-disk.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.29 - (show annotations) (download) (as text)
Mon May 7 18:11:41 2007 UTC (7 years, 2 months ago) by nightmorph
Branch: MAIN
Changes since 1.28: +28 -30 lines
File MIME type: application/xml
2007.0 release is here; final changes and new docs

1 <?xml version='1.0' encoding='UTF-8'?>
2 <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3
4 <!-- The content of this document is licensed under the CC-BY-SA license -->
5 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6
7 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-ppc64-disk.xml,v 1.18 2007/04/27 06:55:51 nightmorph Exp $ -->
8
9 <sections>
10
11 <version>8.0</version>
12 <date>2007-05-07</date>
13
14 <section>
15 <title>Introduction to Block Devices</title>
16 <subsection>
17 <title>Block Devices</title>
18 <body>
19
20 <p>
21 We'll take a good look at disk-oriented aspects of Gentoo Linux
22 and Linux in general, including Linux filesystems, partitions and block devices.
23 Then, once you're familiar with the ins and outs of disks and filesystems,
24 you'll be guided through the process of setting up partitions and filesystems
25 for your Gentoo Linux installation.
26 </p>
27
28 <p>
29 To begin, we'll introduce <e>block devices</e>. The most famous block device is
30 probably the 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
32 drive would be <path>/dev/sda</path>. Serial ATA drives are also
33 <path>/dev/sda</path> even if they are IDE drives.
34 </p>
35
36 <p>
37 The block devices above represent an abstract interface to the disk. User
38 programs can use these block devices to interact with your disk without worrying
39 about whether your drives are IDE, SCSI or something else. The program can
40 simply address the storage on the disk as a bunch of contiguous,
41 randomly-accessible 512-byte blocks.
42 </p>
43
44 </body>
45 </subsection>
46 <subsection>
47 <title>Partitions and Slices</title>
48 <body>
49
50 <p>
51 Although it is theoretically possible to use a full disk to house your Linux
52 system, this is almost never done in practice. Instead, full disk block devices
53 are split up in smaller, more manageable block devices. On most systems,
54 these are called <e>partitions</e>. Other architectures use a similar technique,
55 called <e>slices</e>.
56 </p>
57
58 </body>
59 </subsection>
60 </section>
61 <section>
62 <title>Designing a Partitioning Scheme</title>
63 <subsection>
64 <title>Default Partitioning Scheme</title>
65 <body>
66
67 <p>
68 If you are not interested in drawing up a partitioning scheme for your system,
69 you can use the partitioning scheme we use throughout this book:
70 </p>
71
72 <table>
73 <tr>
74 <th>Partition</th>
75 <th>Filesystem</th>
76 <th>Size</th>
77 <th>Description</th>
78 </tr>
79 <tr>
80 <ti><path>/dev/sda1</path></ti>
81 <ti>Partition map</ti>
82 <ti>31.5k</ti>
83 <ti>Partition map</ti>
84 </tr>
85 <tr>
86 <ti><path>/dev/sda2</path></ti>
87 <ti>(bootstrap)</ti>
88 <ti>800k</ti>
89 <ti>Apple_Bootstrap</ti>
90 </tr>
91 <tr>
92 <ti><path>/dev/sda3</path></ti>
93 <ti>(swap)</ti>
94 <ti>512M</ti>
95 <ti>Swap partition</ti>
96 </tr>
97 <tr>
98 <ti><path>/dev/sda4</path></ti>
99 <ti>ext3</ti>
100 <ti>Rest of the disk</ti>
101 <ti>Root partition</ti>
102 </tr>
103 </table>
104
105 <note>
106 There are some partitions named like this: <path>Apple_Driver43,
107 Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches</path>. If
108 you are not planning to use MacOS 9 you can delete them, because MacOS X and
109 Linux don't need them. You might have to use parted in order to delete them, as
110 mac-fdisk can't delete them yet.
111 </note>
112
113 <p>
114 If you are interested in knowing how big a partition should be, or even how
115 many partitions you need, read on. Otherwise continue now with
116 <uri link="#mac-fdisk">Apple G5: Using mac-fdisk to Partition your
117 Disk</uri> or <uri link="#fdisk">IBM pSeries: using fdisk to Partition
118 your Disk</uri>
119 </p>
120
121 </body>
122 </subsection>
123 <subsection>
124 <title>How Many and How Big?</title>
125 <body>
126
127 <p>
128 The number of partitions is highly dependent on your environment. For instance,
129 if you have lots of users, you will most likely want to have your
130 <path>/home</path> separate as it increases security and makes backups easier.
131 If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
132 should be separate as all mails are stored inside <path>/var</path>. A good
133 choice of filesystem will then maximise your performance. Gameservers will have
134 a separate <path>/opt</path> as most gaming servers are installed there. The
135 reason is similar for <path>/home</path>: security and backups. You will
136 definitely want to keep <path>/usr</path> big: not only will it contain the
137 majority of applications, the Portage tree alone takes around 500 Mbyte
138 excluding the various sources that are stored in it.
139 </p>
140
141 <p>
142 As you can see, it very much depends on what you want to achieve. Separate
143 partitions or volumes have the following advantages:
144 </p>
145
146 <ul>
147 <li>
148 You can choose the best performing filesystem for each partition or volume
149 </li>
150 <li>
151 Your entire system cannot run out of free space if one defunct tool is
152 continuously writing files to a partition or volume
153 </li>
154 <li>
155 If necessary, file system checks are reduced in time, as multiple checks can
156 be done in parallel (although this advantage is more with multiple disks than
157 it is with multiple partitions)
158 </li>
159 <li>
160 Security can be enhanced by mounting some partitions or volumes read-only,
161 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
162 </li>
163 </ul>
164
165 <p>
166 However, multiple partitions have one big disadvantage: if not configured
167 properly, you might result in having a system with lots of free space on one
168 partition and none on another. There is also a 15-partition limit for SCSI and
169 SATA.
170 </p>
171
172 </body>
173 </subsection>
174 </section>
175 <section id="mac-fdisk">
176 <title>Default: Using mac-fdisk (Apple G5) to Partition your Disk</title>
177 <body>
178
179 <p>
180 At this point, create your partitions using <c>mac-fdisk</c>:
181 </p>
182
183 <pre caption="Starting mac-fdisk">
184 # <i>mac-fdisk /dev/sda</i>
185 </pre>
186
187 <p>
188 First delete the partitions you have cleared previously to make room for your
189 Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s).
190 It will ask for the partition number to delete.
191 </p>
192
193 <p>
194 Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will
195 ask for what block you want to start. Enter the number of your first free
196 partition, followed by a <c>p</c>. For instance this is <c>2p</c>.
197 </p>
198
199 <note>
200 This partition is <e>not</e> a "boot" partition. It is not used by Linux at all;
201 you don't have to place any filesystem on it and you should never mount it. PPC
202 users don't need an extra partition for <path>/boot</path>.
203 </note>
204
205 <p>
206 Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will
207 ask for what block you want to start this partition from. As we used <c>2</c>
208 before to create the Apple_Bootstrap partition, you now have to enter
209 <c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size
210 you want). When asked for a name, enter <c>swap</c> (mandatory).
211 </p>
212
213 <p>
214 To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select
215 from what block the root partition should start. When asked for the size, enter
216 <c>4p</c> again. <c>mac-fdisk</c> will interpret this as "Use all available
217 space". When asked for the name, enter <c>root</c> (mandatory).
218 </p>
219
220 <p>
221 To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to
222 quit <c>mac-fdisk</c>.
223 </p>
224
225 <note>
226 To make sure everything is ok, you should run mac-fdisk once more and check
227 whether all the partitions are there. If you don't see any of the partitions you
228 created, or the changes you made, you should reinitialize your partitions by
229 pressing <c>i</c> in mac-fdisk. Note that this will recreate the partition map
230 and thus remove all your partitions.
231 </note>
232
233 <p>
234 Now that your partitions are created, you can now continue with <uri
235 link="#filesystems">Creating Filesystems</uri>.
236 </p>
237
238 </body>
239 </section>
240 <section id="fdisk">
241 <title>IBM pSeries, iSeries and OpenPower: using fdisk to Partition your Disk</title>
242 <subsection>
243 <body>
244
245 <note>
246 If you are planning to use a RAID disk array for your Gentoo installation and
247 you are using POWER5-based hardware, you should now run <c>iprconfig</c> to
248 format the disks to Advanced Function format and create the disk array. You
249 should emerge <c>iprutils</c> after your install is complete.
250 </note>
251
252 <p>
253 If you have an ipr-based SCSI adapter, you should start the ipr utilities now.
254 </p>
255
256 <pre caption="Starting ipr utilities">
257 # <i>/etc/init.d/iprinit start</i>
258 </pre>
259
260 <p>
261 The following parts explain how to create the example partition layout
262 described previously, namely:
263 </p>
264
265 <table>
266 <tr>
267 <th>Partition</th>
268 <th>Description</th>
269 </tr>
270 <tr>
271 <ti><path>/dev/sda1</path></ti>
272 <ti>PPC PReP Boot partition</ti>
273 </tr>
274 <tr>
275 <ti><path>/dev/sda2</path></ti>
276 <ti>Swap partition</ti>
277 </tr>
278 <tr>
279 <ti><path>/dev/sda3</path></ti>
280 <ti>Root partition</ti>
281 </tr>
282 </table>
283
284 <p>
285 Change your partition layout according to your own preference.
286 </p>
287
288 </body>
289 </subsection>
290 <subsection>
291 <title>Viewing the Current Partition Layout</title>
292 <body>
293
294 <p>
295 <c>fdisk</c> is a popular and powerful tool to split your disk into
296 partitions. Fire up <c>fdisk</c> on your disk (in our example, we
297 use <path>/dev/sda</path>):
298 </p>
299
300 <pre caption="Starting fdisk">
301 # <i>fdisk /dev/sda</i>
302 </pre>
303
304 <p>
305 Once in <c>fdisk</c>, you'll be greeted with a prompt that looks like
306 this:
307 </p>
308
309 <pre caption="fdisk prompt">
310 Command (m for help):
311 </pre>
312
313 <p>
314 If you still have an AIX partition layout on your system, you will get the
315 following error message:
316 </p>
317
318 <pre caption="Error message from fdisk">
319 There is a valid AIX label on this disk.
320 Unfortunately Linux cannot handle these
321 disks at the moment. Nevertheless some
322 advice:
323 1. fdisk will destroy its contents on write.
324 2. Be sure that this disk is NOT a still vital
325 part of a volume group. (Otherwise you may
326 erase the other disks as well, if unmirrored.)
327 3. Before deleting this physical volume be sure
328 to remove the disk logically from your AIX
329 machine. (Otherwise you become an AIXpert).
330
331 Command (m for help):
332 </pre>
333
334 <p>
335 Don't worry, you can create a new empty dos partition table by pressing
336 <c>o</c>.
337 </p>
338
339 <warn>
340 This will destroy any installed AIX version
341 </warn>
342
343 <p>
344 Type <c>p</c> to display your disk current partition configuration:
345 </p>
346
347 <pre caption="An example partition configuration">
348 Command (m for help): p
349
350 Disk /dev/sda: 30.7 GB, 30750031872 bytes
351 141 heads, 63 sectors/track, 6761 cylinders
352 Units = cylinders of 8883 * 512 = 4548096 bytes
353
354 Device Boot Start End Blocks Id System
355 /dev/sda1 1 12 53266+ 83 Linux
356 /dev/sda2 13 233 981571+ 82 Linux swap
357 /dev/sda3 234 674 1958701+ 83 Linux
358 /dev/sda4 675 6761 27035410+ 5 Extended
359 /dev/sda5 675 2874 9771268+ 83 Linux
360 /dev/sda6 2875 2919 199836 83 Linux
361 /dev/sda7 2920 3008 395262 83 Linux
362 /dev/sda8 3009 6761 16668918 83 Linux
363
364 Command (m for help):
365 </pre>
366
367 <p>
368 This particular disk is configured to house six Linux filesystems
369 (each with a corresponding partition listed as "Linux") as well as a
370 swap partition (listed as "Linux swap").
371 </p>
372
373 </body>
374 </subsection>
375 <subsection>
376 <title>Removing all Partitions</title>
377 <body>
378
379 <p>
380 We will first remove all existing partitions from the disk. Type
381 <c>d</c> to delete a partition. For instance, to delete an existing
382 <path>/dev/sda1</path>:
383 </p>
384
385 <note>
386 If you don't want to delete all partitions just delete those you
387 want to delete. At this point the author recommends a backup of your
388 data to avoid the lose of it.
389 </note>
390
391 <pre caption="Deleting a partition">
392 Command (m for help): <i>d</i>
393 Partition number (1-4): <i>1</i>
394 </pre>
395
396 <p>
397 The partition has been scheduled for deletion. It will no longer show up
398 if you type <c>p</c>, but it will not be erased until your changes have
399 been saved. If you made a mistake and want to abort without saving your
400 changes, type <c>q</c> immediately and hit enter and your partition will
401 not be deleted.
402 </p>
403
404 <p>
405 Now, assuming that you do indeed want to wipe out all the partitions on
406 your system, repeatedly type <c>p</c> to print out a partition listing
407 and then type <c>d</c> and the number of the partition to delete it.
408 Eventually, you'll end up with a partition table with nothing in it:
409 </p>
410
411 <pre caption="An empty partition table">
412 Disk /dev/sda: 30.7 GB, 30750031872 bytes
413 141 heads, 63 sectors/track, 6761 cylinders
414 Units = cylinders of 8883 * 512 = 4548096 bytes
415
416 Device Boot Start End Blocks Id System
417
418 Command (m for help):
419 </pre>
420
421 <p>
422 Now that the in-memory partition table is empty, we're ready to create
423 the partitions. We will use a default partitioning scheme as discussed
424 previously. Of course, don't follow these instructions to the letter if
425 you don't want the same partitioning scheme!
426 </p>
427
428 </body>
429 </subsection>
430 <subsection>
431 <title>Creating the PPC PReP boot partition</title>
432 <body>
433
434 <p>
435 We first create a small PReP boot partition. Type <c>n</c> to create a new
436 partition, then <c>p</c> to select a primary partition, followed by
437 <c>1</c> to select the first primary partition. When prompted for the
438 first cylinder, hit enter. When prompted for the last cylinder, type
439 <c>+7M</c> to create a partition 7 Mbyte in size. After you've done
440 this, type <c>t</c> to set the partition type, <c>1</c> to select the
441 partition you just created and then type in <c>41</c> to set the
442 partition type to "PPC PReP Boot". Finally, you'll need to mark the PReP
443 partition as bootable.
444 </p>
445
446 <note>
447 The PReP partition has to be smaller than 8 MByte!
448 </note>
449
450 <pre caption="Creating the PReP boot partition">
451 Command (m for help): <i>p</i>
452
453 Disk /dev/sda: 30.7 GB, 30750031872 bytes
454 141 heads, 63 sectors/track, 6761 cylinders
455 Units = cylinders of 8883 * 512 = 4548096 bytes
456
457 Device Boot Start End Blocks Id System
458
459 Command (m for help): <i>n</i>
460 Command action
461 e extended
462 p primary partition (1-4)
463 <i>p</i>
464 Partition number (1-4): <i>1</i>
465 First cylinder (1-6761, default 1):
466 Using default value 1
467 Last cylinder or +size or +sizeM or +sizeK (1-6761, default
468 6761): <i>+8M</i>
469
470 Command (m for help): <i>t</i>
471 Selected partition 1
472 Hex code (type L to list codes): <i>41</i>
473 Changed system type of partition 1 to 41 (PPC PReP Boot)
474
475 Command (m for help): <i>a</i>
476 Partition number (1-4): <i>1</i>
477 Command (m for help):
478 </pre>
479
480 <p>
481 Now, when you type <c>p</c>, you should see the following partition information:
482 </p>
483
484 <pre caption="Created boot partition">
485 Command (m for help): <i>p</i>
486
487 Disk /dev/sda: 30.7 GB, 30750031872 bytes
488 141 heads, 63 sectors/track, 6761 cylinders
489 Units = cylinders of 8883 * 512 = 4548096 bytes
490
491 Device Boot Start End Blocks Id System
492 /dev/sda1 * 1 3 13293 41 PPC PReP Boot
493
494 Command (m for help):
495 </pre>
496 </body>
497 </subsection>
498 <subsection>
499 <title>Creating the Swap Partition</title>
500 <body>
501
502 <p>
503 Let's now create the swap partition. To do this, type <c>n</c> to create
504 a new partition, then <c>p</c> to tell fdisk that you want a primary
505 partition. Then type <c>2</c> to create the second primary partition,
506 <path>/dev/sda2</path> in our case. When prompted for the first
507 cylinder, hit enter. When prompted for the last cylinder, type
508 <c>+512M</c> to create a partition 512MB in size. After you've done
509 this, type <c>t</c> to set the partition type, <c>2</c> to select the
510 partition you just created and then type in <c>82</c> to set the
511 partition type to "Linux Swap". After completing these steps, typing
512 <c>p</c> should display a partition table that looks similar to this:
513 </p>
514
515 <pre caption="Partition listing after creating a swap partition">
516 Command (m for help): <i>p</i>
517
518 Disk /dev/sda: 30.7 GB, 30750031872 bytes
519 141 heads, 63 sectors/track, 6761 cylinders
520 Units = cylinders of 8883 * 512 = 4548096 bytes
521
522 Device Boot Start End Blocks Id System
523 /dev/sda1 1 3 13293 41 PPC PReP Boot
524 /dev/sda2 4 117 506331 82 Linux swap
525
526 Command (m for help):
527 </pre>
528
529 </body>
530 </subsection>
531 <subsection>
532 <title>Creating the Root Partition</title>
533 <body>
534
535 <p>
536 Finally, let's create the root partition. To do this, type <c>n</c> to
537 create a new partition, then <c>p</c> to tell fdisk that you want a
538 primary partition. Then type <c>3</c> to create the third primary
539 partition, <path>/dev/sda3</path> in our case. When prompted for the
540 first cylinder, hit enter. When prompted for the last cylinder, hit
541 enter to create a partition that takes up the rest of the remaining
542 space on your disk. After completing these steps, typing <c>p</c> should
543 display a partition table that looks similar to this:
544 </p>
545
546 <pre caption="Partition listing after creating the root partition">
547 Command (m for help): p
548
549 Disk /dev/sda: 30.7 GB, 30750031872 bytes
550 141 heads, 63 sectors/track, 6761 cylinders
551 Units = cylinders of 8883 * 512 = 4548096 bytes
552
553 Device Boot Start End Blocks Id System
554 /dev/sda1 1 3 13293 41 PPC PReP Boot
555 /dev/sda2 4 117 506331 82 Linux swap
556 /dev/sda3 118 6761 29509326 83 Linux
557
558 Command (m for help):
559 </pre>
560 </body>
561 </subsection>
562 <subsection>
563 <title>Saving the Partition Layout</title>
564 <body>
565
566 <p>
567 To save the partition layout and exit <c>fdisk</c>, type <c>w</c>.
568 </p>
569
570 <pre caption="Save and exit fdisk">
571 Command (m for help): <i>w</i>
572 </pre>
573
574 <p>
575 Now that your partitions are created, you can now continue with <uri
576 link="#filesystems">Creating Filesystems</uri>.
577 </p>
578
579 </body>
580 </subsection>
581 </section>
582 <section id="filesystems">
583 <title>Creating Filesystems</title>
584 <subsection>
585 <title>Introduction</title>
586 <body>
587
588 <p>
589 Now that your partitions are created, it is time to place a filesystem on them.
590 If you don't care about what filesystem to choose and are happy with what we use
591 as default in this handbook, continue with <uri
592 link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
593 Otherwise read on to learn about the available filesystems...
594 </p>
595
596 </body>
597 </subsection>
598 <subsection>
599 <title>Filesystems?</title>
600 <body>
601
602 <note>
603 Several filesystems are available. ext2, ext3 and ReiserFS support is built in
604 the Installation CD kernels. JFS and XFS support is available through kernel
605 modules.
606 </note>
607
608 <p>
609 <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
610 journaling, which means that routine ext2 filesystem checks at startup time can
611 be quite time-consuming. There is now quite a selection of newer-generation
612 journaled filesystems that can be checked for consistency very quickly and are
613 thus generally preferred over their non-journaled counterparts. Journaled
614 filesystems prevent long delays when you boot your system and your filesystem
615 happens to be in an inconsistent state.
616 </p>
617
618 <p>
619 <b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
620 journaling for fast recovery in addition to other enhanced journaling modes
621 like full data and ordered data journaling. It uses a hashed B*-tree index that
622 enables high performance in almost all situations. In short, ext3 is a very
623 good and reliable filesystem.
624 </p>
625
626 <p>
627 <b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
628 performance and greatly outperforms both ext2 and ext3 when dealing with small
629 files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
630 extremely well and has metadata journaling. ReiserFS is solid and usable as
631 both general-purpose filesystem and for extreme cases such as the creation of
632 large filesystems, very large files and directories containing tens of
633 thousands of small files.
634 </p>
635
636 <p>
637 <b>XFS</b> is a filesystem with metadata journaling that is fully supported
638 under Gentoo Linux's xfs-sources kernel. It comes with a robust feature-set and
639 is optimized for scalability. We only recommend using this filesystem on Linux
640 systems with high-end SCSI and/or fibre channel storage and a uninterruptible
641 power supply. Because XFS aggressively caches in-transit data in RAM, improperly
642 designed programs (those that don't take proper precautions when writing files
643 to disk and there are quite a few of them) can lose a good deal of data if the
644 system goes down unexpectedly.
645 </p>
646
647 <p>
648 <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
649 become production-ready.
650 </p>
651
652 </body>
653 </subsection>
654 <subsection id="filesystems-apply">
655 <title>Applying a Filesystem to a Partition</title>
656 <body>
657
658 <p>
659 To create a filesystem on a partition or volume, there are tools available for
660 each possible filesystem:
661 </p>
662
663 <table>
664 <tr>
665 <th>Filesystem</th>
666 <th>Creation Command</th>
667 </tr>
668 <tr>
669 <ti>ext2</ti>
670 <ti><c>mke2fs</c></ti>
671 </tr>
672 <tr>
673 <ti>ext3</ti>
674 <ti><c>mke2fs -j</c></ti>
675 </tr>
676 <tr>
677 <ti>reiserfs</ti>
678 <ti><c>mkreiserfs</c></ti>
679 </tr>
680 <tr>
681 <ti>xfs</ti>
682 <ti><c>mkfs.xfs</c></ti>
683 </tr>
684 <tr>
685 <ti>jfs</ti>
686 <ti><c>mkfs.jfs</c></ti>
687 </tr>
688 </table>
689
690 <p>
691 For instance, to have the root partition (<path>/dev/sda4</path> in our example)
692 in ext3 (as in our example), you would use:
693 </p>
694
695 <pre caption="Applying a filesystem on a partition">
696 # <i>mke2fs -j /dev/sda4</i>
697 </pre>
698
699 <p>
700 Now create the filesystems on your newly created partitions (or logical
701 volumes).
702 </p>
703
704 </body>
705 </subsection>
706 <subsection>
707 <title>Activating the Swap Partition</title>
708 <body>
709
710 <p>
711 <c>mkswap</c> is the command that is used to initialize swap partitions:
712 </p>
713
714 <pre caption="Creating a Swap signature">
715 # <i>mkswap /dev/sda3</i>
716 </pre>
717
718 <p>
719 To activate the swap partition, use <c>swapon</c>:
720 </p>
721
722 <pre caption="Activating the swap partition">
723 # <i>swapon /dev/sda3</i>
724 </pre>
725
726 <p>
727 Create and activate the swap with the commands mentioned above.
728 </p>
729
730 </body>
731 </subsection>
732 </section>
733 <section>
734 <title>Mounting</title>
735 <body>
736
737 <p>
738 Now that your partitions are initialized and are housing a filesystem, it is
739 time to mount those partitions. Use the <c>mount</c> command. Don't forget to
740 create the necessary mount directories for every partition you created. As an
741 example we create a mount point and mount the root partition:
742 </p>
743
744 <pre caption="Mounting partitions">
745 # <i>mkdir /mnt/gentoo</i>
746 # <i>mount /dev/sda4 /mnt/gentoo</i>
747 </pre>
748
749 <note>
750 If you want your <path>/tmp</path> to reside on a separate partition, be sure to
751 change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
752 also holds for <path>/var/tmp</path>.
753 </note>
754
755 <p>
756 Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
757 Installation Files</uri>.
758 </p>
759
760 </body>
761 </section>
762 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20