| … | |
… | |
| 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.1 2004/04/02 08:14:45 swift Exp $ --> |
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 $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
|
|
10 | |
|
|
11 | <version>1.9</version> |
|
|
12 | <date>August 30, 2004</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 | |
| … | |
… | |
| 110 | partitions or volumes have the following advantages: |
114 | partitions or volumes have the following advantages: |
| 111 | </p> |
115 | </p> |
| 112 | |
116 | |
| 113 | <ul> |
117 | <ul> |
| 114 | <li> |
118 | <li> |
| 115 | You can choose the most performant filesystem for each partition or volume |
119 | You can choose the best performing filesystem for each partition or volume |
| 116 | </li> |
120 | </li> |
| 117 | <li> |
121 | <li> |
| 118 | Your entire system cannot run out of free space if one defunct tool is |
122 | Your entire system cannot run out of free space if one defunct tool is |
| 119 | continuously writing files to a partition or volume |
123 | continuously writing files to a partition or volume |
| 120 | </li> |
124 | </li> |
| … | |
… | |
| 136 | </p> |
140 | </p> |
| 137 | |
141 | |
| 138 | </body> |
142 | </body> |
| 139 | </subsection> |
143 | </subsection> |
| 140 | </section> |
144 | </section> |
| 141 | <section> |
145 | <section id="fdisk"> |
| 142 | <title>Using fdisk on Alpha to Partition your Disk</title> |
146 | <title>Using fdisk on Alpha to Partition your Disk</title> |
| 143 | <subsection> |
147 | <subsection> |
| 144 | <body> |
148 | <body> |
| 145 | |
149 | |
| 146 | <p> |
150 | <p> |
| … | |
… | |
| 152 | <tr> |
156 | <tr> |
| 153 | <th>Slice</th> |
157 | <th>Slice</th> |
| 154 | <th>Description</th> |
158 | <th>Description</th> |
| 155 | </tr> |
159 | </tr> |
| 156 | <tr> |
160 | <tr> |
| 157 | <ti><path>/dev/sdaa</path></ti> |
161 | <ti><path>/dev/sda1</path></ti> |
| 158 | <ti>Swap slice</ti> |
162 | <ti>Swap slice</ti> |
| 159 | </tr> |
163 | </tr> |
| 160 | <tr> |
164 | <tr> |
| 161 | <ti><path>/dev/sdab</path></ti> |
165 | <ti><path>/dev/sda2</path></ti> |
| 162 | <ti>Root slice</ti> |
166 | <ti>Root slice</ti> |
| 163 | </tr> |
167 | </tr> |
| 164 | <tr> |
168 | <tr> |
| 165 | <ti><path>/dev/sdac</path></ti> |
169 | <ti><path>/dev/sda3</path></ti> |
| 166 | <ti>Full disk (required)</ti> |
170 | <ti>Full disk (required)</ti> |
| 167 | </tr> |
171 | </tr> |
| 168 | </table> |
172 | </table> |
| 169 | |
173 | |
| 170 | <p> |
174 | <p> |
| 171 | Change your slice layout according to your own will. |
175 | Change your slice layout according to your own preference. |
| 172 | </p> |
176 | </p> |
| 173 | |
177 | |
| 174 | |
178 | |
| 175 | </body> |
179 | </body> |
| 176 | </subsection> |
180 | </subsection> |
| … | |
… | |
| 181 | <p> |
185 | <p> |
| 182 | To figure out what disks you have running, use the following commands: |
186 | To figure out what disks you have running, use the following commands: |
| 183 | </p> |
187 | </p> |
| 184 | |
188 | |
| 185 | <pre caption="Identifying available disks"> |
189 | <pre caption="Identifying available disks"> |
| 186 | <comment>(For IDE disks)</comment> # <i>dmesg | grep 'drive$'</i> |
190 | # <i>dmesg | grep 'drive$'</i> <comment>(For IDE disks)</comment> |
| 187 | <comment>(For SCSI disks)</comment> # <i>dmesg | grep 'scsi'</i> |
191 | # <i>dmesg | grep 'scsi'</i> <comment>(For SCSI disks)</comment> |
| 188 | </pre> |
192 | </pre> |
| 189 | |
193 | |
| 190 | <p> |
194 | <p> |
| 191 | From this output you should be able to see what disks were detected and their |
195 | From this output you should be able to see what disks were detected and their |
| 192 | respective <path>/dev</path> entry. In the following parts we assume that the |
196 | respective <path>/dev</path> entry. In the following parts we assume that the |
| … | |
… | |
| 204 | </body> |
208 | </body> |
| 205 | </subsection> |
209 | </subsection> |
| 206 | <subsection> |
210 | <subsection> |
| 207 | <title>Deleting All Slices</title> |
211 | <title>Deleting All Slices</title> |
| 208 | <body> |
212 | <body> |
|
|
213 | |
|
|
214 | <p> |
|
|
215 | If your hard drive is completely blank, then you'll have to first create |
|
|
216 | a BSD disklabel. |
|
|
217 | </p> |
|
|
218 | |
|
|
219 | <pre caption="Creating BSD disklabel"> |
|
|
220 | Command (m for help): <i>b</i> |
|
|
221 | /dev/sda contains no disklabel. |
|
|
222 | Do you want to create a disklabel? (y/n) <i>y</i> |
|
|
223 | <comment>A bunch of drive-specific info will show here</comment> |
|
|
224 | 3 partitions: |
|
|
225 | # start end size fstype [fsize bsize cpg] |
|
|
226 | c: 1 5290* 5289* unused 0 0 |
|
|
227 | </pre> |
| 209 | |
228 | |
| 210 | <p> |
229 | <p> |
| 211 | We start with deleting all slices <e>except</e> the 'c'-slice. The following |
230 | We start with deleting all slices <e>except</e> the 'c'-slice. The following |
| 212 | shows how to delete a slice (in the example we use 'a'). Repeat the process to |
231 | shows how to delete a slice (in the example we use 'a'). Repeat the process to |
| 213 | delete all other slices (again, except the 'c'-slice). |
232 | delete all other slices (again, except the 'c'-slice). |
| … | |
… | |
| 260 | </p> |
279 | </p> |
| 261 | |
280 | |
| 262 | <p> |
281 | <p> |
| 263 | We will create a swap slice starting at the third cylinder, with a total |
282 | We will create a swap slice starting at the third cylinder, with a total |
| 264 | size of 1 Gbyte. Use <c>n</c> to create a new slice. After creating the slice, |
283 | size of 1 Gbyte. Use <c>n</c> to create a new slice. After creating the slice, |
| 265 | we will change its type to <c>1</c>, meaning <e>swap</e>. |
284 | we will change its type to <c>1</c> (one), meaning <e>swap</e>. |
| 266 | </p> |
285 | </p> |
| 267 | |
286 | |
| 268 | <pre caption="Creating the swap slice"> |
287 | <pre caption="Creating the swap slice"> |
| 269 | BSD disklabel command (m for help): <i>n</i> |
288 | BSD disklabel command (m for help): <i>n</i> |
| 270 | Partition (a-p): <i>a</i> |
289 | Partition (a-p): <i>a</i> |
| … | |
… | |
| 412 | as the creation of large filesystems, the use of many small files, very large |
431 | as the creation of large filesystems, the use of many small files, very large |
| 413 | files and directories containing tens of thousands of files. |
432 | files and directories containing tens of thousands of files. |
| 414 | </p> |
433 | </p> |
| 415 | |
434 | |
| 416 | <p> |
435 | <p> |
| 417 | <b>XFS</b> is a filesystem with metadata journaling that is fully supported |
436 | <b>XFS</b> is a filesystem with metadata journaling which comes with a robust |
| 418 | under Gentoo Linux's xfs-sources kernel. It comes with a robust feature-set and |
|
|
| 419 | is optimized for scalability. We only recommend using this filesystem on Linux |
437 | feature-set and is optimized for scalability. We only recommend using this |
| 420 | systems with high-end SCSI and/or fibre channel storage and a uninterruptible |
438 | filesystem on Linux systems with high-end SCSI and/or fibre channel storage and |
| 421 | power supply. Because XFS aggressively caches in-transit data in RAM, improperly |
439 | an uninterruptible power supply. Because XFS aggressively caches in-transit data |
| 422 | designed programs (those that don't take proper precautions when writing files |
440 | in RAM, improperly designed programs (those that don't take proper precautions |
| 423 | to disk and there are quite a few of them) can lose a good deal of data if the |
441 | when writing files to disk and there are quite a few of them) can lose a good |
| 424 | system goes down unexpectedly. |
442 | deal of data if the system goes down unexpectedly. |
| 425 | </p> |
443 | </p> |
| 426 | |
444 | |
| 427 | <p> |
445 | <p> |
| 428 | <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently |
446 | <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently |
| 429 | become production-ready and there hasn't been a sufficient track record to |
447 | become production-ready and there hasn't been a sufficient track record to |
| … | |
… | |
| 467 | <ti><c>mkfs.jfs</c></ti> |
485 | <ti><c>mkfs.jfs</c></ti> |
| 468 | </tr> |
486 | </tr> |
| 469 | </table> |
487 | </table> |
| 470 | |
488 | |
| 471 | <p> |
489 | <p> |
| 472 | For instance, to have the root partition (<path>/dev/sdab</path> in our example) |
490 | For instance, to have the root partition (<path>/dev/sda2</path> in our example) |
| 473 | in ext3, you would use: |
491 | in ext3, you would use: |
| 474 | </p> |
492 | </p> |
| 475 | |
493 | |
| 476 | <pre caption="Applying a filesystem on a partition"> |
494 | <pre caption="Applying a filesystem on a partition"> |
| 477 | # <i>mke2fs -j /dev/sdab</i> |
495 | # <i>mke2fs -j /dev/sda2</i> |
| 478 | </pre> |
496 | </pre> |
| 479 | |
497 | |
| 480 | <p> |
498 | <p> |
| 481 | Now create the filesystems on your newly created partitions (or logical |
499 | Now create the filesystems on your newly created partitions (or logical |
| 482 | volumes). |
500 | volumes). |
| … | |
… | |
| 491 | <p> |
509 | <p> |
| 492 | <c>mkswap</c> is the command that is used to initialize swap partitions: |
510 | <c>mkswap</c> is the command that is used to initialize swap partitions: |
| 493 | </p> |
511 | </p> |
| 494 | |
512 | |
| 495 | <pre caption="Creating a Swap signature"> |
513 | <pre caption="Creating a Swap signature"> |
| 496 | # <i>mkswap /dev/sdaa</i> |
514 | # <i>mkswap /dev/sda1</i> |
| 497 | </pre> |
515 | </pre> |
| 498 | |
516 | |
| 499 | <p> |
517 | <p> |
| 500 | To activate the swap partition, use <c>swapon</c>: |
518 | To activate the swap partition, use <c>swapon</c>: |
| 501 | </p> |
519 | </p> |
| 502 | |
520 | |
| 503 | <pre caption="Activating the swap partition"> |
521 | <pre caption="Activating the swap partition"> |
| 504 | # <i>swapon /dev/sdaa</i> |
522 | # <i>swapon /dev/sda1</i> |
| 505 | </pre> |
523 | </pre> |
| 506 | |
524 | |
| 507 | <p> |
525 | <p> |
| 508 | Create and activate the swap now. |
526 | Create and activate the swap now. |
| 509 | </p> |
527 | </p> |
| … | |
… | |
| 521 | create the necessary mount directories for every partition you created. As an |
539 | create the necessary mount directories for every partition you created. As an |
| 522 | example we mount the root and boot partition: |
540 | example we mount the root and boot partition: |
| 523 | </p> |
541 | </p> |
| 524 | |
542 | |
| 525 | <pre caption="Mounting partitions"> |
543 | <pre caption="Mounting partitions"> |
| 526 | # <i>mount /dev/sdab /mnt/gentoo</i> |
544 | # <i>mount /dev/sda2 /mnt/gentoo</i> |
| 527 | </pre> |
545 | </pre> |
| 528 | |
546 | |
| 529 | <note> |
547 | <note> |
| 530 | If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
548 | If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
| 531 | change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This |
549 | change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This |
| 532 | also holds for <path>/var/tmp</path>. |
550 | also holds for <path>/var/tmp</path>. |
| 533 | </note> |
551 | </note> |
| 534 | |
552 | |
| 535 | <p> |
553 | <p> |
| 536 | We also need to mount the proc filesystem (a virtual interface with the kernel) |
554 | We will also have to mount the proc filesystem (a virtual interface with the |
| 537 | on <path>/proc</path>. We first create the <path>/mnt/gentoo/proc</path> |
555 | kernel) on <path>/proc</path>. But first we will need to place our files on the partitions. |
| 538 | mountpoint and then mount the filesystem: |
|
|
| 539 | </p> |
|
|
| 540 | |
|
|
| 541 | <pre caption="Creating the /mnt/gentoo/proc mountpoint"> |
|
|
| 542 | # <i>mkdir /mnt/gentoo/proc</i> |
|
|
| 543 | # <i>mount -t proc none /mnt/gentoo/proc</i> |
|
|
| 544 | </pre> |
|
|
| 545 | |
|
|
| 546 | <p> |
556 | </p> |
|
|
557 | |
|
|
558 | <p> |
| 547 | Now continue with <uri link="?part=1&chap=5">Installing the Gentoo |
559 | Continue with <uri link="?part=1&chap=5">Installing the Gentoo |
| 548 | Installation Files</uri>. |
560 | Installation Files</uri>. |
| 549 | </p> |
561 | </p> |
| 550 | |
562 | |
| 551 | </body> |
563 | </body> |
| 552 | </section> |
564 | </section> |