/[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.22 - (hide annotations) (download) (as text)
Sat Oct 15 19:55:31 2005 UTC (8 years, 9 months ago) by fox2mike
Branch: MAIN
Changes since 1.21: +11 -7 lines
File MIME type: application/xml
Fixed wrapping. **No Content Change**. Thanks to grahl on IRC for reporting.

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

  ViewVC Help
Powered by ViewVC 1.1.20