/[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.15
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.15 2005/01/02 12:06:05 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.9</version> 11<version>1.10</version>
12<date>August 30, 2004</date> 12<date>2004-12-30</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>
141 141
142</body> 142</body>
143</subsection> 143</subsection>
144</section> 144</section>
145<section id="fdisk"> 145<section id="fdisk">
146<title>Using fdisk on Alpha to Partition your Disk</title> 146<title>Using fdisk to Partition your Disk (SRM only)</title>
147<subsection> 147<subsection>
148<body> 148<body>
149 149
150<p> 150<p>
151The following parts explain how to create the example slice layout described 151The following parts explain how to create the example slice layout described
214<p> 214<p>
215If your hard drive is completely blank, then you'll have to first create 215If your hard drive is completely blank, then you'll have to first create
216a BSD disklabel. 216a BSD disklabel.
217</p> 217</p>
218 218
219<pre caption="Creating BSD disklabel"> 219<pre caption="Creating a BSD disklabel">
220Command (m for help): <i>b</i> 220Command (m for help): <i>b</i>
221/dev/sda contains no disklabel. 221/dev/sda contains no disklabel.
222Do you want to create a disklabel? (y/n) <i>y</i> 222Do you want to create a disklabel? (y/n) <i>y</i>
223<comment>A bunch of drive-specific info will show here</comment> 223<comment>A bunch of drive-specific info will show here</comment>
2243 partitions: 2243 partitions:
225# start end size fstype [fsize bsize cpg] 225# start end size fstype [fsize bsize cpg]
226 c: 1 5290* 5289* unused 0 0 226 c: 1 5290* 5289* unused 0 0
227</pre> 227</pre>
228 228
229<p> 229<p>
230We 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
231shows 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
232delete 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).
233</p> 234</p>
234 235
235<p> 236<p>
236Use <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.
237</p> 238</p>
278first 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.
279</p> 280</p>
280 281
281<p> 282<p>
282We 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
283size 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,
284we will change its type to <c>1</c> (one), meaning <e>swap</e>. 285we will change its type to <c>1</c> (one), meaning <e>swap</e>.
285</p> 286</p>
286 287
287<pre caption="Creating the swap slice"> 288<pre caption="Creating the swap slice">
288BSD disklabel command (m for help): <i>n</i> 289BSD disklabel command (m for help): <i>n</i>
370Command (m for help): <i>w</i> 371Command (m for help): <i>w</i>
371</pre> 372</pre>
372 373
373<p> 374<p>
374Now 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
375link="#filesystems">Creating Filesystems</uri>. 613link="#filesystems">Creating Filesystems</uri>.
376</p> 614</p>
377 615
378</body> 616</body>
379</subsection> 617</subsection>

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

  ViewVC Help
Powered by ViewVC 1.1.20