/[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.13 - (hide annotations) (download) (as text)
Fri Dec 31 02:42:21 2004 UTC (9 years, 7 months ago) by vapier
Branch: MAIN
Changes since 1.12: +245 -8 lines
File MIME type: application/xml
merge arc/alphabios/milo partitioning fun

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

  ViewVC Help
Powered by ViewVC 1.1.20