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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 Revision 1.33
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-disk.xml,v 1.4 2004/07/18 10:29:59 neysx Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-disk.xml,v 1.33 2012/10/06 19:54:14 swift Exp $ -->
8 8
9<sections> 9<sections>
10
11<version>12</version>
12<date>2012-10-06</date>
13
10<section> 14<section>
11<title>Introduction to Block Devices</title> 15<title>Introduction to Block Devices</title>
12<subsection>
13<title>Block Devices</title>
14<body>
15 16
16<p>
17We'll take a good look at disk-oriented aspects of Gentoo Linux
18and Linux in general, including Linux filesystems, partitions and block devices.
19Then, once you're familiar with the ins and outs of disks and filesystems,
20you'll be guided through the process of setting up partitions and filesystems
21for your Gentoo Linux installation.
22</p>
23
24<p>
25To begin, we'll introduce <e>block devices</e>. The most famous block device is
26probably the one that represents the first SCSI HD in a Linux system, namely
27<path>/dev/sda</path>.
28</p>
29
30<p>
31The block devices above represent an abstract interface to the disk. User
32programs can use these block devices to interact with your disk without worrying
33about whether your drives are IDE, SCSI or something else. The program can
34simply address the storage on the disk as a bunch of contiguous,
35randomly-accessible 512-byte blocks.
36</p>
37
38</body>
39</subsection> 17<subsection>
18<include href="hb-install-blockdevices.xml"/>
19</subsection>
20
40<subsection> 21<subsection>
41<title>Slices</title> 22<title>Slices</title>
42<body> 23<body>
43 24
44<p> 25<p>
65<tr> 46<tr>
66 <th>Slice</th> 47 <th>Slice</th>
67 <th>Description</th> 48 <th>Description</th>
68</tr> 49</tr>
69<tr> 50<tr>
70 <ti><path>/dev/sdaa</path></ti> 51 <ti><path>/dev/sda1</path></ti>
71 <ti>Swap slice</ti> 52 <ti>Swap slice</ti>
72</tr> 53</tr>
73<tr> 54<tr>
74 <ti><path>/dev/sdab</path></ti> 55 <ti><path>/dev/sda2</path></ti>
75 <ti>Root slice</ti> 56 <ti>Root slice</ti>
76</tr> 57</tr>
77<tr> 58<tr>
78 <ti><path>/dev/sdac</path></ti> 59 <ti><path>/dev/sda3</path></ti>
79 <ti>Full disk (required)</ti> 60 <ti>Full disk (required)</ti>
80</tr> 61</tr>
81</table> 62</table>
82 63
83 64
84<p> 65<p>
85If you are interested in knowing how big a partition should be, or even how 66If you are interested in knowing how big a partition should be, or even how
86many partitions (or volumes) you need, read on. Otherwise continue now with 67many partitions (or volumes) you need, read on. Otherwise continue now with
87<uri link="#fdisk">Using fdisk to Partition your Disk</uri>. 68<uri link="#fdisk_SRM">Using fdisk to Partition your Disk (SRM only)</uri>
69or <uri link="#fdisk_ARC">Using fdisk to Partition your Disk (ARC/AlphaBIOS
70only)</uri>.
88</p> 71</p>
89 72
90</body> 73</body>
91</subsection> 74</subsection>
92<subsection> 75<subsection>
100If you are installing Gentoo to perform as a mailserver, your 83If you are installing Gentoo to perform as a mailserver, your
101<path>/var</path> should be separate as all mails are stored inside 84<path>/var</path> should be separate as all mails are stored inside
102<path>/var</path>. A good choice of filesystem will then maximise your 85<path>/var</path>. A good choice of filesystem will then maximise your
103performance. Gameservers will have a separate <path>/opt</path> as most gaming 86performance. Gameservers will have a separate <path>/opt</path> as most gaming
104servers are installed there. The reason is similar for <path>/home</path>: 87servers are installed there. The reason is similar for <path>/home</path>:
105security and backups. 88security and backups. You will definitely want to keep <path>/usr</path> big:
89not only will it contain the majority of applications, the Portage tree alone
90takes around 500 Mbyte excluding the various sources that are stored in it.
106</p> 91</p>
107 92
108<p> 93<p>
109As you can see, it very much depends on what you want to achieve. Separate 94As you can see, it very much depends on what you want to achieve. Separate
110partitions or volumes have the following advantages: 95partitions or volumes have the following advantages:
128 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. 113 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
129</li> 114</li>
130</ul> 115</ul>
131 116
132<p> 117<p>
133However, multiple partitions have one big disadvantage: if not configured 118However, multiple partitions have disadvantages as well. If not configured
134properly, you might result in having a system with lots 119properly, you will have a system with lots of free space on one partition and
135of free space on one partition and none on another. 120none on another. Another nuisance is that separate partitions - especially
121for important mountpoints like <path>/usr</path> or <path>/var</path> - often
122require the administrator to boot with an initramfs to mount the partition
123before other boot scripts start. This isn't always the case though, so your
124results may vary.
136</p> 125</p>
137 126
138</body> 127</body>
139</subsection> 128</subsection>
140</section> 129</section>
141<section id="fdisk"> 130<section id="fdisk_SRM">
142<title>Using fdisk on Alpha to Partition your Disk</title> 131<title>Using fdisk to Partition your Disk (SRM only)</title>
143<subsection> 132<subsection>
144<body> 133<body>
145 134
146<p> 135<p>
147The following parts explain how to create the example slice layout described 136The following parts explain how to create the example slice layout described
152<tr> 141<tr>
153 <th>Slice</th> 142 <th>Slice</th>
154 <th>Description</th> 143 <th>Description</th>
155</tr> 144</tr>
156<tr> 145<tr>
157 <ti><path>/dev/sdaa</path></ti> 146 <ti><path>/dev/sda1</path></ti>
158 <ti>Swap slice</ti> 147 <ti>Swap slice</ti>
159</tr> 148</tr>
160<tr> 149<tr>
161 <ti><path>/dev/sdab</path></ti> 150 <ti><path>/dev/sda2</path></ti>
162 <ti>Root slice</ti> 151 <ti>Root slice</ti>
163</tr> 152</tr>
164<tr> 153<tr>
165 <ti><path>/dev/sdac</path></ti> 154 <ti><path>/dev/sda3</path></ti>
166 <ti>Full disk (required)</ti> 155 <ti>Full disk (required)</ti>
167</tr> 156</tr>
168</table> 157</table>
169 158
170<p> 159<p>
171Change your slice layout according to your own will. 160Change your slice layout according to your own preference.
172</p> 161</p>
173 162
174 163
175</body> 164</body>
176</subsection> 165</subsection>
181<p> 170<p>
182To figure out what disks you have running, use the following commands: 171To figure out what disks you have running, use the following commands:
183</p> 172</p>
184 173
185<pre caption="Identifying available disks"> 174<pre caption="Identifying available disks">
186<comment>(For IDE disks)</comment> # <i>dmesg | grep 'drive$'</i> 175# <i>dmesg | grep 'drive$'</i> <comment>(For IDE disks)</comment>
187<comment>(For SCSI disks)</comment> # <i>dmesg | grep 'scsi'</i> 176# <i>dmesg | grep 'scsi'</i> <comment>(For SCSI disks)</comment>
188</pre> 177</pre>
189 178
190<p> 179<p>
191From this output you should be able to see what disks were detected and their 180From this output you should be able to see what disks were detected and their
192respective <path>/dev</path> entry. In the following parts we assume that the 181respective <path>/dev</path> entry. In the following parts we assume that the
206<subsection> 195<subsection>
207<title>Deleting All Slices</title> 196<title>Deleting All Slices</title>
208<body> 197<body>
209 198
210<p> 199<p>
200If your hard drive is completely blank, then you'll have to first create
201a BSD disklabel.
202</p>
203
204<pre caption="Creating a BSD disklabel">
205Command (m for help): <i>b</i>
206/dev/sda contains no disklabel.
207Do you want to create a disklabel? (y/n) <i>y</i>
208<comment>A bunch of drive-specific info will show here</comment>
2093 partitions:
210# start end size fstype [fsize bsize cpg]
211 c: 1 5290* 5289* unused 0 0
212</pre>
213
214<p>
211We start with deleting all slices <e>except</e> the 'c'-slice. The following 215We start with deleting all slices <e>except</e> the 'c'-slice (a requirement
212shows how to delete a slice (in the example we use 'a'). Repeat the process to 216for using BSD disklabels). The following shows how to delete a slice (in
213delete all other slices (again, except the 'c'-slice). 217the example we use 'a'). Repeat the process to delete all other slices
218(again, except the 'c'-slice).
214</p> 219</p>
215 220
216<p> 221<p>
217Use <c>p</c> to view all existing slices. <c>d</c> is used to delete a slice. 222Use <c>p</c> to view all existing slices. <c>d</c> is used to delete a slice.
218</p> 223</p>
253<subsection> 258<subsection>
254<title>Creating the Swap Slice</title> 259<title>Creating the Swap Slice</title>
255<body> 260<body>
256 261
257<p> 262<p>
258On Alpha based systems you don't need a separate boot partition. However, the 263On Alpha based systems you don't need a separate boot slice. However, the
259first cylinder cannot be used as the <c>aboot</c> image will be placed there. 264first cylinder cannot be used as the <c>aboot</c> image will be placed there.
260</p> 265</p>
261 266
262<p> 267<p>
263We will create a swap slice starting at the third cylinder, with a total 268We will create a swap slice starting at the third cylinder, with a total
264size of 1 Gbyte. Use <c>n</c> to create a new slice. After creating the slice, 269size of 1 GB. Use <c>n</c> to create a new slice. After creating the slice,
265we will change its type to <c>1</c>, meaning <e>swap</e>. 270we will change its type to <c>1</c> (one), meaning <e>swap</e>.
266</p> 271</p>
267 272
268<pre caption="Creating the swap slice"> 273<pre caption="Creating the swap slice">
269BSD disklabel command (m for help): <i>n</i> 274BSD disklabel command (m for help): <i>n</i>
270Partition (a-p): <i>a</i> 275Partition (a-p): <i>a</i>
296<body> 301<body>
297 302
298<p> 303<p>
299We will now create the root slice, starting from the first cylinder <e>after</e> 304We will now create the root slice, starting from the first cylinder <e>after</e>
300the swap slice. Use the <c>p</c> command to view where the swap slice ends. In 305the swap slice. Use the <c>p</c> command to view where the swap slice ends. In
301our example, this is at 1003, making the root partition start at 1004. 306our example, this is at 1003, making the root slice start at 1004.
302</p> 307</p>
303 308
304<p> 309<p>
305Another problem is that there is currently a bug in <c>fdisk</c> making it think 310Another problem is that there is currently a bug in <c>fdisk</c> making it think
306the number of available cylinders is one above the real number of cylinders. In 311the number of available cylinders is one above the real number of cylinders. In
307other words, when you are asked for the last cylinder, decrease the cylinder 312other words, when you are asked for the last cylinder, decrease the cylinder
308number (in this example: 5290) with one. 313number (in this example: 5290) with one.
309</p> 314</p>
310 315
311<p> 316<p>
312When the partition is created, we change the type to <c>8</c>, for <e>ext2</e>. 317When the slice is created, we change the type to <c>8</c>, for <e>ext2</e>.
313</p> 318</p>
314 319
315<pre caption="Creating the root slice"> 320<pre caption="Creating the root slice">
316D disklabel command (m for help): <i>n</i> 321D disklabel command (m for help): <i>n</i>
317Partition (a-p): <i>b</i> 322Partition (a-p): <i>b</i>
350<pre caption="Save and exit fdisk"> 355<pre caption="Save and exit fdisk">
351Command (m for help): <i>w</i> 356Command (m for help): <i>w</i>
352</pre> 357</pre>
353 358
354<p> 359<p>
355Now that your slices are created, you can now continue with <uri 360Now that your slices are created, you can continue with <uri
361link="#filesystems">Creating Filesystems</uri>.
362</p>
363
364</body>
365</subsection>
366</section>
367<section id="fdisk_ARC">
368<title>Using fdisk to Partition your Disk (ARC/AlphaBIOS only)</title>
369<subsection>
370<body>
371
372<p>
373The following parts explain how to partition the disk with a layout
374similar to the one described previously, namely:
375</p>
376
377<table>
378<tr>
379 <th>Partition</th>
380 <th>Description</th>
381</tr>
382<tr>
383 <ti><path>/dev/sda1</path></ti>
384 <ti>Boot partition</ti>
385</tr>
386<tr>
387 <ti><path>/dev/sda2</path></ti>
388 <ti>Swap partition</ti>
389</tr>
390<tr>
391 <ti><path>/dev/sda3</path></ti>
392 <ti>Root partition</ti>
393</tr>
394</table>
395
396<p>
397Change your partition layout according to your own preference.
398</p>
399
400</body>
401</subsection>
402<subsection>
403<title>Identifying Available Disks</title>
404<body>
405
406<p>
407To figure out what disks you have running, use the following commands:
408</p>
409
410<pre caption="Identifying available disks">
411# <i>dmesg | grep 'drive$'</i> <comment>(For IDE disks)</comment>
412# <i>dmesg | grep 'scsi'</i> <comment>(For SCSI disks)</comment>
413</pre>
414
415<p>
416From this output you should be able to see what disks were detected and their
417respective <path>/dev</path> entry. In the following parts we assume that the
418disk is a SCSI disk on <path>/dev/sda</path>.
419</p>
420
421<p>
422Now fire up <c>fdisk</c>:
423</p>
424
425<pre caption="Starting fdisk">
426# <i>fdisk /dev/sda</i>
427</pre>
428
429</body>
430</subsection>
431<subsection>
432<title>Deleting All Partitions</title>
433<body>
434
435<p>
436If your hard drive is completely blank, then you'll have to first create
437a DOS disklabel.
438</p>
439
440<pre caption="Creating a DOS disklabel">
441Command (m for help): <i>o</i>
442Building a new DOS disklabel.
443</pre>
444
445<p>
446We start with deleting all partitions. The following shows how to delete
447a partition (in the example we use '1'). Repeat the process to delete all
448other partitions.
449</p>
450
451<p>
452Use <c>p</c> to view all existing partitions. <c>d</c> is used to delete a
453partition.
454</p>
455
456<pre caption="Deleting a partition">
457command (m for help): <i>p</i>
458
459Disk /dev/sda: 9150 MB, 9150996480 bytes
46064 heads, 32 sectors/track, 8727 cylinders
461Units = cylinders of 2048 * 512 = 1048576 bytes
462
463 Device Boot Start End Blocks Id System
464/dev/sda1 1 478 489456 83 Linux
465/dev/sda2 479 8727 8446976 5 Extended
466/dev/sda5 479 1433 977904 83 Linux Swap
467/dev/sda6 1434 8727 7469040 83 Linux
468
469command (m for help): <i>d</i>
470Partition number (1-6): <i>1</i>
471</pre>
472
473
474</body>
475</subsection>
476<subsection>
477<title>Creating the Boot Partition</title>
478<body>
479
480<p>
481On Alpha systems which use MILO to boot, we have to create a small vfat
482boot partition.
483</p>
484
485<pre caption="Creating the boot partition">
486Command (m for help): <i>n</i>
487Command action
488 e extended
489 p primary partition (1-4)
490<i>p</i>
491Partition number (1-4): <i>1</i>
492First cylinder (1-8727, default 1): <i>1</i>
493Last cylinder or +size or +sizeM or +sizeK (1-8727, default 8727): <i>+16M</i>
494
495Command (m for help): <i>t</i>
496Selected partition 1
497Hex code (type L to list codes): <i>6</i>
498Changed system type of partition 1 to 6 (FAT16)
499</pre>
500
501</body>
502</subsection>
503<subsection>
504<title>Creating the Swap Partition</title>
505<body>
506
507<p>
508We will create a swap partition with a total size of 1 GB. Use <c>n</c> to
509create a new partition.
510</p>
511
512<pre caption="Creating the swap partition">
513Command (m for help): <i>n</i>
514Command action
515 e extended
516 p primary partition (1-4)
517<i>p</i>
518Partition number (1-4): <i>2</i>
519First cylinder (17-8727, default 17): <i>17</i>
520Last cylinder or +size or +sizeM or +sizeK (17-8727, default 8727): <i>+1000M</i>
521
522Command (m for help): <i>t</i>
523Partition number (1-4): <i>2</i>
524Hex code (type L to list codes): <i>82</i>
525Changed system type of partition 2 to 82 (Linux swap)
526</pre>
527
528<p>
529After these steps you should see a layout similar to the following:
530</p>
531
532<pre caption="Partition listing after creating a swap partition">
533Command (m for help): <i>p</i>
534
535Disk /dev/sda: 9150 MB, 9150996480 bytes
53664 heads, 32 sectors/track, 8727 cylinders
537Units = cylinders of 2048 * 512 = 1048576 bytes
538
539 Device Boot Start End Blocks Id System
540/dev/sda1 1 16 16368 6 FAT16
541/dev/sda2 17 971 977920 82 Linux swap
542</pre>
543
544</body>
545</subsection>
546<subsection>
547<title>Creating the Root Partition</title>
548<body>
549
550<p>
551We will now create the root partition. Again, just use the <c>n</c> command.
552</p>
553
554<pre caption="Creating the root partition">
555Command (m for help): <i>n</i>
556Command action
557 e extended
558 p primary partition (1-4)
559<i>p</i>
560Partition number (1-4): <i>3</i>
561First cylinder (972-8727, default 972): <i>972</i>
562Last cylinder or +size or +sizeM or +sizeK (972-8727, default 8727): <i>8727</i>
563</pre>
564
565<p>
566After these steps you should see a layout similar to the following:
567</p>
568
569<pre caption="Partition listing after creating the root partition">
570Command (m for help): <i>p</i>
571
572Disk /dev/sda: 9150 MB, 9150996480 bytes
57364 heads, 32 sectors/track, 8727 cylinders
574Units = cylinders of 2048 * 512 = 1048576 bytes
575
576 Device Boot Start End Blocks Id System
577/dev/sda1 1 16 16368 6 FAT16
578/dev/sda2 17 971 977920 82 Linux swap
579/dev/sda3 972 8727 7942144 83 Linux
580</pre>
581
582</body>
583</subsection>
584<subsection>
585<title>Save the Partition Layout and Exit</title>
586<body>
587
588<p>
589Save <c>fdisk</c> by typing <c>w</c>. This will also save your partition layout.
590</p>
591
592<pre caption="Save and exit fdisk">
593Command (m for help): <i>w</i>
594</pre>
595
596<p>
597Now that your partitions are created, you can continue with <uri
356link="#filesystems">Creating Filesystems</uri>. 598link="#filesystems">Creating Filesystems</uri>.
357</p> 599</p>
358 600
359</body> 601</body>
360</subsection> 602</subsection>
373Otherwise read on to learn about the available filesystems... 615Otherwise read on to learn about the available filesystems...
374</p> 616</p>
375 617
376</body> 618</body>
377</subsection> 619</subsection>
378<subsection>
379<title>Filesystems?</title>
380<body>
381 620
382<p>
383Several filesystems are available. Most of them are found stable on the
384Alpha architecture.
385</p>
386
387<p>
388<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
389journaling, which means that routine ext2 filesystem checks at startup time can
390be quite time-consuming. There is now quite a selection of newer-generation
391journaled filesystems that can be checked for consistency very quickly and are
392thus generally preferred over their non-journaled counterparts. Journaled
393filesystems prevent long delays when you boot your system and your filesystem
394happens to be in an inconsistent state.
395</p>
396
397<p>
398<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
399journaling for fast recovery in addition to other enhanced journaling modes like
400full data and ordered data journaling. ext3 is a very good and reliable
401filesystem. It has an additional hashed b-tree indexing option that enables
402high performance in almost all situations. In short, ext3 is an excellent
403filesystem.
404</p>
405
406<p>
407<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
408performance and greatly outperforms both ext2 and ext3 when dealing with small
409files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
410extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
411solid and usable as both general-purpose filesystem and for extreme cases such
412as the creation of large filesystems, the use of many small files, very large
413files and directories containing tens of thousands of files.
414</p>
415
416<p>
417<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
418feature-set and is optimized for scalability. We only recommend using this
419filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
420an uninterruptible power supply. Because XFS aggressively caches in-transit data
421in RAM, improperly designed programs (those that don't take proper precautions
422when writing files to disk and there are quite a few of them) can lose a good
423deal of data if the system goes down unexpectedly.
424</p>
425
426<p>
427<b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
428become production-ready and there hasn't been a sufficient track record to
429comment positively nor negatively on its general stability at this point.
430</p>
431
432</body>
433</subsection> 621<subsection>
622<include href="hb-install-filesystems.xml"/>
623</subsection>
624
434<subsection id="filesystems-apply"> 625<subsection id="filesystems-apply">
435<title>Applying a Filesystem to a Partition</title> 626<title>Applying a Filesystem to a Partition</title>
436<body> 627<body>
437 628
438<p> 629<p>
445 <th>Filesystem</th> 636 <th>Filesystem</th>
446 <th>Creation Command</th> 637 <th>Creation Command</th>
447</tr> 638</tr>
448<tr> 639<tr>
449 <ti>ext2</ti> 640 <ti>ext2</ti>
450 <ti><c>mke2fs</c></ti> 641 <ti><c>mkfs.ext2</c></ti>
451</tr> 642</tr>
452<tr> 643<tr>
453 <ti>ext3</ti> 644 <ti>ext3</ti>
454 <ti><c>mke2fs -j</c></ti> 645 <ti><c>mkfs.ext3</c></ti>
646</tr>
647<tr>
648 <ti>ext4</ti>
649 <ti><c>mkfs.ext4</c></ti>
455</tr> 650</tr>
456<tr> 651<tr>
457 <ti>reiserfs</ti> 652 <ti>reiserfs</ti>
458 <ti><c>mkreiserfs</c></ti> 653 <ti><c>mkfs.reiserfs</c></ti>
459</tr> 654</tr>
460<tr> 655<tr>
461 <ti>xfs</ti> 656 <ti>xfs</ti>
462 <ti><c>mkfs.xfs</c></ti> 657 <ti><c>mkfs.xfs</c></ti>
463</tr> 658</tr>
466 <ti><c>mkfs.jfs</c></ti> 661 <ti><c>mkfs.jfs</c></ti>
467</tr> 662</tr>
468</table> 663</table>
469 664
470<p> 665<p>
471For instance, to have the root partition (<path>/dev/sdab</path> in our example) 666For instance, to have the root partition (<path>/dev/sda2</path> in our example)
472in ext3, you would use: 667in ext3, you would use:
473</p> 668</p>
474 669
475<pre caption="Applying a filesystem on a partition"> 670<pre caption="Applying a filesystem on a partition">
476# <i>mke2fs -j /dev/sdab</i> 671# <i>mkfs.ext3 /dev/sda2</i>
477</pre> 672</pre>
478 673
479<p> 674<p>
480Now create the filesystems on your newly created partitions (or logical 675Now create the filesystems on your newly created partitions (or logical
481volumes). 676volumes).
490<p> 685<p>
491<c>mkswap</c> is the command that is used to initialize swap partitions: 686<c>mkswap</c> is the command that is used to initialize swap partitions:
492</p> 687</p>
493 688
494<pre caption="Creating a Swap signature"> 689<pre caption="Creating a Swap signature">
495# <i>mkswap /dev/sdaa</i> 690# <i>mkswap /dev/sda1</i>
496</pre> 691</pre>
497 692
498<p> 693<p>
499To activate the swap partition, use <c>swapon</c>: 694To activate the swap partition, use <c>swapon</c>:
500</p> 695</p>
501 696
502<pre caption="Activating the swap partition"> 697<pre caption="Activating the swap partition">
503# <i>swapon /dev/sdaa</i> 698# <i>swapon /dev/sda1</i>
504</pre> 699</pre>
505 700
506<p> 701<p>
507Create and activate the swap now. 702Create and activate the swap with the commands mentioned above.
508</p> 703</p>
509 704
510</body> 705</body>
511</subsection> 706</subsection>
512</section> 707</section>
516 711
517<p> 712<p>
518Now that your partitions are initialized and are housing a filesystem, it is 713Now that your partitions are initialized and are housing a filesystem, it is
519time to mount those partitions. Use the <c>mount</c> command. Don't forget to 714time to mount those partitions. Use the <c>mount</c> command. Don't forget to
520create the necessary mount directories for every partition you created. As an 715create the necessary mount directories for every partition you created. As an
521example we mount the root and boot partition: 716example we mount the root partition:
522</p> 717</p>
523 718
524<pre caption="Mounting partitions"> 719<pre caption="Mounting partitions">
525# <i>mount /dev/sdab /mnt/gentoo</i> 720# <i>mount /dev/sda2 /mnt/gentoo</i>
526</pre> 721</pre>
527 722
528<note> 723<note>
529If you want your <path>/tmp</path> to reside on a separate partition, be sure to 724If you want your <path>/tmp</path> to reside on a separate partition, be sure to
530change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This 725change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
531also holds for <path>/var/tmp</path>. 726also holds for <path>/var/tmp</path>.
532</note> 727</note>
533 728
534<p> 729<p>
535We also need to mount the proc filesystem (a virtual interface with the kernel) 730We will also have to mount the proc filesystem (a virtual interface with the
536on <path>/proc</path>. We first create the <path>/mnt/gentoo/proc</path> 731kernel) on <path>/proc</path>. But first we will need to place our files on the partitions.
537mountpoint and then mount the filesystem:
538</p>
539
540<pre caption="Creating the /mnt/gentoo/proc mountpoint">
541# <i>mkdir /mnt/gentoo/proc</i>
542# <i>mount -t proc none /mnt/gentoo/proc</i>
543</pre>
544
545<p> 732</p>
733
734<p>
546Now continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo 735Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
547Installation Files</uri>. 736Installation Files</uri>.
548</p> 737</p>
549 738
550</body> 739</body>
551</section> 740</section>

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.33

  ViewVC Help
Powered by ViewVC 1.1.20