/[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.13
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.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.13 2004/12/31 02:42:21 vapier Exp $ -->
8 8
9<sections> 9<sections>
10
11<version>1.10</version>
12<date>2004-12-30</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
137 141
138</body> 142</body>
139</subsection> 143</subsection>
140</section> 144</section>
141<section id="fdisk"> 145<section id="fdisk">
142<title>Using fdisk on Alpha to Partition your Disk</title> 146<title>Using fdisk to Partition your Disk (SRM only)</title>
143<subsection> 147<subsection>
144<body> 148<body>
145 149
146<p> 150<p>
147The following parts explain how to create the example slice layout described 151The following parts explain how to create the example slice layout described
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>
171Change your slice layout according to your own will. 175Change 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>
182To figure out what disks you have running, use the following commands: 186To 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>
191From this output you should be able to see what disks were detected and their 195From 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 196respective <path>/dev</path> entry. In the following parts we assume that the
206<subsection> 210<subsection>
207<title>Deleting All Slices</title> 211<title>Deleting All Slices</title>
208<body> 212<body>
209 213
210<p> 214<p>
215If your hard drive is completely blank, then you'll have to first create
216a BSD disklabel.
217</p>
218
219<pre caption="Creating a BSD disklabel">
220Command (m for help): <i>b</i>
221/dev/sda contains no disklabel.
222Do you want to create a disklabel? (y/n) <i>y</i>
223<comment>A bunch of drive-specific info will show here</comment>
2243 partitions:
225# start end size fstype [fsize bsize cpg]
226 c: 1 5290* 5289* unused 0 0
227</pre>
228
229<p>
211We start with deleting all slices <e>except</e> the 'c'-slice. The following 230We 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 231for using BSD disklabels). The following shows how to delete a slice (in
213delete all other slices (again, except the 'c'-slice). 232the example we use 'a'). Repeat the process to delete all other slices
233(again, except the 'c'-slice).
214</p> 234</p>
215 235
216<p> 236<p>
217Use <c>p</c> to view all existing slices. <c>d</c> is used to delete a slice. 237Use <c>p</c> to view all existing slices. <c>d</c> is used to delete a slice.
218</p> 238</p>
260</p> 280</p>
261 281
262<p> 282<p>
263We will create a swap slice starting at the third cylinder, with a total 283We 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, 284size of 1 Gbyte. 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>. 285we will change its type to <c>1</c> (one), meaning <e>swap</e>.
266</p> 286</p>
267 287
268<pre caption="Creating the swap slice"> 288<pre caption="Creating the swap slice">
269BSD disklabel command (m for help): <i>n</i> 289BSD disklabel command (m for help): <i>n</i>
270Partition (a-p): <i>a</i> 290Partition (a-p): <i>a</i>
351Command (m for help): <i>w</i> 371Command (m for help): <i>w</i>
352</pre> 372</pre>
353 373
354<p> 374<p>
355Now that your slices are created, you can now continue with <uri 375Now that your slices are created, you can now continue with <uri
376link="#filesystems">Creating Filesystems</uri>.
377</p>
378
379</body>
380</subsection>
381</section>
382<section id="fdisk">
383<title>Using fdisk to Partition your Disk (ARC/AlphaBIOS only)</title>
384<subsection>
385<body>
386
387<p>
388The following parts explain how to partition the disk with a layout
389similar to the one described previously, namely:
390</p>
391
392<table>
393<tr>
394 <th>Partition</th>
395 <th>Description</th>
396</tr>
397<tr>
398 <ti><path>/dev/sda1</path></ti>
399 <ti>Boot partition</ti>
400</tr>
401<tr>
402 <ti><path>/dev/sda2</path></ti>
403 <ti>Swap partition</ti>
404</tr>
405<tr>
406 <ti><path>/dev/sda3</path></ti>
407 <ti>Root partition</ti>
408</tr>
409</table>
410
411<p>
412Change your partition layout according to your own preference.
413</p>
414
415</body>
416</subsection>
417<subsection>
418<title>Identifying Available Disks</title>
419<body>
420
421<p>
422To figure out what disks you have running, use the following commands:
423</p>
424
425<pre caption="Identifying available disks">
426# <i>dmesg | grep 'drive$'</i> <comment>(For IDE disks)</comment>
427# <i>dmesg | grep 'scsi'</i> <comment>(For SCSI disks)</comment>
428</pre>
429
430<p>
431From this output you should be able to see what disks were detected and their
432respective <path>/dev</path> entry. In the following parts we assume that the
433disk is a SCSI disk on <path>/dev/sda</path>.
434</p>
435
436<p>
437Now fire up <c>fdisk</c>:
438</p>
439
440<pre caption="Starting fdisk">
441# <i>fdisk /dev/sda</i>
442</pre>
443
444</body>
445</subsection>
446<subsection>
447<title>Deleting All Partitions</title>
448<body>
449
450<p>
451If your hard drive is completely blank, then you'll have to first create
452a DOS disklabel.
453</p>
454
455<pre caption="Creating a DOS disklabel">
456Command (m for help): <i>o</i>
457Building a new DOS disklabel.
458</pre>
459
460<p>
461We start with deleting all partitions. The following shows how to delete
462a partition (in the example we use '1'). Repeat the process to delete all
463other partitions.
464</p>
465
466<p>
467Use <c>p</c> to view all existing paritions. <c>d</c> is used to delete a partition.
468</p>
469
470<pre caption="Deleting a partition">
471command (m for help): <i>p</i>
472
473Disk /dev/sda: 9150 MB, 9150996480 bytes
47464 heads, 32 sectors/track, 8727 cylinders
475Units = cylinders of 2048 * 512 = 1048576 bytes
476
477 Device Boot Start End Blocks Id System
478/dev/sda1 1 478 489456 83 Linux
479/dev/sda2 479 8727 8446976 5 Extended
480/dev/sda5 479 1433 977904 83 Linux Swap
481/dev/sda6 1434 8727 7469040 83 Linux
482
483command (m for help): <i>d</i>
484Partition number (1-6): <i>1</i>
485</pre>
486
487
488</body>
489</subsection>
490<subsection>
491<title>Creating the Boot Partition</title>
492<body>
493
494<p>
495On Alpha systems which use MILO to boot, we have to create a small vfat
496boot partition.
497</p>
498
499<pre caption="Creating the boot partition">
500Command (m for help): <i>n</i>
501Command action
502 e extended
503 p primary partition (1-4)
504<i>p</i>
505Partition number (1-4): <i>1</i>
506First cylinder (1-8727, default 1): <i>1</i>
507Last cylinder or +size or +sizeM or +sizeK (1-8727, default 8727): <i>+16M</i>
508
509Command (m for help): <i>t</i>
510Selected partition 1
511Hex code (type L to list codes): <i>6</i>
512Changed system type of partition 1 to 6 (FAT16)
513</pre>
514
515</body>
516</subsection>
517<subsection>
518<title>Creating the Swap Partition</title>
519<body>
520
521<p>
522We will create a swap partition starting at the third cylinder, with a total
523size of 1 Gbyte. Use <c>n</c> to create a new partition.
524</p>
525
526<pre caption="Creating the swap partition">
527Command (m for help): <i>n</i>
528Command action
529 e extended
530 p primary partition (1-4)
531<i>p</i>
532Partition number (1-4): <i>2</i>
533First cylinder (17-8727, default 17): <i>17</i>
534Last cylinder or +size or +sizeM or +sizeK (17-8727, default 8727): <i>+1000M</i>
535
536Command (m for help): <i>t</i>
537Partition number (1-4): <i>1</i>
538Hex code (type L to list codes): <i>82</i>
539Changed system type of partition 2 to 82 (Linux swap)
540</pre>
541
542<p>
543After these steps you should see a layout similar to the following:
544</p>
545
546<pre caption="Partition listing after creating a swap partition">
547Command (m for help): <i>p</i>
548
549Disk /dev/sda: 9150 MB, 9150996480 bytes
55064 heads, 32 sectors/track, 8727 cylinders
551Units = cylinders of 2048 * 512 = 1048576 bytes
552
553 Device Boot Start End Blocks Id System
554/dev/sda1 1 16 16368 6 FAT16
555/dev/sda2 17 971 977920 82 Linux swap
556</pre>
557
558</body>
559</subsection>
560<subsection>
561<title>Creating the Root Partition</title>
562<body>
563
564<p>
565We will now create the root partition. Again, just use the <c>n</c> command.
566</p>
567
568<pre caption="Creating the root partition">
569Command (m for help): <i>n</i>
570Command action
571 e extended
572 p primary partition (1-4)
573<i>p</i>
574Partition number (1-4): <i>3</i>
575First cylinder (972-8727, default 972): <i>972</i>
576Last cylinder or +size or +sizeM or +sizeK (972-8727, default 8727): <i>8727</i>
577</pre>
578
579<p>
580After these steps you should see a layout similar to the following:
581</p>
582
583<pre caption="Partition listing after creating the root partition">
584Command (m for help): <i>p</i>
585
586Disk /dev/sda: 9150 MB, 9150996480 bytes
58764 heads, 32 sectors/track, 8727 cylinders
588Units = cylinders of 2048 * 512 = 1048576 bytes
589
590 Device Boot Start End Blocks Id System
591/dev/sda1 1 16 16368 6 FAT16
592/dev/sda2 17 971 977920 82 Linux swap
593/dev/sda3 972 8727 7942144 83 Linux
594</pre>
595
596</body>
597</subsection>
598<subsection>
599<title>Save the Partition Layout and Exit</title>
600<body>
601
602<p>
603Save <c>fdisk</c> by typing <c>w</c>. This will also save your partition layout.
604</p>
605
606<pre caption="Save and exit fdisk">
607Command (m for help): <i>w</i>
608</pre>
609
610<p>
611Now that your partitions are created, you can now continue with <uri
356link="#filesystems">Creating Filesystems</uri>. 612link="#filesystems">Creating Filesystems</uri>.
357</p> 613</p>
358 614
359</body> 615</body>
360</subsection> 616</subsection>
466 <ti><c>mkfs.jfs</c></ti> 722 <ti><c>mkfs.jfs</c></ti>
467</tr> 723</tr>
468</table> 724</table>
469 725
470<p> 726<p>
471For instance, to have the root partition (<path>/dev/sdab</path> in our example) 727For instance, to have the root partition (<path>/dev/sda2</path> in our example)
472in ext3, you would use: 728in ext3, you would use:
473</p> 729</p>
474 730
475<pre caption="Applying a filesystem on a partition"> 731<pre caption="Applying a filesystem on a partition">
476# <i>mke2fs -j /dev/sdab</i> 732# <i>mke2fs -j /dev/sda2</i>
477</pre> 733</pre>
478 734
479<p> 735<p>
480Now create the filesystems on your newly created partitions (or logical 736Now create the filesystems on your newly created partitions (or logical
481volumes). 737volumes).
490<p> 746<p>
491<c>mkswap</c> is the command that is used to initialize swap partitions: 747<c>mkswap</c> is the command that is used to initialize swap partitions:
492</p> 748</p>
493 749
494<pre caption="Creating a Swap signature"> 750<pre caption="Creating a Swap signature">
495# <i>mkswap /dev/sdaa</i> 751# <i>mkswap /dev/sda1</i>
496</pre> 752</pre>
497 753
498<p> 754<p>
499To activate the swap partition, use <c>swapon</c>: 755To activate the swap partition, use <c>swapon</c>:
500</p> 756</p>
501 757
502<pre caption="Activating the swap partition"> 758<pre caption="Activating the swap partition">
503# <i>swapon /dev/sdaa</i> 759# <i>swapon /dev/sda1</i>
504</pre> 760</pre>
505 761
506<p> 762<p>
507Create and activate the swap now. 763Create and activate the swap now.
508</p> 764</p>
520create the necessary mount directories for every partition you created. As an 776create the necessary mount directories for every partition you created. As an
521example we mount the root and boot partition: 777example we mount the root and boot partition:
522</p> 778</p>
523 779
524<pre caption="Mounting partitions"> 780<pre caption="Mounting partitions">
525# <i>mount /dev/sdab /mnt/gentoo</i> 781# <i>mount /dev/sda2 /mnt/gentoo</i>
526</pre> 782</pre>
527 783
528<note> 784<note>
529If you want your <path>/tmp</path> to reside on a separate partition, be sure to 785If 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 786change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
531also holds for <path>/var/tmp</path>. 787also holds for <path>/var/tmp</path>.
532</note> 788</note>
533 789
534<p> 790<p>
535We also need to mount the proc filesystem (a virtual interface with the kernel) 791We 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> 792kernel) 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> 793</p>
794
795<p>
546Now continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo 796Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
547Installation Files</uri>. 797Installation Files</uri>.
548</p> 798</p>
549 799
550</body> 800</body>
551</section> 801</section>

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

  ViewVC Help
Powered by ViewVC 1.1.20