| 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/1.0 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-disk.xml,v 1.16 2005/02/20 12:38:06 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-disk.xml,v 1.17 2005/03/28 11:30:52 swift Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <version>1.11</version> |
11 | <version>2.00</version> |
| 12 | <date>2005-02-20</date> |
12 | <date>2005-03-28</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> |
| 18 | <body> |
18 | <body> |
| 19 | |
19 | |
| 20 | <p> |
20 | <p> |
| 21 | We'll take a good look at disk-oriented aspects of Gentoo Linux |
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. |
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, |
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 |
24 | you'll be guided through the process of setting up partitions and filesystems |
| 25 | for your Gentoo Linux installation. |
25 | for your Gentoo Linux installation. |
| 26 | </p> |
26 | </p> |
| 27 | |
27 | |
| … | |
… | |
| 76 | </tr> |
76 | </tr> |
| 77 | <tr> |
77 | <tr> |
| 78 | <ti><path>/dev/sda2</path></ti> |
78 | <ti><path>/dev/sda2</path></ti> |
| 79 | <ti>Root slice</ti> |
79 | <ti>Root slice</ti> |
| 80 | </tr> |
80 | </tr> |
| 81 | <tr> |
81 | <tr> |
| 82 | <ti><path>/dev/sda3</path></ti> |
82 | <ti><path>/dev/sda3</path></ti> |
| 83 | <ti>Full disk (required)</ti> |
83 | <ti>Full disk (required)</ti> |
| 84 | </tr> |
84 | </tr> |
| 85 | </table> |
85 | </table> |
| 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> |
| 97 | <title>How Many and How Big?</title> |
99 | <title>How Many and How Big?</title> |
| 98 | <body> |
100 | <body> |
| 99 | |
101 | |
| 100 | <p> |
102 | <p> |
| 101 | The number of partitions is highly dependent on your environment. For instance, |
103 | 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 |
104 | 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. |
105 | <path>/home</path> separate as it increases security and makes backups easier. |
| 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 |
| … | |
… | |
| 130 | <li> |
132 | <li> |
| 131 | Security can be enhanced by mounting some partitions or volumes read-only, |
133 | Security can be enhanced by mounting some partitions or volumes read-only, |
| 132 | nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. |
134 | nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. |
| 133 | </li> |
135 | </li> |
| 134 | </ul> |
136 | </ul> |
| 135 | |
137 | |
| 136 | <p> |
138 | <p> |
| 137 | However, multiple partitions have one big disadvantage: if not configured |
139 | However, multiple partitions have one big disadvantage: if not configured |
| 138 | properly, you might result in having a system with lots |
140 | properly, you might result in having a system with lots |
| 139 | of free space on one partition and none on another. |
141 | of free space on one partition and none on another. |
| 140 | </p> |
142 | </p> |
| 141 | |
143 | |
| 142 | </body> |
144 | </body> |
| 143 | </subsection> |
145 | </subsection> |
| 144 | </section> |
146 | </section> |
| 145 | <section id="fdisk"> |
147 | <section id="fdisk_SRM"> |
| 146 | <title>Using fdisk to Partition your Disk (SRM only)</title> |
148 | <title>Using fdisk to Partition your Disk (SRM only)</title> |
| 147 | <subsection> |
149 | <subsection> |
| 148 | <body> |
150 | <body> |
| 149 | |
151 | |
| 150 | <p> |
152 | <p> |
| 151 | The following parts explain how to create the example slice layout described |
153 | The following parts explain how to create the example slice layout described |
| 152 | previously, namely: |
154 | previously, namely: |
| 153 | </p> |
155 | </p> |
| 154 | |
156 | |
| 155 | <table> |
157 | <table> |
| 156 | <tr> |
158 | <tr> |
| 157 | <th>Slice</th> |
159 | <th>Slice</th> |
| 158 | <th>Description</th> |
160 | <th>Description</th> |
| 159 | </tr> |
161 | </tr> |
| 160 | <tr> |
162 | <tr> |
| … | |
… | |
| 367 | Save <c>fdisk</c> by typing <c>w</c>. This will also save your slice layout. |
369 | Save <c>fdisk</c> by typing <c>w</c>. This will also save your slice layout. |
| 368 | </p> |
370 | </p> |
| 369 | |
371 | |
| 370 | <pre caption="Save and exit fdisk"> |
372 | <pre caption="Save and exit fdisk"> |
| 371 | Command (m for help): <i>w</i> |
373 | Command (m for help): <i>w</i> |
| 372 | </pre> |
374 | </pre> |
| 373 | |
375 | |
| 374 | <p> |
376 | <p> |
| 375 | Now that your slices are created, you can now continue with <uri |
377 | Now that your slices are created, you can now continue with <uri |
| 376 | link="#filesystems">Creating Filesystems</uri>. |
378 | link="#filesystems">Creating Filesystems</uri>. |
| 377 | </p> |
379 | </p> |
| 378 | |
380 | |
| 379 | </body> |
381 | </body> |
| 380 | </subsection> |
382 | </subsection> |
| 381 | </section> |
383 | </section> |
| 382 | <section id="fdisk"> |
384 | <section id="fdisk_ARC"> |
| 383 | <title>Using fdisk to Partition your Disk (ARC/AlphaBIOS only)</title> |
385 | <title>Using fdisk to Partition your Disk (ARC/AlphaBIOS only)</title> |
| 384 | <subsection> |
386 | <subsection> |
| 385 | <body> |
387 | <body> |
| 386 | |
388 | |
| 387 | <p> |
389 | <p> |
| 388 | The following parts explain how to partition the disk with a layout |
390 | The following parts explain how to partition the disk with a layout |
| 389 | similar to the one described previously, namely: |
391 | similar to the one described previously, namely: |
| 390 | </p> |
392 | </p> |
| 391 | |
393 | |
| 392 | <table> |
394 | <table> |
| 393 | <tr> |
395 | <tr> |
| 394 | <th>Partition</th> |
396 | <th>Partition</th> |
| 395 | <th>Description</th> |
397 | <th>Description</th> |
| 396 | </tr> |
398 | </tr> |
| 397 | <tr> |
399 | <tr> |
| … | |
… | |
| 766 | |
768 | |
| 767 | </body> |
769 | </body> |
| 768 | </subsection> |
770 | </subsection> |
| 769 | </section> |
771 | </section> |
| 770 | <section> |
772 | <section> |
| 771 | <title>Mounting</title> |
773 | <title>Mounting</title> |
| 772 | <body> |
774 | <body> |
| 773 | |
775 | |
| 774 | <p> |
776 | <p> |
| 775 | Now that your partitions are initialized and are housing a filesystem, it is |
777 | Now that your partitions are initialized and are housing a filesystem, it is |
| 776 | time to mount those partitions. Use the <c>mount</c> command. Don't forget to |
778 | time to mount those partitions. Use the <c>mount</c> command. Don't forget to |
| 777 | create the necessary mount directories for every partition you created. As an |
779 | create the necessary mount directories for every partition you created. As an |
| 778 | example we mount the root and boot partition: |
780 | example we mount the root and boot partition: |
| 779 | </p> |
781 | </p> |
| 780 | |
782 | |
|
|
783 | <warn> |
|
|
784 | Due to a bug in the e2fsprogs package, you need to explicitly use |
|
|
785 | the <c>mount -t ext3</c> option if you are using an ext3 filesystem. |
|
|
786 | </warn> |
|
|
787 | |
| 781 | <pre caption="Mounting partitions"> |
788 | <pre caption="Mounting partitions"> |
| 782 | # <i>mount /dev/sda2 /mnt/gentoo</i> |
789 | # <i>mount /dev/sda2 /mnt/gentoo</i> |
|
|
790 | <comment>(For ext3 partitions:)</comment> |
|
|
791 | # <i>mount -t ext3 /dev/sda2 /mnt/gentoo</i> |
| 783 | </pre> |
792 | </pre> |
| 784 | |
793 | |
| 785 | <note> |
794 | <note> |
| 786 | If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
795 | If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
| 787 | change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This |
796 | change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This |
| 788 | also holds for <path>/var/tmp</path>. |
797 | also holds for <path>/var/tmp</path>. |
| 789 | </note> |
798 | </note> |
| 790 | |
799 | |
| 791 | <p> |
800 | <p> |
| 792 | We will also have to mount the proc filesystem (a virtual interface with the |
801 | We will also have to mount the proc filesystem (a virtual interface with the |
| 793 | kernel) on <path>/proc</path>. But first we will need to place our files on the partitions. |
802 | kernel) on <path>/proc</path>. But first we will need to place our files on the partitions. |
| 794 | </p> |
803 | </p> |
| 795 | |
804 | |
| 796 | <p> |
805 | <p> |
| 797 | Continue with <uri link="?part=1&chap=5">Installing the Gentoo |
806 | Continue with <uri link="?part=1&chap=5">Installing the Gentoo |