/[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.19 Revision 1.30
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/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-disk.xml,v 1.19 2005/08/02 08:03:53 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-disk.xml,v 1.30 2009/02/15 06:48:11 rane Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>2.2</version> 11<version>9.1</version>
12<date>2005-08-02</date> 12<date>2009-02-15</date>
13 13
14<section> 14<section>
15<title>Introduction to Block Devices</title> 15<title>Introduction to Block Devices</title>
16<subsection>
17<title>Block Devices</title>
18<body>
19 16
20<p>
21We'll take a good look at disk-oriented aspects of Gentoo Linux
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,
24you'll be guided through the process of setting up partitions and filesystems
25for your Gentoo Linux installation.
26</p>
27
28<p>
29To begin, we'll introduce <e>block devices</e>. The most famous block device is
30probably the one that represents the first SCSI HD in a Linux system, namely
31<path>/dev/sda</path>.
32</p>
33
34<p>
35The block devices above represent an abstract interface to the disk. User
36programs can use these block devices to interact with your disk without worrying
37about whether your drives are IDE, SCSI or something else. The program can
38simply address the storage on the disk as a bunch of contiguous,
39randomly-accessible 512-byte blocks.
40</p>
41
42</body>
43</subsection> 17<subsection>
18<include href="hb-install-blockdevices.xml"/>
19</subsection>
20
44<subsection> 21<subsection>
45<title>Slices</title> 22<title>Slices</title>
46<body> 23<body>
47 24
48<p> 25<p>
277<subsection> 254<subsection>
278<title>Creating the Swap Slice</title> 255<title>Creating the Swap Slice</title>
279<body> 256<body>
280 257
281<p> 258<p>
282On Alpha based systems you don't need a separate boot partition. However, the 259On Alpha based systems you don't need a separate boot slice. However, the
283first cylinder cannot be used as the <c>aboot</c> image will be placed there. 260first cylinder cannot be used as the <c>aboot</c> image will be placed there.
284</p> 261</p>
285 262
286<p> 263<p>
287We will create a swap slice starting at the third cylinder, with a total 264We will create a swap slice starting at the third cylinder, with a total
320<body> 297<body>
321 298
322<p> 299<p>
323We will now create the root slice, starting from the first cylinder <e>after</e> 300We will now create the root slice, starting from the first cylinder <e>after</e>
324the swap slice. Use the <c>p</c> command to view where the swap slice ends. In 301the swap slice. Use the <c>p</c> command to view where the swap slice ends. In
325our example, this is at 1003, making the root partition start at 1004. 302our example, this is at 1003, making the root slice start at 1004.
326</p> 303</p>
327 304
328<p> 305<p>
329Another problem is that there is currently a bug in <c>fdisk</c> making it think 306Another problem is that there is currently a bug in <c>fdisk</c> making it think
330the number of available cylinders is one above the real number of cylinders. In 307the number of available cylinders is one above the real number of cylinders. In
331other words, when you are asked for the last cylinder, decrease the cylinder 308other words, when you are asked for the last cylinder, decrease the cylinder
332number (in this example: 5290) with one. 309number (in this example: 5290) with one.
333</p> 310</p>
334 311
335<p> 312<p>
336When the partition is created, we change the type to <c>8</c>, for <e>ext2</e>. 313When the slice is created, we change the type to <c>8</c>, for <e>ext2</e>.
337</p> 314</p>
338 315
339<pre caption="Creating the root slice"> 316<pre caption="Creating the root slice">
340D disklabel command (m for help): <i>n</i> 317D disklabel command (m for help): <i>n</i>
341Partition (a-p): <i>b</i> 318Partition (a-p): <i>b</i>
374<pre caption="Save and exit fdisk"> 351<pre caption="Save and exit fdisk">
375Command (m for help): <i>w</i> 352Command (m for help): <i>w</i>
376</pre> 353</pre>
377 354
378<p> 355<p>
379Now that your slices are created, you can now continue with <uri 356Now that your slices are created, you can continue with <uri
380link="#filesystems">Creating Filesystems</uri>. 357link="#filesystems">Creating Filesystems</uri>.
381</p> 358</p>
382 359
383</body> 360</body>
384</subsection> 361</subsection>
522<subsection> 499<subsection>
523<title>Creating the Swap Partition</title> 500<title>Creating the Swap Partition</title>
524<body> 501<body>
525 502
526<p> 503<p>
527We will create a swap partition starting at the third cylinder, with a total 504We will create a swap partition with a total size of 1 GB. Use <c>n</c> to
528size of 1 GB. Use <c>n</c> to create a new partition. 505create a new partition.
529</p> 506</p>
530 507
531<pre caption="Creating the swap partition"> 508<pre caption="Creating the swap partition">
532Command (m for help): <i>n</i> 509Command (m for help): <i>n</i>
533Command action 510Command action
537Partition number (1-4): <i>2</i> 514Partition number (1-4): <i>2</i>
538First cylinder (17-8727, default 17): <i>17</i> 515First cylinder (17-8727, default 17): <i>17</i>
539Last cylinder or +size or +sizeM or +sizeK (17-8727, default 8727): <i>+1000M</i> 516Last cylinder or +size or +sizeM or +sizeK (17-8727, default 8727): <i>+1000M</i>
540 517
541Command (m for help): <i>t</i> 518Command (m for help): <i>t</i>
542Partition number (1-4): <i>1</i> 519Partition number (1-4): <i>2</i>
543Hex code (type L to list codes): <i>82</i> 520Hex code (type L to list codes): <i>82</i>
544Changed system type of partition 2 to 82 (Linux swap) 521Changed system type of partition 2 to 82 (Linux swap)
545</pre> 522</pre>
546 523
547<p> 524<p>
611<pre caption="Save and exit fdisk"> 588<pre caption="Save and exit fdisk">
612Command (m for help): <i>w</i> 589Command (m for help): <i>w</i>
613</pre> 590</pre>
614 591
615<p> 592<p>
616Now that your partitions are created, you can now continue with <uri 593Now that your partitions are created, you can continue with <uri
617link="#filesystems">Creating Filesystems</uri>. 594link="#filesystems">Creating Filesystems</uri>.
618</p> 595</p>
619 596
620</body> 597</body>
621</subsection> 598</subsection>
634Otherwise read on to learn about the available filesystems... 611Otherwise read on to learn about the available filesystems...
635</p> 612</p>
636 613
637</body> 614</body>
638</subsection> 615</subsection>
639<subsection>
640<title>Filesystems?</title>
641<body>
642 616
643<p>
644Several filesystems are available. Most of them are found stable on the
645Alpha architecture.
646</p>
647
648<p>
649<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
650journaling, which means that routine ext2 filesystem checks at startup time can
651be quite time-consuming. There is now quite a selection of newer-generation
652journaled filesystems that can be checked for consistency very quickly and are
653thus generally preferred over their non-journaled counterparts. Journaled
654filesystems prevent long delays when you boot your system and your filesystem
655happens to be in an inconsistent state.
656</p>
657
658<p>
659<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
660journaling for fast recovery in addition to other enhanced journaling modes like
661full data and ordered data journaling. ext3 is a very good and reliable
662filesystem. It has an additional hashed b-tree indexing option that enables
663high performance in almost all situations. You can enable this indexing by
664adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an
665excellent filesystem.
666</p>
667
668<p>
669<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
670performance and greatly outperforms both ext2 and ext3 when dealing with small
671files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
672extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
673solid and usable as both general-purpose filesystem and for extreme cases such
674as the creation of large filesystems, the use of many small files, very large
675files and directories containing tens of thousands of files.
676</p>
677
678<p>
679<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
680feature-set and is optimized for scalability. We only recommend using this
681filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
682an uninterruptible power supply. Because XFS aggressively caches in-transit data
683in RAM, improperly designed programs (those that don't take proper precautions
684when writing files to disk and there are quite a few of them) can lose a good
685deal of data if the system goes down unexpectedly.
686</p>
687
688<p>
689<b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
690become production-ready and there hasn't been a sufficient track record to
691comment positively nor negatively on its general stability at this point.
692</p>
693
694</body>
695</subsection> 617<subsection>
618<include href="hb-install-filesystems.xml"/>
619</subsection>
620
696<subsection id="filesystems-apply"> 621<subsection id="filesystems-apply">
697<title>Applying a Filesystem to a Partition</title> 622<title>Applying a Filesystem to a Partition</title>
698<body> 623<body>
699 624
700<p> 625<p>
778 703
779<p> 704<p>
780Now that your partitions are initialized and are housing a filesystem, it is 705Now that your partitions are initialized and are housing a filesystem, it is
781time to mount those partitions. Use the <c>mount</c> command. Don't forget to 706time to mount those partitions. Use the <c>mount</c> command. Don't forget to
782create the necessary mount directories for every partition you created. As an 707create the necessary mount directories for every partition you created. As an
783example we mount the root and boot partition: 708example we mount the root partition:
784</p> 709</p>
785
786<warn>
787Due to a bug in the e2fsprogs package, you need to explicitly use
788the <c>mount -t ext3</c> option if you are using an ext3 filesystem.
789</warn>
790 710
791<pre caption="Mounting partitions"> 711<pre caption="Mounting partitions">
792# <i>mount /dev/sda2 /mnt/gentoo</i> 712# <i>mount /dev/sda2 /mnt/gentoo</i>
793<comment>(For ext3 partitions:)</comment>
794# <i>mount -t ext3 /dev/sda2 /mnt/gentoo</i>
795</pre> 713</pre>
796 714
797<note> 715<note>
798If you want your <path>/tmp</path> to reside on a separate partition, be sure to 716If you want your <path>/tmp</path> to reside on a separate partition, be sure to
799change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This 717change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.20