/[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.30 - (hide annotations) (download) (as text)
Tue May 8 21:17:07 2007 UTC (7 years, 4 months ago) by nightmorph
Branch: MAIN
Changes since 1.29: +7 -6 lines
File MIME type: application/xml
fixed coding style, no revbump. thanks to cla for reporting. smack josejx.

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 nightmorph 1.30 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc64-disk.xml,v 1.29 2007/05/07 18:11:41 nightmorph Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.8
11 nightmorph 1.29 <version>8.0</version>
12     <date>2007-05-07</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 nightmorph 1.30 There are some partitions named like this: <path>Apple_Driver43</path>,
107     <path>Apple_Driver_ATA</path>, <path>Apple_FWDriver</path>,
108     <path>Apple_Driver_IOKit</path>, and <path>Apple_Patches</path>. If you are not
109     planning to use MacOS 9 you can delete them, because MacOS X and Linux don't
110     need them. You might have to use parted in order to delete them, as mac-fdisk
111     can't delete 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 nightmorph 1.29 If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
133     should be separate as all mails are stored inside <path>/var</path>. A good
134     choice of filesystem will then maximise your performance. Gameservers will have
135     a separate <path>/opt</path> as most gaming servers are installed there. The
136     reason is similar for <path>/home</path>: security and backups. You will
137     definitely want to keep <path>/usr</path> big: not only will it contain the
138     majority of applications, the Portage tree alone takes around 500 Mbyte
139     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 nightmorph 1.29 However, multiple partitions have one big disadvantage: if not configured
168     properly, you might result in having a system with lots of free space on one
169     partition and none on another. There is also a 15-partition limit for SCSI and
170     SATA.
171 swift 1.1 </p>
172    
173     </body>
174     </subsection>
175     </section>
176     <section id="mac-fdisk">
177 nightmorph 1.29 <title>Default: Using mac-fdisk (Apple G5) to Partition your Disk</title>
178 swift 1.1 <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 nightmorph 1.29 whether all the partitions are there. If you don't see any of the partitions you
229 fox2mike 1.22 created, or the changes you made, you should reinitialize your partitions by
230 nightmorph 1.29 pressing <c>i</c> in mac-fdisk. Note that this will recreate the partition map
231     and 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 nightmorph 1.29 If you are planning to use a RAID disk array for your Gentoo installation and
248 fox2mike 1.24 you are using POWER5-based hardware, you should now run <c>iprconfig</c> to
249     format the disks to Advanced Function format and create the disk array. You
250     should emerge <c>iprutils</c> after your install is complete.
251 swift 1.18 </note>
252    
253 swift 1.1 <p>
254 nightmorph 1.29 If you have an ipr-based SCSI adapter, you should start the ipr utilities now.
255 fox2mike 1.24 </p>
256    
257     <pre caption="Starting ipr utilities">
258     # <i>/etc/init.d/iprinit start</i>
259     </pre>
260    
261     <p>
262 swift 1.1 The following parts explain how to create the example partition layout
263     described previously, namely:
264     </p>
265    
266     <table>
267     <tr>
268     <th>Partition</th>
269     <th>Description</th>
270     </tr>
271     <tr>
272     <ti><path>/dev/sda1</path></ti>
273     <ti>PPC PReP Boot partition</ti>
274     </tr>
275     <tr>
276     <ti><path>/dev/sda2</path></ti>
277     <ti>Swap partition</ti>
278     </tr>
279     <tr>
280     <ti><path>/dev/sda3</path></ti>
281     <ti>Root partition</ti>
282     </tr>
283     </table>
284    
285     <p>
286 neysx 1.5 Change your partition layout according to your own preference.
287 swift 1.1 </p>
288    
289     </body>
290     </subsection>
291     <subsection>
292     <title>Viewing the Current Partition Layout</title>
293     <body>
294    
295     <p>
296     <c>fdisk</c> is a popular and powerful tool to split your disk into
297     partitions. Fire up <c>fdisk</c> on your disk (in our example, we
298     use <path>/dev/sda</path>):
299     </p>
300    
301     <pre caption="Starting fdisk">
302     # <i>fdisk /dev/sda</i>
303     </pre>
304    
305     <p>
306     Once in <c>fdisk</c>, you'll be greeted with a prompt that looks like
307     this:
308     </p>
309    
310     <pre caption="fdisk prompt">
311     Command (m for help):
312     </pre>
313    
314     <p>
315 neysx 1.25 If you still have an AIX partition layout on your system, you will get the
316     following error message:
317     </p>
318    
319     <pre caption="Error message from fdisk">
320     There is a valid AIX label on this disk.
321     Unfortunately Linux cannot handle these
322     disks at the moment. Nevertheless some
323     advice:
324     1. fdisk will destroy its contents on write.
325     2. Be sure that this disk is NOT a still vital
326     part of a volume group. (Otherwise you may
327     erase the other disks as well, if unmirrored.)
328     3. Before deleting this physical volume be sure
329     to remove the disk logically from your AIX
330     machine. (Otherwise you become an AIXpert).
331    
332     Command (m for help):
333     </pre>
334    
335     <p>
336     Don't worry, you can create a new empty dos partition table by pressing
337     <c>o</c>.
338     </p>
339    
340     <warn>
341     This will destroy any installed AIX version
342     </warn>
343    
344     <p>
345     Type <c>p</c> to display your disk current partition configuration:
346 swift 1.1 </p>
347    
348     <pre caption="An example partition configuration">
349     Command (m for help): p
350    
351     Disk /dev/sda: 30.7 GB, 30750031872 bytes
352     141 heads, 63 sectors/track, 6761 cylinders
353     Units = cylinders of 8883 * 512 = 4548096 bytes
354    
355     Device Boot Start End Blocks Id System
356 neysx 1.11 /dev/sda1 1 12 53266+ 83 Linux
357     /dev/sda2 13 233 981571+ 82 Linux swap
358     /dev/sda3 234 674 1958701+ 83 Linux
359     /dev/sda4 675 6761 27035410+ 5 Extended
360     /dev/sda5 675 2874 9771268+ 83 Linux
361     /dev/sda6 2875 2919 199836 83 Linux
362     /dev/sda7 2920 3008 395262 83 Linux
363     /dev/sda8 3009 6761 16668918 83 Linux
364 swift 1.1
365     Command (m for help):
366     </pre>
367    
368     <p>
369 neysx 1.11 This particular disk is configured to house six Linux filesystems
370 swift 1.1 (each with a corresponding partition listed as "Linux") as well as a
371     swap partition (listed as "Linux swap").
372     </p>
373    
374     </body>
375     </subsection>
376     <subsection>
377     <title>Removing all Partitions</title>
378     <body>
379    
380     <p>
381     We will first remove all existing partitions from the disk. Type
382     <c>d</c> to delete a partition. For instance, to delete an existing
383     <path>/dev/sda1</path>:
384     </p>
385    
386 neysx 1.11 <note>
387     If you don't want to delete all partitions just delete those you
388 swift 1.1 want to delete. At this point the author recommends a backup of your
389     data to avoid the lose of it.
390     </note>
391    
392     <pre caption="Deleting a partition">
393     Command (m for help): <i>d</i>
394     Partition number (1-4): <i>1</i>
395     </pre>
396    
397     <p>
398     The partition has been scheduled for deletion. It will no longer show up
399     if you type <c>p</c>, but it will not be erased until your changes have
400     been saved. If you made a mistake and want to abort without saving your
401     changes, type <c>q</c> immediately and hit enter and your partition will
402     not be deleted.
403     </p>
404    
405     <p>
406     Now, assuming that you do indeed want to wipe out all the partitions on
407     your system, repeatedly type <c>p</c> to print out a partition listing
408     and then type <c>d</c> and the number of the partition to delete it.
409     Eventually, you'll end up with a partition table with nothing in it:
410     </p>
411    
412     <pre caption="An empty partition table">
413     Disk /dev/sda: 30.7 GB, 30750031872 bytes
414     141 heads, 63 sectors/track, 6761 cylinders
415     Units = cylinders of 8883 * 512 = 4548096 bytes
416    
417     Device Boot Start End Blocks Id System
418    
419     Command (m for help):
420     </pre>
421    
422     <p>
423     Now that the in-memory partition table is empty, we're ready to create
424     the partitions. We will use a default partitioning scheme as discussed
425     previously. Of course, don't follow these instructions to the letter if
426     you don't want the same partitioning scheme!
427     </p>
428    
429     </body>
430     </subsection>
431     <subsection>
432     <title>Creating the PPC PReP boot partition</title>
433     <body>
434    
435     <p>
436     We first create a small PReP boot partition. Type <c>n</c> to create a new
437     partition, then <c>p</c> to select a primary partition, followed by
438     <c>1</c> to select the first primary partition. When prompted for the
439     first cylinder, hit enter. When prompted for the last cylinder, type
440     <c>+7M</c> to create a partition 7 Mbyte in size. After you've done
441     this, type <c>t</c> to set the partition type, <c>1</c> to select the
442     partition you just created and then type in <c>41</c> to set the
443 swift 1.18 partition type to "PPC PReP Boot". Finally, you'll need to mark the PReP
444     partition as bootable.
445 swift 1.1 </p>
446    
447     <note>
448     The PReP partition has to be smaller than 8 MByte!
449     </note>
450    
451 swift 1.18 <pre caption="Creating the PReP boot partition">
452 swift 1.1 Command (m for help): <i>p</i>
453    
454     Disk /dev/sda: 30.7 GB, 30750031872 bytes
455     141 heads, 63 sectors/track, 6761 cylinders
456     Units = cylinders of 8883 * 512 = 4548096 bytes
457    
458     Device Boot Start End Blocks Id System
459    
460     Command (m for help): <i>n</i>
461     Command action
462     e extended
463     p primary partition (1-4)
464     <i>p</i>
465     Partition number (1-4): <i>1</i>
466     First cylinder (1-6761, default 1):
467     Using default value 1
468     Last cylinder or +size or +sizeM or +sizeK (1-6761, default
469     6761): <i>+8M</i>
470    
471     Command (m for help): <i>t</i>
472     Selected partition 1
473     Hex code (type L to list codes): <i>41</i>
474     Changed system type of partition 1 to 41 (PPC PReP Boot)
475    
476 swift 1.18 Command (m for help): <i>a</i>
477     Partition number (1-4): <i>1</i>
478 swift 1.1 Command (m for help):
479     </pre>
480    
481     <p>
482 swift 1.18 Now, when you type <c>p</c>, you should see the following partition information:
483 swift 1.1 </p>
484    
485     <pre caption="Created boot partition">
486     Command (m for help): <i>p</i>
487    
488     Disk /dev/sda: 30.7 GB, 30750031872 bytes
489     141 heads, 63 sectors/track, 6761 cylinders
490     Units = cylinders of 8883 * 512 = 4548096 bytes
491    
492     Device Boot Start End Blocks Id System
493 swift 1.18 /dev/sda1 * 1 3 13293 41 PPC PReP Boot
494 swift 1.1
495     Command (m for help):
496     </pre>
497     </body>
498     </subsection>
499     <subsection>
500     <title>Creating the Swap Partition</title>
501     <body>
502    
503     <p>
504     Let's now create the swap partition. To do this, type <c>n</c> to create
505     a new partition, then <c>p</c> to tell fdisk that you want a primary
506     partition. Then type <c>2</c> to create the second primary partition,
507 swift 1.2 <path>/dev/sda2</path> in our case. When prompted for the first
508 swift 1.1 cylinder, hit enter. When prompted for the last cylinder, type
509     <c>+512M</c> to create a partition 512MB in size. After you've done
510     this, type <c>t</c> to set the partition type, <c>2</c> to select the
511     partition you just created and then type in <c>82</c> to set the
512     partition type to "Linux Swap". After completing these steps, typing
513     <c>p</c> should display a partition table that looks similar to this:
514     </p>
515    
516     <pre caption="Partition listing after creating a swap partition">
517     Command (m for help): <i>p</i>
518    
519     Disk /dev/sda: 30.7 GB, 30750031872 bytes
520     141 heads, 63 sectors/track, 6761 cylinders
521     Units = cylinders of 8883 * 512 = 4548096 bytes
522    
523     Device Boot Start End Blocks Id System
524 neysx 1.11 /dev/sda1 1 3 13293 41 PPC PReP Boot
525     /dev/sda2 4 117 506331 82 Linux swap
526 swift 1.1
527     Command (m for help):
528     </pre>
529    
530     </body>
531     </subsection>
532     <subsection>
533     <title>Creating the Root Partition</title>
534     <body>
535    
536     <p>
537     Finally, let's create the root partition. To do this, type <c>n</c> to
538     create a new partition, then <c>p</c> to tell fdisk that you want a
539     primary partition. Then type <c>3</c> to create the third primary
540     partition, <path>/dev/sda3</path> in our case. When prompted for the
541     first cylinder, hit enter. When prompted for the last cylinder, hit
542     enter to create a partition that takes up the rest of the remaining
543     space on your disk. After completing these steps, typing <c>p</c> should
544     display a partition table that looks similar to this:
545     </p>
546    
547     <pre caption="Partition listing after creating the root partition">
548     Command (m for help): p
549    
550     Disk /dev/sda: 30.7 GB, 30750031872 bytes
551     141 heads, 63 sectors/track, 6761 cylinders
552     Units = cylinders of 8883 * 512 = 4548096 bytes
553    
554     Device Boot Start End Blocks Id System
555 neysx 1.11 /dev/sda1 1 3 13293 41 PPC PReP Boot
556     /dev/sda2 4 117 506331 82 Linux swap
557     /dev/sda3 118 6761 29509326 83 Linux
558 swift 1.1
559     Command (m for help):
560     </pre>
561     </body>
562     </subsection>
563     <subsection>
564     <title>Saving the Partition Layout</title>
565     <body>
566    
567     <p>
568     To save the partition layout and exit <c>fdisk</c>, type <c>w</c>.
569     </p>
570    
571     <pre caption="Save and exit fdisk">
572     Command (m for help): <i>w</i>
573     </pre>
574    
575     <p>
576     Now that your partitions are created, you can now continue with <uri
577     link="#filesystems">Creating Filesystems</uri>.
578     </p>
579    
580     </body>
581     </subsection>
582 neysx 1.11 </section>
583     <section id="filesystems">
584     <title>Creating Filesystems</title>
585     <subsection>
586     <title>Introduction</title>
587     <body>
588    
589     <p>
590     Now that your partitions are created, it is time to place a filesystem on them.
591     If you don't care about what filesystem to choose and are happy with what we use
592     as default in this handbook, continue with <uri
593     link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
594     Otherwise read on to learn about the available filesystems...
595     </p>
596    
597     </body>
598     </subsection>
599 swift 1.1 <subsection>
600     <title>Filesystems?</title>
601     <body>
602    
603     <note>
604 fox2mike 1.24 Several filesystems are available. ext2, ext3 and ReiserFS support is built in
605     the Installation CD kernels. JFS and XFS support is available through kernel
606     modules.
607 swift 1.1 </note>
608    
609     <p>
610     <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
611     journaling, which means that routine ext2 filesystem checks at startup time can
612     be quite time-consuming. There is now quite a selection of newer-generation
613     journaled filesystems that can be checked for consistency very quickly and are
614     thus generally preferred over their non-journaled counterparts. Journaled
615     filesystems prevent long delays when you boot your system and your filesystem
616     happens to be in an inconsistent state.
617     </p>
618    
619     <p>
620     <b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
621 nightmorph 1.27 journaling for fast recovery in addition to other enhanced journaling modes
622     like full data and ordered data journaling. It uses a hashed B*-tree index that
623     enables high performance in almost all situations. In short, ext3 is a very
624     good and reliable filesystem.
625 swift 1.1 </p>
626    
627     <p>
628 nightmorph 1.27 <b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
629     performance and greatly outperforms both ext2 and ext3 when dealing with small
630     files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
631     extremely well and has metadata journaling. ReiserFS is solid and usable as
632     both general-purpose filesystem and for extreme cases such as the creation of
633     large filesystems, very large files and directories containing tens of
634     thousands of small files.
635 swift 1.1 </p>
636    
637     <p>
638     <b>XFS</b> is a filesystem with metadata journaling that is fully supported
639     under Gentoo Linux's xfs-sources kernel. It comes with a robust feature-set and
640     is optimized for scalability. We only recommend using this filesystem on Linux
641     systems with high-end SCSI and/or fibre channel storage and a uninterruptible
642     power supply. Because XFS aggressively caches in-transit data in RAM, improperly
643     designed programs (those that don't take proper precautions when writing files
644     to disk and there are quite a few of them) can lose a good deal of data if the
645     system goes down unexpectedly.
646     </p>
647    
648     <p>
649     <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
650 nightmorph 1.29 become production-ready.
651 swift 1.1 </p>
652    
653     </body>
654     </subsection>
655     <subsection id="filesystems-apply">
656     <title>Applying a Filesystem to a Partition</title>
657     <body>
658    
659     <p>
660     To create a filesystem on a partition or volume, there are tools available for
661     each possible filesystem:
662     </p>
663    
664     <table>
665     <tr>
666     <th>Filesystem</th>
667     <th>Creation Command</th>
668     </tr>
669     <tr>
670     <ti>ext2</ti>
671     <ti><c>mke2fs</c></ti>
672     </tr>
673     <tr>
674     <ti>ext3</ti>
675     <ti><c>mke2fs -j</c></ti>
676     </tr>
677     <tr>
678     <ti>reiserfs</ti>
679     <ti><c>mkreiserfs</c></ti>
680     </tr>
681     <tr>
682     <ti>xfs</ti>
683     <ti><c>mkfs.xfs</c></ti>
684     </tr>
685     <tr>
686     <ti>jfs</ti>
687     <ti><c>mkfs.jfs</c></ti>
688     </tr>
689     </table>
690    
691     <p>
692     For instance, to have the root partition (<path>/dev/sda4</path> in our example)
693     in ext3 (as in our example), you would use:
694     </p>
695    
696     <pre caption="Applying a filesystem on a partition">
697 nightmorph 1.29 # <i>mke2fs -j /dev/sda4</i>
698 swift 1.1 </pre>
699    
700     <p>
701     Now create the filesystems on your newly created partitions (or logical
702     volumes).
703     </p>
704    
705     </body>
706     </subsection>
707     <subsection>
708     <title>Activating the Swap Partition</title>
709     <body>
710    
711     <p>
712     <c>mkswap</c> is the command that is used to initialize swap partitions:
713     </p>
714    
715     <pre caption="Creating a Swap signature">
716     # <i>mkswap /dev/sda3</i>
717     </pre>
718    
719     <p>
720     To activate the swap partition, use <c>swapon</c>:
721     </p>
722    
723     <pre caption="Activating the swap partition">
724     # <i>swapon /dev/sda3</i>
725     </pre>
726    
727     <p>
728 swift 1.15 Create and activate the swap with the commands mentioned above.
729 swift 1.1 </p>
730    
731     </body>
732     </subsection>
733     </section>
734     <section>
735     <title>Mounting</title>
736     <body>
737    
738     <p>
739     Now that your partitions are initialized and are housing a filesystem, it is
740     time to mount those partitions. Use the <c>mount</c> command. Don't forget to
741     create the necessary mount directories for every partition you created. As an
742 nightmorph 1.29 example we create a mount point and mount the root partition:
743 swift 1.1 </p>
744    
745     <pre caption="Mounting partitions">
746     # <i>mkdir /mnt/gentoo</i>
747     # <i>mount /dev/sda4 /mnt/gentoo</i>
748     </pre>
749    
750     <note>
751     If you want your <path>/tmp</path> to reside on a separate partition, be sure to
752     change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
753     also holds for <path>/var/tmp</path>.
754     </note>
755    
756     <p>
757     Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
758     Installation Files</uri>.
759     </p>
760    
761     </body>
762     </section>
763     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20