/[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.11 Revision 1.22
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.11 2004/11/15 12:47:47 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-disk.xml,v 1.22 2006/08/30 22:52:28 nightmorph Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.9</version> 11<version>7.0</version>
12<date>August 30, 2004</date> 12<date>2006-08-30</date>
13 13
14<section> 14<section>
15<title>Introduction to Block Devices</title> 15<title>Introduction to Block Devices</title>
16<subsection> 16<subsection>
17<title>Block Devices</title> 17<title>Block Devices</title>
86 86
87 87
88<p> 88<p>
89If 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
90many partitions (or volumes) you need, read on. Otherwise continue now with 90many partitions (or volumes) you need, read on. Otherwise continue now with
91<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>.
92</p> 94</p>
93 95
94</body> 96</body>
95</subsection> 97</subsection>
96<subsection> 98<subsection>
104If you are installing Gentoo to perform as a mailserver, your 106If you are installing Gentoo to perform as a mailserver, your
105<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
106<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
107performance. Gameservers will have a separate <path>/opt</path> as most gaming 109performance. Gameservers will have a separate <path>/opt</path> as most gaming
108servers are installed there. The reason is similar for <path>/home</path>: 110servers are installed there. The reason is similar for <path>/home</path>:
109security 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.
110</p> 114</p>
111 115
112<p> 116<p>
113As 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
114partitions or volumes have the following advantages: 118partitions or volumes have the following advantages:
140</p> 144</p>
141 145
142</body> 146</body>
143</subsection> 147</subsection>
144</section> 148</section>
145<section id="fdisk"> 149<section id="fdisk_SRM">
146<title>Using fdisk on Alpha to Partition your Disk</title> 150<title>Using fdisk to Partition your Disk (SRM only)</title>
147<subsection> 151<subsection>
148<body> 152<body>
149 153
150<p> 154<p>
151The following parts explain how to create the example slice layout described 155The following parts explain how to create the example slice layout described
214<p> 218<p>
215If your hard drive is completely blank, then you'll have to first create 219If your hard drive is completely blank, then you'll have to first create
216a BSD disklabel. 220a BSD disklabel.
217</p> 221</p>
218 222
219<pre caption="Creating BSD disklabel"> 223<pre caption="Creating a BSD disklabel">
220Command (m for help): <i>b</i> 224Command (m for help): <i>b</i>
221/dev/sda contains no disklabel. 225/dev/sda contains no disklabel.
222Do you want to create a disklabel? (y/n) <i>y</i> 226Do you want to create a disklabel? (y/n) <i>y</i>
223<comment>A bunch of drive-specific info will show here</comment> 227<comment>A bunch of drive-specific info will show here</comment>
2243 partitions: 2283 partitions:
225# start end size fstype [fsize bsize cpg] 229# start end size fstype [fsize bsize cpg]
226 c: 1 5290* 5289* unused 0 0 230 c: 1 5290* 5289* unused 0 0
227</pre> 231</pre>
228 232
229<p> 233<p>
230We 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
231shows 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
232delete 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).
233</p> 238</p>
234 239
235<p> 240<p>
236Use <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.
237</p> 242</p>
278first 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.
279</p> 284</p>
280 285
281<p> 286<p>
282We 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
283size 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,
284we will change its type to <c>1</c> (one), meaning <e>swap</e>. 289we will change its type to <c>1</c> (one), meaning <e>swap</e>.
285</p> 290</p>
286 291
287<pre caption="Creating the swap slice"> 292<pre caption="Creating the swap slice">
288BSD disklabel command (m for help): <i>n</i> 293BSD disklabel command (m for help): <i>n</i>
376</p> 381</p>
377 382
378</body> 383</body>
379</subsection> 384</subsection>
380</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>
381<section id="filesystems"> 623<section id="filesystems">
382<title>Creating Filesystems</title> 624<title>Creating Filesystems</title>
383<subsection> 625<subsection>
384<title>Introduction</title> 626<title>Introduction</title>
385<body> 627<body>
400 642
401<p> 643<p>
402Several filesystems are available. Most of them are found stable on the 644Several filesystems are available. Most of them are found stable on the
403Alpha architecture. 645Alpha architecture.
404</p> 646</p>
647
648<note>
649<c>aboot</c> only supports booting from <b>ext2</b> and <b>ext3</b>
650partitions.
651</note>
405 652
406<p> 653<p>
407<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
408journaling, which means that routine ext2 filesystem checks at startup time can 655journaling, which means that routine ext2 filesystem checks at startup time can
409be 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
415 662
416<p> 663<p>
417<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
418journaling for fast recovery in addition to other enhanced journaling modes like 665journaling for fast recovery in addition to other enhanced journaling modes like
419full data and ordered data journaling. ext3 is a very good and reliable 666full data and ordered data journaling. ext3 is a very good and reliable
420filesystem. It has an additional hashed b-tree indexing option that enables
421high performance in almost all situations. In short, ext3 is an excellent
422filesystem. 667filesystem.
423</p> 668</p>
424 669
425<p> 670<p>
426<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall 671<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
521<pre caption="Activating the swap partition"> 766<pre caption="Activating the swap partition">
522# <i>swapon /dev/sda1</i> 767# <i>swapon /dev/sda1</i>
523</pre> 768</pre>
524 769
525<p> 770<p>
526Create and activate the swap now. 771Create and activate the swap with the commands mentioned above.
527</p> 772</p>
528 773
529</body> 774</body>
530</subsection> 775</subsection>
531</section> 776</section>

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.20