/[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.12 Revision 1.13
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
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.12 2004/11/20 22:23:30 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 10
11<version>1.9</version> 11<version>1.10</version>
12<date>2004-08-30</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>
18<body> 18<body>
19 19
20<p> 20<p>
21We'll take a good look at disk-oriented aspects of Gentoo Linux 21We'll take a good look at disk-oriented aspects of Gentoo Linux
22and Linux in general, including Linux filesystems, partitions and block devices. 22and Linux in general, including Linux filesystems, partitions and block devices.
23Then, once you're familiar with the ins and outs of disks and filesystems, 23Then, once you're familiar with the ins and outs of disks and filesystems,
24you'll be guided through the process of setting up partitions and filesystems 24you'll be guided through the process of setting up partitions and filesystems
25for your Gentoo Linux installation. 25for your Gentoo Linux installation.
26</p> 26</p>
27 27
131 Security can be enhanced by mounting some partitions or volumes read-only, 131 Security can be enhanced by mounting some partitions or volumes read-only,
132 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. 132 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
133</li> 133</li>
134</ul> 134</ul>
135 135
136<p> 136<p>
137However, multiple partitions have one big disadvantage: if not configured 137However, multiple partitions have one big disadvantage: if not configured
138properly, you might result in having a system with lots 138properly, you might result in having a system with lots
139of free space on one partition and none on another. 139of free space on one partition and none on another.
140</p> 140</p>
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
152previously, namely: 152previously, namely:
153</p> 153</p>
154 154
155<table> 155<table>
156<tr> 156<tr>
157 <th>Slice</th> 157 <th>Slice</th>
158 <th>Description</th> 158 <th>Description</th>
159</tr> 159</tr>
160<tr> 160<tr>
161 <ti><path>/dev/sda1</path></ti> 161 <ti><path>/dev/sda1</path></ti>
204<pre caption="Starting fdisk"> 204<pre caption="Starting fdisk">
205# <i>fdisk /dev/sda</i> 205# <i>fdisk /dev/sda</i>
206</pre> 206</pre>
207 207
208</body> 208</body>
209</subsection> 209</subsection>
210<subsection> 210<subsection>
211<title>Deleting All Slices</title> 211<title>Deleting All Slices</title>
212<body> 212<body>
213 213
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>
238 239
239<pre caption="Deleting a slice"> 240<pre caption="Deleting a slice">
240BSD disklabel command (m for help): <i>p</i> 241BSD disklabel command (m for help): <i>p</i>
241 242
2428 partitions: 2438 partitions:
243# start end size fstype [fsize bsize cpg] 244# start end size fstype [fsize bsize cpg]
244 a: 1 235* 234* 4.2BSD 1024 8192 16 245 a: 1 235* 234* 4.2BSD 1024 8192 16
245 b: 235* 469* 234* swap 246 b: 235* 469* 234* swap
246 c: 1 5290* 5289* unused 0 0 247 c: 1 5290* 5289* unused 0 0
247 d: 469* 2076* 1607* unused 0 0 248 d: 469* 2076* 1607* unused 0 0
366Save <c>fdisk</c> by typing <c>w</c>. This will also save your slice layout. 367Save <c>fdisk</c> by typing <c>w</c>. This will also save your slice layout.
367</p> 368</p>
368 369
369<pre caption="Save and exit fdisk"> 370<pre caption="Save and exit fdisk">
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
375link="#filesystems">Creating Filesystems</uri>. 376link="#filesystems">Creating Filesystems</uri>.
376</p> 377</p>
377 378
378</body> 379</body>
379</subsection> 380</subsection>
380</section> 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
612link="#filesystems">Creating Filesystems</uri>.
613</p>
614
615</body>
616</subsection>
617</section>
381<section id="filesystems"> 618<section id="filesystems">
382<title>Creating Filesystems</title> 619<title>Creating Filesystems</title>
383<subsection> 620<subsection>
384<title>Introduction</title> 621<title>Introduction</title>
385<body> 622<body>
386 623
387<p> 624<p>
388Now that your partitions are created, it is time to place a filesystem on them. 625Now that your partitions are created, it is time to place a filesystem on them.
389If you don't care about what filesystem to choose and are happy with what we use 626If you don't care about what filesystem to choose and are happy with what we use
390as default in this handbook, continue with <uri 627as default in this handbook, continue with <uri
391link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. 628link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
392Otherwise read on to learn about the available filesystems... 629Otherwise read on to learn about the available filesystems...
393</p> 630</p>
394 631
395</body> 632</body>

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

  ViewVC Help
Powered by ViewVC 1.1.20