| 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.21 2006/06/21 01:49:06 nightmorph Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <version>1.9</version> |
11 | <version>2.4</version> |
| 12 | <date>August 30, 2004</date> |
12 | <date>2006-06-20</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> |
| 89 | If you are interested in knowing how big a partition should be, or even how |
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 |
90 | many 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> |
|
|
92 | or <uri link="#fdisk_ARC">Using fdisk to Partition your Disk (ARC/AlphaBIOS |
|
|
93 | only)</uri>. |
| 92 | </p> |
94 | </p> |
| 93 | |
95 | |
| 94 | </body> |
96 | </body> |
| 95 | </subsection> |
97 | </subsection> |
| 96 | <subsection> |
98 | <subsection> |
| … | |
… | |
| 104 | If you are installing Gentoo to perform as a mailserver, your |
106 | If 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 |
| 107 | performance. Gameservers will have a separate <path>/opt</path> as most gaming |
109 | 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>: |
110 | servers are installed there. The reason is similar for <path>/home</path>: |
| 109 | security and backups. |
111 | 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. |
| 110 | </p> |
114 | </p> |
| 111 | |
115 | |
| 112 | <p> |
116 | <p> |
| 113 | As you can see, it very much depends on what you want to achieve. Separate |
117 | As you can see, it very much depends on what you want to achieve. Separate |
| 114 | partitions or volumes have the following advantages: |
118 | partitions 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> |
| 151 | The following parts explain how to create the example slice layout described |
155 | The following parts explain how to create the example slice layout described |
| … | |
… | |
| 214 | <p> |
218 | <p> |
| 215 | If your hard drive is completely blank, then you'll have to first create |
219 | If your hard drive is completely blank, then you'll have to first create |
| 216 | a BSD disklabel. |
220 | a BSD disklabel. |
| 217 | </p> |
221 | </p> |
| 218 | |
222 | |
| 219 | <pre caption="Creating BSD disklabel"> |
223 | <pre caption="Creating a BSD disklabel"> |
| 220 | Command (m for help): <i>b</i> |
224 | Command (m for help): <i>b</i> |
| 221 | /dev/sda contains no disklabel. |
225 | /dev/sda contains no disklabel. |
| 222 | Do you want to create a disklabel? (y/n) <i>y</i> |
226 | Do 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> |
| 224 | 3 partitions: |
228 | 3 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> |
| 230 | We start with deleting all slices <e>except</e> the 'c'-slice. The following |
234 | We start with deleting all slices <e>except</e> the 'c'-slice (a requirement |
| 231 | shows how to delete a slice (in the example we use 'a'). Repeat the process to |
235 | for using BSD disklabels). The following shows how to delete a slice (in |
| 232 | delete all other slices (again, except the 'c'-slice). |
236 | the 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> |
| 236 | Use <c>p</c> to view all existing slices. <c>d</c> is used to delete a slice. |
241 | Use <c>p</c> to view all existing slices. <c>d</c> is used to delete a slice. |
| 237 | </p> |
242 | </p> |
| … | |
… | |
| 278 | first cylinder cannot be used as the <c>aboot</c> image will be placed there. |
283 | first cylinder cannot be used as the <c>aboot</c> image will be placed there. |
| 279 | </p> |
284 | </p> |
| 280 | |
285 | |
| 281 | <p> |
286 | <p> |
| 282 | We will create a swap slice starting at the third cylinder, with a total |
287 | We will create a swap slice starting at the third cylinder, with a total |
| 283 | size of 1 Gbyte. Use <c>n</c> to create a new slice. After creating the slice, |
288 | size of 1 GB. Use <c>n</c> to create a new slice. After creating the slice, |
| 284 | we will change its type to <c>1</c> (one), meaning <e>swap</e>. |
289 | we 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"> |
| 288 | BSD disklabel command (m for help): <i>n</i> |
293 | BSD 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> |
|
|
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 | Use <c>p</c> to view all existing partitions. <c>d</c> is used to delete a |
|
|
472 | partition. |
|
|
473 | </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 | size of 1 GB. Use <c>n</c> to create a new partition. |
|
|
529 | </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> |
| 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> |
| 402 | Several filesystems are available. Most of them are found stable on the |
644 | Several filesystems are available. Most of them are found stable on the |
| 403 | Alpha architecture. |
645 | Alpha architecture. |
| 404 | </p> |
646 | </p> |
|
|
647 | |
|
|
648 | <note> |
|
|
649 | <c>aboot</c> only supports booting from <b>ext2</b> and <b>ext3</b> |
|
|
650 | partitions. |
|
|
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 |
| 408 | journaling, which means that routine ext2 filesystem checks at startup time can |
655 | journaling, which means that routine ext2 filesystem checks at startup time can |
| 409 | be quite time-consuming. There is now quite a selection of newer-generation |
656 | be quite time-consuming. There is now quite a selection of newer-generation |
| … | |
… | |
| 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 |
| 418 | journaling for fast recovery in addition to other enhanced journaling modes like |
665 | journaling for fast recovery in addition to other enhanced journaling modes like |
| 419 | full data and ordered data journaling. ext3 is a very good and reliable |
666 | full data and ordered data journaling. ext3 is a very good and reliable |
| 420 | filesystem. It has an additional hashed b-tree indexing option that enables |
667 | filesystem. It has an additional hashed b-tree indexing option that enables |
| 421 | high performance in almost all situations. In short, ext3 is an excellent |
668 | high performance in almost all situations. You can enable this indexing by |
| 422 | filesystem. |
669 | adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an |
|
|
670 | excellent filesystem. |
| 423 | </p> |
671 | </p> |
| 424 | |
672 | |
| 425 | <p> |
673 | <p> |
| 426 | <b>ReiserFS</b> is a B*-tree based filesystem that has very good overall |
674 | <b>ReiserFS</b> is a B*-tree based filesystem that has very good overall |
| 427 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
675 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
| … | |
… | |
| 521 | <pre caption="Activating the swap partition"> |
769 | <pre caption="Activating the swap partition"> |
| 522 | # <i>swapon /dev/sda1</i> |
770 | # <i>swapon /dev/sda1</i> |
| 523 | </pre> |
771 | </pre> |
| 524 | |
772 | |
| 525 | <p> |
773 | <p> |
| 526 | Create and activate the swap now. |
774 | Create and activate the swap with the commands mentioned above. |
| 527 | </p> |
775 | </p> |
| 528 | |
776 | |
| 529 | </body> |
777 | </body> |
| 530 | </subsection> |
778 | </subsection> |
| 531 | </section> |
779 | </section> |