/[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.11 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.11 2004/11/15 12:47:47 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.9</version> 11<version>2.00</version>
12<date>August 30, 2004</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>
86 86
87 87
88<p> 88<p>
89If 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
90many partitions (or volumes) you need, read on. Otherwise continue now with 90many 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>
92or <uri link="#fdisk_ARC">Using fdisk to Partition your Disk (ARC/AlphaBIOS
93only)</uri>.
92</p> 94</p>
93 95
94</body> 96</body>
95</subsection> 97</subsection>
96<subsection> 98<subsection>
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 on Alpha to Partition your Disk</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>
151The following parts explain how to create the example slice layout described 153The following parts explain how to create the example slice layout described
214<p> 216<p>
215If your hard drive is completely blank, then you'll have to first create 217If your hard drive is completely blank, then you'll have to first create
216a BSD disklabel. 218a BSD disklabel.
217</p> 219</p>
218 220
219<pre caption="Creating BSD disklabel"> 221<pre caption="Creating a BSD disklabel">
220Command (m for help): <i>b</i> 222Command (m for help): <i>b</i>
221/dev/sda contains no disklabel. 223/dev/sda contains no disklabel.
222Do you want to create a disklabel? (y/n) <i>y</i> 224Do you want to create a disklabel? (y/n) <i>y</i>
223<comment>A bunch of drive-specific info will show here</comment> 225<comment>A bunch of drive-specific info will show here</comment>
2243 partitions: 2263 partitions:
225# start end size fstype [fsize bsize cpg] 227# start end size fstype [fsize bsize cpg]
226 c: 1 5290* 5289* unused 0 0 228 c: 1 5290* 5289* unused 0 0
227</pre> 229</pre>
228 230
229<p> 231<p>
230We 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
231shows 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
232delete 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).
233</p> 236</p>
234 237
235<p> 238<p>
236Use <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.
237</p> 240</p>
278first 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.
279</p> 282</p>
280 283
281<p> 284<p>
282We 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
283size 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,
284we will change its type to <c>1</c> (one), meaning <e>swap</e>. 287we will change its type to <c>1</c> (one), meaning <e>swap</e>.
285</p> 288</p>
286 289
287<pre caption="Creating the swap slice"> 290<pre caption="Creating the swap slice">
288BSD disklabel command (m for help): <i>n</i> 291BSD disklabel command (m for help): <i>n</i>
370Command (m for help): <i>w</i> 373Command (m for help): <i>w</i>
371</pre> 374</pre>
372 375
373<p> 376<p>
374Now 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
375link="#filesystems">Creating Filesystems</uri>. 615link="#filesystems">Creating Filesystems</uri>.
376</p> 616</p>
377 617
378</body> 618</body>
379</subsection> 619</subsection>
521<pre caption="Activating the swap partition"> 761<pre caption="Activating the swap partition">
522# <i>swapon /dev/sda1</i> 762# <i>swapon /dev/sda1</i>
523</pre> 763</pre>
524 764
525<p> 765<p>
526Create and activate the swap now. 766Create and activate the swap with the commands mentioned above.
527</p> 767</p>
528 768
529</body> 769</body>
530</subsection> 770</subsection>
531</section> 771</section>
538time 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
539create the necessary mount directories for every partition you created. As an 779create the necessary mount directories for every partition you created. As an
540example we mount the root and boot partition: 780example we mount the root and boot partition:
541</p> 781</p>
542 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
543<pre caption="Mounting partitions"> 788<pre caption="Mounting partitions">
544# <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>
545</pre> 792</pre>
546 793
547<note> 794<note>
548If 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
549change 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

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

  ViewVC Help
Powered by ViewVC 1.1.20