/[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.16
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.16 2005/02/20 12:38:06 swift Exp $ -->
8 8
9<sections> 9<sections>
10
11<version>1.11</version>
12<date>2005-02-20</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>
259first cylinder cannot be used as the <c>aboot</c> image will be placed there. 279first cylinder cannot be used as the <c>aboot</c> image will be placed there.
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 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>. 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 partitions. <c>d</c> is used to delete a
468partition.
469</p>
470
471<pre caption="Deleting a partition">
472command (m for help): <i>p</i>
473
474Disk /dev/sda: 9150 MB, 9150996480 bytes
47564 heads, 32 sectors/track, 8727 cylinders
476Units = cylinders of 2048 * 512 = 1048576 bytes
477
478 Device Boot Start End Blocks Id System
479/dev/sda1 1 478 489456 83 Linux
480/dev/sda2 479 8727 8446976 5 Extended
481/dev/sda5 479 1433 977904 83 Linux Swap
482/dev/sda6 1434 8727 7469040 83 Linux
483
484command (m for help): <i>d</i>
485Partition number (1-6): <i>1</i>
486</pre>
487
488
489</body>
490</subsection>
491<subsection>
492<title>Creating the Boot Partition</title>
493<body>
494
495<p>
496On Alpha systems which use MILO to boot, we have to create a small vfat
497boot partition.
498</p>
499
500<pre caption="Creating the boot partition">
501Command (m for help): <i>n</i>
502Command action
503 e extended
504 p primary partition (1-4)
505<i>p</i>
506Partition number (1-4): <i>1</i>
507First cylinder (1-8727, default 1): <i>1</i>
508Last cylinder or +size or +sizeM or +sizeK (1-8727, default 8727): <i>+16M</i>
509
510Command (m for help): <i>t</i>
511Selected partition 1
512Hex code (type L to list codes): <i>6</i>
513Changed system type of partition 1 to 6 (FAT16)
514</pre>
515
516</body>
517</subsection>
518<subsection>
519<title>Creating the Swap Partition</title>
520<body>
521
522<p>
523We will create a swap partition starting at the third cylinder, with a total
524size of 1 GB. Use <c>n</c> to create a new partition.
525</p>
526
527<pre caption="Creating the swap partition">
528Command (m for help): <i>n</i>
529Command action
530 e extended
531 p primary partition (1-4)
532<i>p</i>
533Partition number (1-4): <i>2</i>
534First cylinder (17-8727, default 17): <i>17</i>
535Last cylinder or +size or +sizeM or +sizeK (17-8727, default 8727): <i>+1000M</i>
536
537Command (m for help): <i>t</i>
538Partition number (1-4): <i>1</i>
539Hex code (type L to list codes): <i>82</i>
540Changed system type of partition 2 to 82 (Linux swap)
541</pre>
542
543<p>
544After these steps you should see a layout similar to the following:
545</p>
546
547<pre caption="Partition listing after creating a swap partition">
548Command (m for help): <i>p</i>
549
550Disk /dev/sda: 9150 MB, 9150996480 bytes
55164 heads, 32 sectors/track, 8727 cylinders
552Units = cylinders of 2048 * 512 = 1048576 bytes
553
554 Device Boot Start End Blocks Id System
555/dev/sda1 1 16 16368 6 FAT16
556/dev/sda2 17 971 977920 82 Linux swap
557</pre>
558
559</body>
560</subsection>
561<subsection>
562<title>Creating the Root Partition</title>
563<body>
564
565<p>
566We will now create the root partition. Again, just use the <c>n</c> command.
567</p>
568
569<pre caption="Creating the root partition">
570Command (m for help): <i>n</i>
571Command action
572 e extended
573 p primary partition (1-4)
574<i>p</i>
575Partition number (1-4): <i>3</i>
576First cylinder (972-8727, default 972): <i>972</i>
577Last cylinder or +size or +sizeM or +sizeK (972-8727, default 8727): <i>8727</i>
578</pre>
579
580<p>
581After these steps you should see a layout similar to the following:
582</p>
583
584<pre caption="Partition listing after creating the root partition">
585Command (m for help): <i>p</i>
586
587Disk /dev/sda: 9150 MB, 9150996480 bytes
58864 heads, 32 sectors/track, 8727 cylinders
589Units = cylinders of 2048 * 512 = 1048576 bytes
590
591 Device Boot Start End Blocks Id System
592/dev/sda1 1 16 16368 6 FAT16
593/dev/sda2 17 971 977920 82 Linux swap
594/dev/sda3 972 8727 7942144 83 Linux
595</pre>
596
597</body>
598</subsection>
599<subsection>
600<title>Save the Partition Layout and Exit</title>
601<body>
602
603<p>
604Save <c>fdisk</c> by typing <c>w</c>. This will also save your partition layout.
605</p>
606
607<pre caption="Save and exit fdisk">
608Command (m for help): <i>w</i>
609</pre>
610
611<p>
612Now that your partitions are created, you can now continue with <uri
356link="#filesystems">Creating Filesystems</uri>. 613link="#filesystems">Creating Filesystems</uri>.
357</p> 614</p>
358 615
359</body> 616</body>
360</subsection> 617</subsection>
466 <ti><c>mkfs.jfs</c></ti> 723 <ti><c>mkfs.jfs</c></ti>
467</tr> 724</tr>
468</table> 725</table>
469 726
470<p> 727<p>
471For instance, to have the root partition (<path>/dev/sdab</path> in our example) 728For instance, to have the root partition (<path>/dev/sda2</path> in our example)
472in ext3, you would use: 729in ext3, you would use:
473</p> 730</p>
474 731
475<pre caption="Applying a filesystem on a partition"> 732<pre caption="Applying a filesystem on a partition">
476# <i>mke2fs -j /dev/sdab</i> 733# <i>mke2fs -j /dev/sda2</i>
477</pre> 734</pre>
478 735
479<p> 736<p>
480Now create the filesystems on your newly created partitions (or logical 737Now create the filesystems on your newly created partitions (or logical
481volumes). 738volumes).
490<p> 747<p>
491<c>mkswap</c> is the command that is used to initialize swap partitions: 748<c>mkswap</c> is the command that is used to initialize swap partitions:
492</p> 749</p>
493 750
494<pre caption="Creating a Swap signature"> 751<pre caption="Creating a Swap signature">
495# <i>mkswap /dev/sdaa</i> 752# <i>mkswap /dev/sda1</i>
496</pre> 753</pre>
497 754
498<p> 755<p>
499To activate the swap partition, use <c>swapon</c>: 756To activate the swap partition, use <c>swapon</c>:
500</p> 757</p>
501 758
502<pre caption="Activating the swap partition"> 759<pre caption="Activating the swap partition">
503# <i>swapon /dev/sdaa</i> 760# <i>swapon /dev/sda1</i>
504</pre> 761</pre>
505 762
506<p> 763<p>
507Create and activate the swap now. 764Create and activate the swap with the commands mentioned above.
508</p> 765</p>
509 766
510</body> 767</body>
511</subsection> 768</subsection>
512</section> 769</section>
520create the necessary mount directories for every partition you created. As an 777create the necessary mount directories for every partition you created. As an
521example we mount the root and boot partition: 778example we mount the root and boot partition:
522</p> 779</p>
523 780
524<pre caption="Mounting partitions"> 781<pre caption="Mounting partitions">
525# <i>mount /dev/sdab /mnt/gentoo</i> 782# <i>mount /dev/sda2 /mnt/gentoo</i>
526</pre> 783</pre>
527 784
528<note> 785<note>
529If you want your <path>/tmp</path> to reside on a separate partition, be sure to 786If 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 787change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
531also holds for <path>/var/tmp</path>. 788also holds for <path>/var/tmp</path>.
532</note> 789</note>
533 790
534<p> 791<p>
535We also need to mount the proc filesystem (a virtual interface with the kernel) 792We 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> 793kernel) 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> 794</p>
795
796<p>
546Now continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo 797Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
547Installation Files</uri>. 798Installation Files</uri>.
548</p> 799</p>
549 800
550</body> 801</body>
551</section> 802</section>

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

  ViewVC Help
Powered by ViewVC 1.1.20