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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.21 - (hide annotations) (download) (as text)
Wed Jun 21 01:49:06 2006 UTC (8 years, 1 month ago) by nightmorph
Branch: MAIN
Changes since 1.20: +8 -3 lines
File MIME type: application/xml
added bootloader note for bug 137410, thanks to tcort for the patch

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.18 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 swift 1.1
7 nightmorph 1.21 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-disk.xml,v 1.20 2005/08/25 19:22:50 neysx Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.10
11 nightmorph 1.21 <version>2.4</version>
12     <date>2006-06-20</date>
13 swift 1.10
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 SCSI HD in a Linux system, namely
31     <path>/dev/sda</path>.
32     </p>
33    
34     <p>
35     The block devices above represent an abstract interface to the disk. User
36     programs can use these block devices to interact with your disk without worrying
37     about whether your drives are IDE, SCSI or something else. The program can
38     simply address the storage on the disk as a bunch of contiguous,
39     randomly-accessible 512-byte blocks.
40     </p>
41    
42     </body>
43     </subsection>
44     <subsection>
45     <title>Slices</title>
46     <body>
47    
48     <p>
49     Although it is theoretically possible to use a full disk to house your Linux
50     system, this is almost never done in practice. Instead, full disk block devices
51     are split up in smaller, more manageable block devices. On Alpha systems,
52     these are called <e>slices</e>.
53     </p>
54    
55     </body>
56     </subsection>
57     </section>
58     <section>
59     <title>Designing a Partitioning Scheme</title>
60     <subsection>
61     <title>Default Partitioning Scheme</title>
62     <body>
63    
64     <p>
65     As an example we use the following slice layout:
66     </p>
67    
68     <table>
69     <tr>
70     <th>Slice</th>
71     <th>Description</th>
72     </tr>
73     <tr>
74 swift 1.5 <ti><path>/dev/sda1</path></ti>
75 swift 1.1 <ti>Swap slice</ti>
76     </tr>
77     <tr>
78 swift 1.5 <ti><path>/dev/sda2</path></ti>
79 swift 1.1 <ti>Root slice</ti>
80     </tr>
81     <tr>
82 swift 1.5 <ti><path>/dev/sda3</path></ti>
83 swift 1.1 <ti>Full disk (required)</ti>
84     </tr>
85     </table>
86    
87    
88     <p>
89     If you are interested in knowing how big a partition should be, or even how
90     many partitions (or volumes) you need, read on. Otherwise continue now with
91 swift 1.17 <uri link="#fdisk_SRM">Using fdisk to Partition your Disk (SRM only)</uri>
92     or <uri link="#fdisk_ARC">Using fdisk to Partition your Disk (ARC/AlphaBIOS
93     only)</uri>.
94 swift 1.1 </p>
95    
96     </body>
97     </subsection>
98     <subsection>
99     <title>How Many and How Big?</title>
100     <body>
101    
102     <p>
103     The number of partitions is highly dependent on your environment. For instance,
104     if you have lots of users, you will most likely want to have your
105     <path>/home</path> separate as it increases security and makes backups easier.
106     If you are installing Gentoo to perform as a mailserver, your
107     <path>/var</path> should be separate as all mails are stored inside
108     <path>/var</path>. A good choice of filesystem will then maximise your
109     performance. Gameservers will have a separate <path>/opt</path> as most gaming
110     servers are installed there. The reason is similar for <path>/home</path>:
111 swift 1.18 security and backups. You will definitely want to keep <path>/usr</path> big:
112     not only will it contain the majority of applications, the Portage tree alone
113     takes around 500 Mbyte excluding the various sources that are stored in it.
114 swift 1.1 </p>
115    
116     <p>
117     As you can see, it very much depends on what you want to achieve. Separate
118     partitions or volumes have the following advantages:
119     </p>
120    
121     <ul>
122     <li>
123 neysx 1.3 You can choose the best performing filesystem for each partition or volume
124 swift 1.1 </li>
125     <li>
126     Your entire system cannot run out of free space if one defunct tool is
127     continuously writing files to a partition or volume
128     </li>
129     <li>
130     If necessary, file system checks are reduced in time, as multiple checks can
131     be done in parallel (although this advantage is more with multiple disks than
132     it is with multiple partitions)
133     </li>
134     <li>
135     Security can be enhanced by mounting some partitions or volumes read-only,
136     nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
137     </li>
138     </ul>
139    
140     <p>
141     However, multiple partitions have one big disadvantage: if not configured
142     properly, you might result in having a system with lots
143     of free space on one partition and none on another.
144     </p>
145    
146     </body>
147     </subsection>
148     </section>
149 swift 1.17 <section id="fdisk_SRM">
150 vapier 1.13 <title>Using fdisk to Partition your Disk (SRM only)</title>
151 swift 1.1 <subsection>
152     <body>
153    
154     <p>
155     The following parts explain how to create the example slice layout described
156     previously, namely:
157     </p>
158    
159     <table>
160     <tr>
161     <th>Slice</th>
162     <th>Description</th>
163     </tr>
164     <tr>
165 swift 1.5 <ti><path>/dev/sda1</path></ti>
166 swift 1.1 <ti>Swap slice</ti>
167     </tr>
168     <tr>
169 swift 1.5 <ti><path>/dev/sda2</path></ti>
170 swift 1.1 <ti>Root slice</ti>
171     </tr>
172     <tr>
173 swift 1.5 <ti><path>/dev/sda3</path></ti>
174 swift 1.1 <ti>Full disk (required)</ti>
175     </tr>
176     </table>
177    
178     <p>
179 neysx 1.9 Change your slice layout according to your own preference.
180 swift 1.1 </p>
181    
182    
183     </body>
184     </subsection>
185     <subsection>
186     <title>Identifying Available Disks</title>
187     <body>
188    
189     <p>
190     To figure out what disks you have running, use the following commands:
191     </p>
192    
193     <pre caption="Identifying available disks">
194 vapier 1.7 # <i>dmesg | grep 'drive$'</i> <comment>(For IDE disks)</comment>
195     # <i>dmesg | grep 'scsi'</i> <comment>(For SCSI disks)</comment>
196 swift 1.1 </pre>
197    
198     <p>
199     From this output you should be able to see what disks were detected and their
200     respective <path>/dev</path> entry. In the following parts we assume that the
201     disk is a SCSI disk on <path>/dev/sda</path>.
202     </p>
203    
204     <p>
205     Now fire up <c>fdisk</c>:
206     </p>
207    
208     <pre caption="Starting fdisk">
209     # <i>fdisk /dev/sda</i>
210     </pre>
211    
212     </body>
213     </subsection>
214     <subsection>
215     <title>Deleting All Slices</title>
216     <body>
217    
218     <p>
219 vapier 1.7 If your hard drive is completely blank, then you'll have to first create
220     a BSD disklabel.
221     </p>
222    
223 vapier 1.13 <pre caption="Creating a BSD disklabel">
224 vapier 1.7 Command (m for help): <i>b</i>
225     /dev/sda contains no disklabel.
226     Do you want to create a disklabel? (y/n) <i>y</i>
227     <comment>A bunch of drive-specific info will show here</comment>
228     3 partitions:
229     # start end size fstype [fsize bsize cpg]
230     c: 1 5290* 5289* unused 0 0
231     </pre>
232    
233     <p>
234 vapier 1.13 We start with deleting all slices <e>except</e> the 'c'-slice (a requirement
235     for using BSD disklabels). The following shows how to delete a slice (in
236     the example we use 'a'). Repeat the process to delete all other slices
237     (again, except the 'c'-slice).
238 swift 1.1 </p>
239    
240     <p>
241     Use <c>p</c> to view all existing slices. <c>d</c> is used to delete a slice.
242     </p>
243    
244     <pre caption="Deleting a slice">
245     BSD disklabel command (m for help): <i>p</i>
246    
247     8 partitions:
248     # start end size fstype [fsize bsize cpg]
249     a: 1 235* 234* 4.2BSD 1024 8192 16
250     b: 235* 469* 234* swap
251     c: 1 5290* 5289* unused 0 0
252     d: 469* 2076* 1607* unused 0 0
253     e: 2076* 3683* 1607* unused 0 0
254     f: 3683* 5290* 1607* unused 0 0
255     g: 469* 1749* 1280 4.2BSD 1024 8192 16
256     h: 1749* 5290* 3541* unused 0 0
257    
258     BSD disklabel command (m for help): <i>d</i>
259     Partition (a-h): <i>a</i>
260     </pre>
261    
262     <p>
263     After repeating this process for all slices, a listing should show you something
264     similar to this:
265     </p>
266    
267     <pre caption="Viewing an empty scheme">
268     BSD disklabel command (m for help): <i>p</i>
269    
270     3 partitions:
271     # start end size fstype [fsize bsize cpg]
272     c: 1 5290* 5289* unused 0 0
273     </pre>
274    
275     </body>
276     </subsection>
277     <subsection>
278     <title>Creating the Swap Slice</title>
279     <body>
280    
281     <p>
282     On Alpha based systems you don't need a separate boot partition. However, the
283     first cylinder cannot be used as the <c>aboot</c> image will be placed there.
284     </p>
285    
286     <p>
287     We will create a swap slice starting at the third cylinder, with a total
288 swift 1.15 size of 1 GB. Use <c>n</c> to create a new slice. After creating the slice,
289 vapier 1.8 we will change its type to <c>1</c> (one), meaning <e>swap</e>.
290 swift 1.1 </p>
291    
292     <pre caption="Creating the swap slice">
293     BSD disklabel command (m for help): <i>n</i>
294     Partition (a-p): <i>a</i>
295     First cylinder (1-5290, default 1): <i>3</i>
296     Last cylinder or +size or +sizeM or +sizeK (3-5290, default 5290): <i>+1024M</i>
297    
298     BSD disklabel command (m for help): <i>t</i>
299     Partition (a-c): <i>a</i>
300     Hex code (type L to list codes): <i>1</i>
301     </pre>
302    
303     <p>
304     After these steps you should see a layout similar to the following:
305     </p>
306    
307     <pre caption="Slice layout after creating the swap slice">
308     BSD disklabel command (m for help): <i>p</i>
309    
310     3 partitions:
311     # start end size fstype [fsize bsize cpg]
312     a: 3 1003 1001 swap
313     c: 1 5290* 5289* unused 0 0
314     </pre>
315    
316     </body>
317     </subsection>
318     <subsection>
319     <title>Create the Root Slice</title>
320     <body>
321    
322     <p>
323     We will now create the root slice, starting from the first cylinder <e>after</e>
324     the swap slice. Use the <c>p</c> command to view where the swap slice ends. In
325     our example, this is at 1003, making the root partition start at 1004.
326     </p>
327    
328     <p>
329     Another problem is that there is currently a bug in <c>fdisk</c> making it think
330     the number of available cylinders is one above the real number of cylinders. In
331     other words, when you are asked for the last cylinder, decrease the cylinder
332     number (in this example: 5290) with one.
333     </p>
334    
335     <p>
336     When the partition is created, we change the type to <c>8</c>, for <e>ext2</e>.
337     </p>
338    
339     <pre caption="Creating the root slice">
340     D disklabel command (m for help): <i>n</i>
341     Partition (a-p): <i>b</i>
342     First cylinder (1-5290, default 1): <i>1004</i>
343     Last cylinder or +size or +sizeM or +sizeK (1004-5290, default 5290): <i>5289</i>
344    
345     BSD disklabel command (m for help): <i>t</i>
346     Partition (a-c): <i>b</i>
347     Hex code (type L to list codes): <i>8</i>
348     </pre>
349    
350     <p>
351     Your slice layout should now be similar to this:
352     </p>
353    
354     <pre caption="Viewing the slice layout">
355     BSD disklabel command (m for help): <i>p</i>
356    
357     3 partitions:
358     # start end size fstype [fsize bsize cpg]
359     a: 3 1003 1001 swap
360     b: 1004 5289 4286 ext2
361     c: 1 5290* 5289* unused 0 0
362     </pre>
363    
364     </body>
365     </subsection>
366     <subsection>
367     <title>Save the Slice Layout and Exit</title>
368     <body>
369    
370     <p>
371     Save <c>fdisk</c> by typing <c>w</c>. This will also save your slice layout.
372     </p>
373    
374     <pre caption="Save and exit fdisk">
375     Command (m for help): <i>w</i>
376     </pre>
377    
378     <p>
379     Now that your slices are created, you can now continue with <uri
380     link="#filesystems">Creating Filesystems</uri>.
381     </p>
382    
383     </body>
384     </subsection>
385     </section>
386 swift 1.17 <section id="fdisk_ARC">
387 vapier 1.13 <title>Using fdisk to Partition your Disk (ARC/AlphaBIOS only)</title>
388     <subsection>
389     <body>
390    
391     <p>
392     The following parts explain how to partition the disk with a layout
393     similar to the one described previously, namely:
394     </p>
395    
396     <table>
397     <tr>
398     <th>Partition</th>
399     <th>Description</th>
400     </tr>
401     <tr>
402     <ti><path>/dev/sda1</path></ti>
403     <ti>Boot partition</ti>
404     </tr>
405     <tr>
406     <ti><path>/dev/sda2</path></ti>
407     <ti>Swap partition</ti>
408     </tr>
409     <tr>
410     <ti><path>/dev/sda3</path></ti>
411     <ti>Root partition</ti>
412     </tr>
413     </table>
414    
415     <p>
416     Change your partition layout according to your own preference.
417     </p>
418    
419     </body>
420     </subsection>
421     <subsection>
422     <title>Identifying Available Disks</title>
423     <body>
424    
425     <p>
426     To figure out what disks you have running, use the following commands:
427     </p>
428    
429     <pre caption="Identifying available disks">
430     # <i>dmesg | grep 'drive$'</i> <comment>(For IDE disks)</comment>
431     # <i>dmesg | grep 'scsi'</i> <comment>(For SCSI disks)</comment>
432     </pre>
433    
434     <p>
435     From this output you should be able to see what disks were detected and their
436     respective <path>/dev</path> entry. In the following parts we assume that the
437     disk is a SCSI disk on <path>/dev/sda</path>.
438     </p>
439    
440     <p>
441     Now fire up <c>fdisk</c>:
442     </p>
443    
444     <pre caption="Starting fdisk">
445     # <i>fdisk /dev/sda</i>
446     </pre>
447    
448     </body>
449     </subsection>
450     <subsection>
451     <title>Deleting All Partitions</title>
452     <body>
453    
454     <p>
455     If your hard drive is completely blank, then you'll have to first create
456     a DOS disklabel.
457     </p>
458    
459     <pre caption="Creating a DOS disklabel">
460     Command (m for help): <i>o</i>
461     Building a new DOS disklabel.
462     </pre>
463    
464     <p>
465     We start with deleting all partitions. The following shows how to delete
466     a partition (in the example we use '1'). Repeat the process to delete all
467     other partitions.
468     </p>
469    
470     <p>
471 cam 1.14 Use <c>p</c> to view all existing partitions. <c>d</c> is used to delete a
472     partition.
473 vapier 1.13 </p>
474    
475     <pre caption="Deleting a partition">
476     command (m for help): <i>p</i>
477    
478     Disk /dev/sda: 9150 MB, 9150996480 bytes
479     64 heads, 32 sectors/track, 8727 cylinders
480     Units = cylinders of 2048 * 512 = 1048576 bytes
481    
482     Device Boot Start End Blocks Id System
483     /dev/sda1 1 478 489456 83 Linux
484     /dev/sda2 479 8727 8446976 5 Extended
485     /dev/sda5 479 1433 977904 83 Linux Swap
486     /dev/sda6 1434 8727 7469040 83 Linux
487    
488     command (m for help): <i>d</i>
489     Partition number (1-6): <i>1</i>
490     </pre>
491    
492    
493     </body>
494     </subsection>
495     <subsection>
496     <title>Creating the Boot Partition</title>
497     <body>
498    
499     <p>
500     On Alpha systems which use MILO to boot, we have to create a small vfat
501     boot partition.
502     </p>
503    
504     <pre caption="Creating the boot partition">
505     Command (m for help): <i>n</i>
506     Command action
507     e extended
508     p primary partition (1-4)
509     <i>p</i>
510     Partition number (1-4): <i>1</i>
511     First cylinder (1-8727, default 1): <i>1</i>
512     Last cylinder or +size or +sizeM or +sizeK (1-8727, default 8727): <i>+16M</i>
513    
514     Command (m for help): <i>t</i>
515     Selected partition 1
516     Hex code (type L to list codes): <i>6</i>
517     Changed system type of partition 1 to 6 (FAT16)
518     </pre>
519    
520     </body>
521     </subsection>
522     <subsection>
523     <title>Creating the Swap Partition</title>
524     <body>
525    
526     <p>
527     We will create a swap partition starting at the third cylinder, with a total
528 swift 1.15 size of 1 GB. Use <c>n</c> to create a new partition.
529 vapier 1.13 </p>
530    
531     <pre caption="Creating the swap partition">
532     Command (m for help): <i>n</i>
533     Command action
534     e extended
535     p primary partition (1-4)
536     <i>p</i>
537     Partition number (1-4): <i>2</i>
538     First cylinder (17-8727, default 17): <i>17</i>
539     Last cylinder or +size or +sizeM or +sizeK (17-8727, default 8727): <i>+1000M</i>
540    
541     Command (m for help): <i>t</i>
542     Partition number (1-4): <i>1</i>
543     Hex code (type L to list codes): <i>82</i>
544     Changed system type of partition 2 to 82 (Linux swap)
545     </pre>
546    
547     <p>
548     After these steps you should see a layout similar to the following:
549     </p>
550    
551     <pre caption="Partition listing after creating a swap partition">
552     Command (m for help): <i>p</i>
553    
554     Disk /dev/sda: 9150 MB, 9150996480 bytes
555     64 heads, 32 sectors/track, 8727 cylinders
556     Units = cylinders of 2048 * 512 = 1048576 bytes
557    
558     Device Boot Start End Blocks Id System
559     /dev/sda1 1 16 16368 6 FAT16
560     /dev/sda2 17 971 977920 82 Linux swap
561     </pre>
562    
563     </body>
564     </subsection>
565     <subsection>
566     <title>Creating the Root Partition</title>
567     <body>
568    
569     <p>
570     We will now create the root partition. Again, just use the <c>n</c> command.
571     </p>
572    
573     <pre caption="Creating the root partition">
574     Command (m for help): <i>n</i>
575     Command action
576     e extended
577     p primary partition (1-4)
578     <i>p</i>
579     Partition number (1-4): <i>3</i>
580     First cylinder (972-8727, default 972): <i>972</i>
581     Last cylinder or +size or +sizeM or +sizeK (972-8727, default 8727): <i>8727</i>
582     </pre>
583    
584     <p>
585     After these steps you should see a layout similar to the following:
586     </p>
587    
588     <pre caption="Partition listing after creating the root partition">
589     Command (m for help): <i>p</i>
590    
591     Disk /dev/sda: 9150 MB, 9150996480 bytes
592     64 heads, 32 sectors/track, 8727 cylinders
593     Units = cylinders of 2048 * 512 = 1048576 bytes
594    
595     Device Boot Start End Blocks Id System
596     /dev/sda1 1 16 16368 6 FAT16
597     /dev/sda2 17 971 977920 82 Linux swap
598     /dev/sda3 972 8727 7942144 83 Linux
599     </pre>
600    
601     </body>
602     </subsection>
603     <subsection>
604     <title>Save the Partition Layout and Exit</title>
605     <body>
606    
607     <p>
608     Save <c>fdisk</c> by typing <c>w</c>. This will also save your partition layout.
609     </p>
610    
611     <pre caption="Save and exit fdisk">
612     Command (m for help): <i>w</i>
613     </pre>
614    
615     <p>
616     Now that your partitions are created, you can now continue with <uri
617     link="#filesystems">Creating Filesystems</uri>.
618     </p>
619    
620     </body>
621     </subsection>
622     </section>
623 swift 1.1 <section id="filesystems">
624     <title>Creating Filesystems</title>
625     <subsection>
626     <title>Introduction</title>
627     <body>
628    
629     <p>
630     Now that your partitions are created, it is time to place a filesystem on them.
631     If you don't care about what filesystem to choose and are happy with what we use
632     as default in this handbook, continue with <uri
633     link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
634     Otherwise read on to learn about the available filesystems...
635     </p>
636    
637     </body>
638     </subsection>
639     <subsection>
640     <title>Filesystems?</title>
641     <body>
642    
643     <p>
644     Several filesystems are available. Most of them are found stable on the
645     Alpha architecture.
646     </p>
647    
648 nightmorph 1.21 <note>
649     <c>aboot</c> only supports booting from <b>ext2</b> and <b>ext3</b>
650     partitions.
651     </note>
652    
653 swift 1.1 <p>
654     <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
655     journaling, which means that routine ext2 filesystem checks at startup time can
656     be quite time-consuming. There is now quite a selection of newer-generation
657     journaled filesystems that can be checked for consistency very quickly and are
658     thus generally preferred over their non-journaled counterparts. Journaled
659     filesystems prevent long delays when you boot your system and your filesystem
660     happens to be in an inconsistent state.
661     </p>
662    
663     <p>
664     <b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
665     journaling for fast recovery in addition to other enhanced journaling modes like
666     full data and ordered data journaling. ext3 is a very good and reliable
667     filesystem. It has an additional hashed b-tree indexing option that enables
668 swift 1.19 high performance in almost all situations. You can enable this indexing by
669     adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an
670     excellent filesystem.
671 swift 1.1 </p>
672    
673     <p>
674     <b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
675     performance and greatly outperforms both ext2 and ext3 when dealing with small
676     files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
677     extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
678     solid and usable as both general-purpose filesystem and for extreme cases such
679     as the creation of large filesystems, the use of many small files, very large
680     files and directories containing tens of thousands of files.
681     </p>
682    
683     <p>
684 neysx 1.4 <b>XFS</b> is a filesystem with metadata journaling which comes with a robust
685     feature-set and is optimized for scalability. We only recommend using this
686     filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
687     an uninterruptible power supply. Because XFS aggressively caches in-transit data
688     in RAM, improperly designed programs (those that don't take proper precautions
689     when writing files to disk and there are quite a few of them) can lose a good
690     deal of data if the system goes down unexpectedly.
691 swift 1.1 </p>
692    
693     <p>
694     <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
695     become production-ready and there hasn't been a sufficient track record to
696     comment positively nor negatively on its general stability at this point.
697     </p>
698    
699     </body>
700     </subsection>
701     <subsection id="filesystems-apply">
702     <title>Applying a Filesystem to a Partition</title>
703     <body>
704    
705     <p>
706     To create a filesystem on a partition or volume, there are tools available for
707     each possible filesystem:
708     </p>
709    
710     <table>
711     <tr>
712     <th>Filesystem</th>
713     <th>Creation Command</th>
714     </tr>
715     <tr>
716     <ti>ext2</ti>
717     <ti><c>mke2fs</c></ti>
718     </tr>
719     <tr>
720     <ti>ext3</ti>
721     <ti><c>mke2fs -j</c></ti>
722     </tr>
723     <tr>
724     <ti>reiserfs</ti>
725     <ti><c>mkreiserfs</c></ti>
726     </tr>
727     <tr>
728     <ti>xfs</ti>
729     <ti><c>mkfs.xfs</c></ti>
730     </tr>
731     <tr>
732     <ti>jfs</ti>
733     <ti><c>mkfs.jfs</c></ti>
734     </tr>
735     </table>
736    
737     <p>
738 swift 1.5 For instance, to have the root partition (<path>/dev/sda2</path> in our example)
739 swift 1.1 in ext3, you would use:
740     </p>
741    
742     <pre caption="Applying a filesystem on a partition">
743 swift 1.5 # <i>mke2fs -j /dev/sda2</i>
744 swift 1.1 </pre>
745    
746     <p>
747     Now create the filesystems on your newly created partitions (or logical
748     volumes).
749     </p>
750    
751     </body>
752     </subsection>
753     <subsection>
754     <title>Activating the Swap Partition</title>
755     <body>
756    
757     <p>
758     <c>mkswap</c> is the command that is used to initialize swap partitions:
759     </p>
760    
761     <pre caption="Creating a Swap signature">
762 swift 1.5 # <i>mkswap /dev/sda1</i>
763 swift 1.1 </pre>
764    
765     <p>
766     To activate the swap partition, use <c>swapon</c>:
767     </p>
768    
769     <pre caption="Activating the swap partition">
770 swift 1.5 # <i>swapon /dev/sda1</i>
771 swift 1.1 </pre>
772    
773     <p>
774 swift 1.16 Create and activate the swap with the commands mentioned above.
775 swift 1.1 </p>
776    
777     </body>
778     </subsection>
779     </section>
780     <section>
781     <title>Mounting</title>
782     <body>
783    
784     <p>
785     Now that your partitions are initialized and are housing a filesystem, it is
786     time to mount those partitions. Use the <c>mount</c> command. Don't forget to
787     create the necessary mount directories for every partition you created. As an
788     example we mount the root and boot partition:
789     </p>
790    
791     <pre caption="Mounting partitions">
792 swift 1.5 # <i>mount /dev/sda2 /mnt/gentoo</i>
793 swift 1.1 </pre>
794    
795     <note>
796     If you want your <path>/tmp</path> to reside on a separate partition, be sure to
797     change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
798     also holds for <path>/var/tmp</path>.
799     </note>
800    
801     <p>
802 swift 1.6 We will also have to mount the proc filesystem (a virtual interface with the
803     kernel) on <path>/proc</path>. But first we will need to place our files on the partitions.
804 swift 1.1 </p>
805    
806     <p>
807 swift 1.6 Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
808 swift 1.1 Installation Files</uri>.
809     </p>
810    
811     </body>
812     </section>
813     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20