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

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

  ViewVC Help
Powered by ViewVC 1.1.20