/[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.26
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.26 2007/06/26 07:07:27 nightmorph Exp $ -->
8 8
9<sections> 9<sections>
10
11<version>8.1</version>
12<date>2007-06-26</date>
13
10<section> 14<section>
11<title>Introduction to Block Devices</title> 15<title>Introduction to Block Devices</title>
12<subsection> 16<subsection>
13<title>Block Devices</title> 17<title>Block Devices</title>
14<body> 18<body>
65<tr> 69<tr>
66 <th>Slice</th> 70 <th>Slice</th>
67 <th>Description</th> 71 <th>Description</th>
68</tr> 72</tr>
69<tr> 73<tr>
70 <ti><path>/dev/sdaa</path></ti> 74 <ti><path>/dev/sda1</path></ti>
71 <ti>Swap slice</ti> 75 <ti>Swap slice</ti>
72</tr> 76</tr>
73<tr> 77<tr>
74 <ti><path>/dev/sdab</path></ti> 78 <ti><path>/dev/sda2</path></ti>
75 <ti>Root slice</ti> 79 <ti>Root slice</ti>
76</tr> 80</tr>
77<tr> 81<tr>
78 <ti><path>/dev/sdac</path></ti> 82 <ti><path>/dev/sda3</path></ti>
79 <ti>Full disk (required)</ti> 83 <ti>Full disk (required)</ti>
80</tr> 84</tr>
81</table> 85</table>
82 86
83 87
84<p> 88<p>
85If you are interested in knowing how big a partition should be, or even how 89If 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 90many partitions (or volumes) you need, read on. Otherwise continue now with
87<uri link="#fdisk">Using fdisk to Partition your Disk</uri>. 91<uri link="#fdisk_SRM">Using fdisk to Partition your Disk (SRM only)</uri>
92or <uri link="#fdisk_ARC">Using fdisk to Partition your Disk (ARC/AlphaBIOS
93only)</uri>.
88</p> 94</p>
89 95
90</body> 96</body>
91</subsection> 97</subsection>
92<subsection> 98<subsection>
100If you are installing Gentoo to perform as a mailserver, your 106If you are installing Gentoo to perform as a mailserver, your
101<path>/var</path> should be separate as all mails are stored inside 107<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 108<path>/var</path>. A good choice of filesystem will then maximise your
103performance. Gameservers will have a separate <path>/opt</path> as most gaming 109performance. Gameservers will have a separate <path>/opt</path> as most gaming
104servers are installed there. The reason is similar for <path>/home</path>: 110servers are installed there. The reason is similar for <path>/home</path>:
105security and backups. 111security and backups. You will definitely want to keep <path>/usr</path> big:
112not only will it contain the majority of applications, the Portage tree alone
113takes around 500 Mbyte excluding the various sources that are stored in it.
106</p> 114</p>
107 115
108<p> 116<p>
109As you can see, it very much depends on what you want to achieve. Separate 117As you can see, it very much depends on what you want to achieve. Separate
110partitions or volumes have the following advantages: 118partitions or volumes have the following advantages:
136</p> 144</p>
137 145
138</body> 146</body>
139</subsection> 147</subsection>
140</section> 148</section>
141<section id="fdisk"> 149<section id="fdisk_SRM">
142<title>Using fdisk on Alpha to Partition your Disk</title> 150<title>Using fdisk to Partition your Disk (SRM only)</title>
143<subsection> 151<subsection>
144<body> 152<body>
145 153
146<p> 154<p>
147The following parts explain how to create the example slice layout described 155The following parts explain how to create the example slice layout described
152<tr> 160<tr>
153 <th>Slice</th> 161 <th>Slice</th>
154 <th>Description</th> 162 <th>Description</th>
155</tr> 163</tr>
156<tr> 164<tr>
157 <ti><path>/dev/sdaa</path></ti> 165 <ti><path>/dev/sda1</path></ti>
158 <ti>Swap slice</ti> 166 <ti>Swap slice</ti>
159</tr> 167</tr>
160<tr> 168<tr>
161 <ti><path>/dev/sdab</path></ti> 169 <ti><path>/dev/sda2</path></ti>
162 <ti>Root slice</ti> 170 <ti>Root slice</ti>
163</tr> 171</tr>
164<tr> 172<tr>
165 <ti><path>/dev/sdac</path></ti> 173 <ti><path>/dev/sda3</path></ti>
166 <ti>Full disk (required)</ti> 174 <ti>Full disk (required)</ti>
167</tr> 175</tr>
168</table> 176</table>
169 177
170<p> 178<p>
171Change your slice layout according to your own will. 179Change your slice layout according to your own preference.
172</p> 180</p>
173 181
174 182
175</body> 183</body>
176</subsection> 184</subsection>
181<p> 189<p>
182To figure out what disks you have running, use the following commands: 190To figure out what disks you have running, use the following commands:
183</p> 191</p>
184 192
185<pre caption="Identifying available disks"> 193<pre caption="Identifying available disks">
186<comment>(For IDE disks)</comment> # <i>dmesg | grep 'drive$'</i> 194# <i>dmesg | grep 'drive$'</i> <comment>(For IDE disks)</comment>
187<comment>(For SCSI disks)</comment> # <i>dmesg | grep 'scsi'</i> 195# <i>dmesg | grep 'scsi'</i> <comment>(For SCSI disks)</comment>
188</pre> 196</pre>
189 197
190<p> 198<p>
191From this output you should be able to see what disks were detected and their 199From 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 200respective <path>/dev</path> entry. In the following parts we assume that the
206<subsection> 214<subsection>
207<title>Deleting All Slices</title> 215<title>Deleting All Slices</title>
208<body> 216<body>
209 217
210<p> 218<p>
219If your hard drive is completely blank, then you'll have to first create
220a BSD disklabel.
221</p>
222
223<pre caption="Creating a BSD disklabel">
224Command (m for help): <i>b</i>
225/dev/sda contains no disklabel.
226Do you want to create a disklabel? (y/n) <i>y</i>
227<comment>A bunch of drive-specific info will show here</comment>
2283 partitions:
229# start end size fstype [fsize bsize cpg]
230 c: 1 5290* 5289* unused 0 0
231</pre>
232
233<p>
211We start with deleting all slices <e>except</e> the 'c'-slice. The following 234We 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 235for using BSD disklabels). The following shows how to delete a slice (in
213delete all other slices (again, except the 'c'-slice). 236the example we use 'a'). Repeat the process to delete all other slices
237(again, except the 'c'-slice).
214</p> 238</p>
215 239
216<p> 240<p>
217Use <c>p</c> to view all existing slices. <c>d</c> is used to delete a slice. 241Use <c>p</c> to view all existing slices. <c>d</c> is used to delete a slice.
218</p> 242</p>
259first cylinder cannot be used as the <c>aboot</c> image will be placed there. 283first cylinder cannot be used as the <c>aboot</c> image will be placed there.
260</p> 284</p>
261 285
262<p> 286<p>
263We will create a swap slice starting at the third cylinder, with a total 287We 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, 288size 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>. 289we will change its type to <c>1</c> (one), meaning <e>swap</e>.
266</p> 290</p>
267 291
268<pre caption="Creating the swap slice"> 292<pre caption="Creating the swap slice">
269BSD disklabel command (m for help): <i>n</i> 293BSD disklabel command (m for help): <i>n</i>
270Partition (a-p): <i>a</i> 294Partition (a-p): <i>a</i>
357</p> 381</p>
358 382
359</body> 383</body>
360</subsection> 384</subsection>
361</section> 385</section>
386<section id="fdisk_ARC">
387<title>Using fdisk to Partition your Disk (ARC/AlphaBIOS only)</title>
388<subsection>
389<body>
390
391<p>
392The following parts explain how to partition the disk with a layout
393similar 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>
416Change 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>
426To 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>
435From this output you should be able to see what disks were detected and their
436respective <path>/dev</path> entry. In the following parts we assume that the
437disk is a SCSI disk on <path>/dev/sda</path>.
438</p>
439
440<p>
441Now 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>
455If your hard drive is completely blank, then you'll have to first create
456a DOS disklabel.
457</p>
458
459<pre caption="Creating a DOS disklabel">
460Command (m for help): <i>o</i>
461Building a new DOS disklabel.
462</pre>
463
464<p>
465We start with deleting all partitions. The following shows how to delete
466a partition (in the example we use '1'). Repeat the process to delete all
467other partitions.
468</p>
469
470<p>
471Use <c>p</c> to view all existing partitions. <c>d</c> is used to delete a
472partition.
473</p>
474
475<pre caption="Deleting a partition">
476command (m for help): <i>p</i>
477
478Disk /dev/sda: 9150 MB, 9150996480 bytes
47964 heads, 32 sectors/track, 8727 cylinders
480Units = 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
488command (m for help): <i>d</i>
489Partition 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>
500On Alpha systems which use MILO to boot, we have to create a small vfat
501boot partition.
502</p>
503
504<pre caption="Creating the boot partition">
505Command (m for help): <i>n</i>
506Command action
507 e extended
508 p primary partition (1-4)
509<i>p</i>
510Partition number (1-4): <i>1</i>
511First cylinder (1-8727, default 1): <i>1</i>
512Last cylinder or +size or +sizeM or +sizeK (1-8727, default 8727): <i>+16M</i>
513
514Command (m for help): <i>t</i>
515Selected partition 1
516Hex code (type L to list codes): <i>6</i>
517Changed 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>
527We will create a swap partition starting at the third cylinder, with a total
528size of 1 GB. Use <c>n</c> to create a new partition.
529</p>
530
531<pre caption="Creating the swap partition">
532Command (m for help): <i>n</i>
533Command action
534 e extended
535 p primary partition (1-4)
536<i>p</i>
537Partition number (1-4): <i>2</i>
538First cylinder (17-8727, default 17): <i>17</i>
539Last cylinder or +size or +sizeM or +sizeK (17-8727, default 8727): <i>+1000M</i>
540
541Command (m for help): <i>t</i>
542Partition number (1-4): <i>1</i>
543Hex code (type L to list codes): <i>82</i>
544Changed system type of partition 2 to 82 (Linux swap)
545</pre>
546
547<p>
548After these steps you should see a layout similar to the following:
549</p>
550
551<pre caption="Partition listing after creating a swap partition">
552Command (m for help): <i>p</i>
553
554Disk /dev/sda: 9150 MB, 9150996480 bytes
55564 heads, 32 sectors/track, 8727 cylinders
556Units = 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>
570We will now create the root partition. Again, just use the <c>n</c> command.
571</p>
572
573<pre caption="Creating the root partition">
574Command (m for help): <i>n</i>
575Command action
576 e extended
577 p primary partition (1-4)
578<i>p</i>
579Partition number (1-4): <i>3</i>
580First cylinder (972-8727, default 972): <i>972</i>
581Last cylinder or +size or +sizeM or +sizeK (972-8727, default 8727): <i>8727</i>
582</pre>
583
584<p>
585After these steps you should see a layout similar to the following:
586</p>
587
588<pre caption="Partition listing after creating the root partition">
589Command (m for help): <i>p</i>
590
591Disk /dev/sda: 9150 MB, 9150996480 bytes
59264 heads, 32 sectors/track, 8727 cylinders
593Units = 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>
608Save <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">
612Command (m for help): <i>w</i>
613</pre>
614
615<p>
616Now that your partitions are created, you can now continue with <uri
617link="#filesystems">Creating Filesystems</uri>.
618</p>
619
620</body>
621</subsection>
622</section>
362<section id="filesystems"> 623<section id="filesystems">
363<title>Creating Filesystems</title> 624<title>Creating Filesystems</title>
364<subsection> 625<subsection>
365<title>Introduction</title> 626<title>Introduction</title>
366<body> 627<body>
381 642
382<p> 643<p>
383Several filesystems are available. Most of them are found stable on the 644Several filesystems are available. Most of them are found stable on the
384Alpha architecture. 645Alpha architecture.
385</p> 646</p>
647
648<note>
649<c>aboot</c> only supports booting from <b>ext2</b> and <b>ext3</b>
650partitions.
651</note>
386 652
387<p> 653<p>
388<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata 654<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 655journaling, which means that routine ext2 filesystem checks at startup time can
390be quite time-consuming. There is now quite a selection of newer-generation 656be quite time-consuming. There is now quite a selection of newer-generation
395</p> 661</p>
396 662
397<p> 663<p>
398<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata 664<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 665journaling for fast recovery in addition to other enhanced journaling modes like
400full data and ordered data journaling. ext3 is a very good and reliable 666full data and ordered data journaling. It uses an HTree index that enables high
401filesystem. It has an additional hashed b-tree indexing option that enables
402high performance in almost all situations. In short, ext3 is an excellent 667performance in almost all situations. In short, ext3 is a very good and reliable
403filesystem. 668filesystem.
404</p> 669</p>
405 670
406<p> 671<p>
407<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall 672<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 673performance 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 674files (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 675extremely well and has metadata journaling. ReiserFS is solid and usable as
411solid and usable as both general-purpose filesystem and for extreme cases such 676both general-purpose filesystem and for extreme cases such as the creation of
412as the creation of large filesystems, the use of many small files, very large 677large filesystems, very large files and directories containing tens of
413files and directories containing tens of thousands of files. 678thousands of small files.
414</p> 679</p>
415 680
416<p> 681<p>
417<b>XFS</b> is a filesystem with metadata journaling which comes with a robust 682<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 683feature-set and is optimized for scalability. We only recommend using this
466 <ti><c>mkfs.jfs</c></ti> 731 <ti><c>mkfs.jfs</c></ti>
467</tr> 732</tr>
468</table> 733</table>
469 734
470<p> 735<p>
471For instance, to have the root partition (<path>/dev/sdab</path> in our example) 736For instance, to have the root partition (<path>/dev/sda2</path> in our example)
472in ext3, you would use: 737in ext3, you would use:
473</p> 738</p>
474 739
475<pre caption="Applying a filesystem on a partition"> 740<pre caption="Applying a filesystem on a partition">
476# <i>mke2fs -j /dev/sdab</i> 741# <i>mke2fs -j /dev/sda2</i>
477</pre> 742</pre>
478 743
479<p> 744<p>
480Now create the filesystems on your newly created partitions (or logical 745Now create the filesystems on your newly created partitions (or logical
481volumes). 746volumes).
490<p> 755<p>
491<c>mkswap</c> is the command that is used to initialize swap partitions: 756<c>mkswap</c> is the command that is used to initialize swap partitions:
492</p> 757</p>
493 758
494<pre caption="Creating a Swap signature"> 759<pre caption="Creating a Swap signature">
495# <i>mkswap /dev/sdaa</i> 760# <i>mkswap /dev/sda1</i>
496</pre> 761</pre>
497 762
498<p> 763<p>
499To activate the swap partition, use <c>swapon</c>: 764To activate the swap partition, use <c>swapon</c>:
500</p> 765</p>
501 766
502<pre caption="Activating the swap partition"> 767<pre caption="Activating the swap partition">
503# <i>swapon /dev/sdaa</i> 768# <i>swapon /dev/sda1</i>
504</pre> 769</pre>
505 770
506<p> 771<p>
507Create and activate the swap now. 772Create and activate the swap with the commands mentioned above.
508</p> 773</p>
509 774
510</body> 775</body>
511</subsection> 776</subsection>
512</section> 777</section>
520create the necessary mount directories for every partition you created. As an 785create the necessary mount directories for every partition you created. As an
521example we mount the root and boot partition: 786example we mount the root and boot partition:
522</p> 787</p>
523 788
524<pre caption="Mounting partitions"> 789<pre caption="Mounting partitions">
525# <i>mount /dev/sdab /mnt/gentoo</i> 790# <i>mount /dev/sda2 /mnt/gentoo</i>
526</pre> 791</pre>
527 792
528<note> 793<note>
529If you want your <path>/tmp</path> to reside on a separate partition, be sure to 794If 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 795change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
531also holds for <path>/var/tmp</path>. 796also holds for <path>/var/tmp</path>.
532</note> 797</note>
533 798
534<p> 799<p>
535We also need to mount the proc filesystem (a virtual interface with the kernel) 800We 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> 801kernel) 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> 802</p>
803
804<p>
546Now continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo 805Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
547Installation Files</uri>. 806Installation Files</uri>.
548</p> 807</p>
549 808
550</body> 809</body>
551</section> 810</section>

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

  ViewVC Help
Powered by ViewVC 1.1.20