/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-ia64-disk.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-install-ia64-disk.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.14
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-ia64-disk.xml,v 1.1 2006/09/03 05:02:44 vapier Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ia64-disk.xml,v 1.14 2012/10/06 19:54:14 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>2.2</version> 11<version>9</version>
12<date>2005-06-10</date> 12<date>2012-10-06</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 IDE drive in a Linux system, namely
31<path>/dev/hda</path>. If your system uses SCSI or SATA drives, then your
32first hard drive would be <path>/dev/sda</path>.
33</p>
34
35<p>
36The block devices above represent an abstract interface to the disk. User
37programs can use these block devices to interact with your disk without worrying
38about whether your drives are IDE, SCSI or something else. The program can
39simply address the storage on the disk as a bunch of contiguous,
40randomly-accessible 512-byte blocks.
41</p>
42
43</body>
44</subsection> 17<subsection>
18<include href="hb-install-blockdevices.xml"/>
19</subsection>
20
45<subsection> 21<subsection>
46<title>Partitions</title> 22<title>Partitions</title>
47<body> 23<body>
48 24
49<p> 25<p>
67<subsection> 43<subsection>
68<title>Advanced Storage</title> 44<title>Advanced Storage</title>
69<body> 45<body>
70 46
71<p> 47<p>
72The <keyval id="arch"/> Installation CDs provide support for EVMS and LVM2. 48The <keyval id="arch"/> Installation CDs provide support for LVM2.
73EVMS and LVM2 increase the flexibility offered by your partitioning setup. 49LVM2 increases the flexibility offered by your partitioning setup.
74During the installation instructions, we will focus on "regular" partitions, 50During the installation instructions, we will focus on "regular" partitions,
75but it is still good to know EVMS and LVM2 are supported as well. 51but it is still good to know LVM2 is supported as well.
76</p> 52</p>
77 53
78</body> 54</body>
79</subsection> 55</subsection>
80</section> 56</section>
166 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. 142 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
167</li> 143</li>
168</ul> 144</ul>
169 145
170<p> 146<p>
171However, multiple partitions have one big disadvantage: if not configured 147However, multiple partitions have disadvantages as well. If not configured
172properly, you might result in having a system with lots of free space on one 148properly, you will have a system with lots of free space on one partition and
173partition and none on another. There is also a 15-partition limit for SCSI and 149none on another. Another nuisance is that separate partitions - especially
174SATA. 150for important mountpoints like <path>/usr</path> or <path>/var</path> - often
151require the administrator to boot with an initramfs to mount the partition
152before other boot scripts start. This isn't always the case though, so your
153results may vary.
154</p>
155
156<p>
157There is also a 15-partition limit for SCSI and SATA, unless you use GPT
158labels.
175</p> 159</p>
176 160
177<p> 161<p>
178As an example partitioning, we show you one for a 20GB disk, used as a 162As an example partitioning, we show you one for a 20GB disk, used as a
179demonstration laptop (containing webserver, mailserver, gnome, ...): 163demonstration laptop (containing webserver, mailserver, gnome, ...):
180</p> 164</p>
181 165
182<pre caption="Filesystem usage example"> 166<pre caption="Filesystem usage example">
183$ <i>df -h</i> 167$ <i>df -h</i>
184Filesystem Type Size Used Avail Use% Mounted on 168Filesystem Type Size Used Avail Use% Mounted on
185/dev/hda5 ext3 509M 132M 351M 28% / 169/dev/sda5 ext3 509M 132M 351M 28% /
186/dev/hda2 ext3 5.0G 3.0G 1.8G 63% /home 170/dev/sda2 ext3 5.0G 3.0G 1.8G 63% /home
187/dev/hda7 ext3 7.9G 6.2G 1.3G 83% /usr 171/dev/sda7 ext3 7.9G 6.2G 1.3G 83% /usr
188/dev/hda8 ext3 1011M 483M 477M 51% /opt 172/dev/sda8 ext3 1011M 483M 477M 51% /opt
189/dev/hda9 ext3 2.0G 607M 1.3G 32% /var 173/dev/sda9 ext3 2.0G 607M 1.3G 32% /var
190/dev/hda1 ext2 51M 17M 31M 36% /boot 174/dev/sda1 ext2 51M 17M 31M 36% /boot
191/dev/hda6 swap 516M 12M 504M 2% &lt;not mounted&gt; 175/dev/sda6 swap 516M 12M 504M 2% &lt;not mounted&gt;
192<comment>(Unpartitioned space for future usage: 2 GB)</comment> 176<comment>(Unpartitioned space for future usage: 2 GB)</comment>
193</pre> 177</pre>
194 178
195<p> 179<p>
196<path>/usr</path> is rather full (83% used) here, but once 180<path>/usr</path> is rather full (83% used) here, but once
197all software is installed, <path>/usr</path> doesn't tend to grow that much. 181all software is installed, <path>/usr</path> doesn't tend to grow that much.
198Although allocating a few gigabytes of disk space for <path>/var</path> may 182Although allocating a few gigabytes of disk space for <path>/var</path> may
199seem excessive, remember that Portage uses this partition by default for 183seem excessive, remember that Portage uses this partition by default for
200compiling packages. If you want to keep <path>/var</path> at a more reasonable 184compiling packages. If you want to keep <path>/var</path> at a more reasonable
201size, such as 1GB, you will need to alter your <c>PORTAGE_TMPDIR</c> variable 185size, such as 1GB, you will need to alter your <c>PORTAGE_TMPDIR</c> variable
202in <path>/etc/make.conf</path> to point to the partition with enough free space 186in <path>/etc/portage/make.conf</path> to point to the partition with enough
203for compiling extremely large packages such as OpenOffice. 187free space for compiling extremely large packages such as OpenOffice.
204</p> 188</p>
205 189
206</body> 190</body>
207</subsection> 191</subsection>
208</section> 192</section>
337<title>Creating the EFI Boot Partition</title> 321<title>Creating the EFI Boot Partition</title>
338<body> 322<body>
339 323
340<p> 324<p>
341We first create a small EFI boot partition. This is required to be a FAT 325We first create a small EFI boot partition. This is required to be a FAT
342filesystem in order for the ia64 firmware to read it. Our example makes this 326filesystem in order for the <keyval id="arch"/> firmware to read it. Our
34332 megabytes, which is appropriate for storing kernels and elilo configuration. 327example makes this 32 MB, which is appropriate for storing kernels and
344You can expect each ia64 kernel to be around 5 megabytes, so this configuration 328<c>elilo</c> configuration. You can expect each <keyval id="arch"/> kernel to
345leaves you some room to grow and experiment. 329be around 5 MB, so this configuration leaves you some room to grow and
330experiment.
346</p> 331</p>
347 332
348<pre caption="Creating the boot partition"> 333<pre caption="Creating the boot partition">
349(parted) <i>mkpart primary fat32 0 32</i> 334(parted) <i>mkpart primary fat32 0 32</i>
350(parted) <i>print</i> 335(parted) <i>print</i>
421(parted) <i>quit</i> 406(parted) <i>quit</i>
422Information: Don't forget to update /etc/fstab, if necessary. 407Information: Don't forget to update /etc/fstab, if necessary.
423</pre> 408</pre>
424 409
425<p> 410<p>
426Now that your partitions are created, you can now continue with <uri 411Now that your partitions are created, you can continue with <uri
427link="#filesystems">Creating Filesystems</uri>. 412link="#filesystems">Creating Filesystems</uri>.
428</p> 413</p>
429 414
430</body> 415</body>
431</subsection> 416</subsection>
444Otherwise read on to learn about the available filesystems... 429Otherwise read on to learn about the available filesystems...
445</p> 430</p>
446 431
447</body> 432</body>
448</subsection> 433</subsection>
449<subsection>
450<title>Filesystems?</title>
451<body>
452 434
453<p>
454The Linux kernel supports various filesystems. We'll explain ext2, ext3,
455ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux
456systems.
457</p>
458
459<p>
460<b>vfat</b> is the MS-DOS filesystem, updated to allow long filenames. It is
461also the only filesystem type that the EFI firmware on ia64 systems understand.
462The boot partition on ia64 systems should always be vfat, but for your data
463partitions you should use one of the other filesystems listed below.
464</p>
465
466<p>
467<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
468journaling, which means that routine ext2 filesystem checks at startup time can
469be quite time-consuming. There is now quite a selection of newer-generation
470journaled filesystems that can be checked for consistency very quickly and are
471thus generally preferred over their non-journaled counterparts. Journaled
472filesystems prevent long delays when you boot your system and your filesystem
473happens to be in an inconsistent state.
474</p>
475
476<p>
477<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
478journaling for fast recovery in addition to other enhanced journaling modes like
479full data and ordered data journaling. ext3 is a very good and reliable
480filesystem.
481</p>
482
483<p>
484<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
485performance and greatly outperforms both ext2 and ext3 when dealing with small
486files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
487extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
488solid and usable as both general-purpose filesystem and for extreme cases such
489as the creation of large filesystems, the use of many small files, very large
490files and directories containing tens of thousands of files.
491</p>
492
493<p>
494<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
495feature-set and is optimized for scalability. We only recommend using this
496filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
497an uninterruptible power supply. Because XFS aggressively caches in-transit data
498in RAM, improperly designed programs (those that don't take proper precautions
499when writing files to disk and there are quite a few of them) can lose a good
500deal of data if the system goes down unexpectedly.
501</p>
502
503<p>
504<b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
505become production-ready and there hasn't been a sufficient track record to
506comment positively nor negatively on its general stability at this point.
507</p>
508
509</body>
510</subsection> 435<subsection>
436<include href="hb-install-filesystems.xml"/>
437</subsection>
438
511<subsection id="filesystems-apply"> 439<subsection id="filesystems-apply">
512<title>Applying a Filesystem to a Partition</title> 440<title>Applying a Filesystem to a Partition</title>
513<body> 441<body>
514 442
515<p> 443<p>
526 <ti>vfat</ti> 454 <ti>vfat</ti>
527 <ti><c>mkdosfs</c></ti> 455 <ti><c>mkdosfs</c></ti>
528</tr> 456</tr>
529<tr> 457<tr>
530 <ti>ext2</ti> 458 <ti>ext2</ti>
531 <ti><c>mke2fs</c></ti> 459 <ti><c>mkfs.ext2</c></ti>
532</tr> 460</tr>
533<tr> 461<tr>
534 <ti>ext3</ti> 462 <ti>ext3</ti>
535 <ti><c>mke2fs -j</c></ti> 463 <ti><c>mkfs.ext3</c></ti>
464</tr>
465<tr>
466 <ti>ext4</ti>
467 <ti><c>mkfs.ext4</c></ti>
536</tr> 468</tr>
537<tr> 469<tr>
538 <ti>reiserfs</ti> 470 <ti>reiserfs</ti>
539 <ti><c>mkreiserfs</c></ti> 471 <ti><c>mkreiserfs</c></ti>
540</tr> 472</tr>
554as ext3, you would run the following commands: 486as ext3, you would run the following commands:
555</p> 487</p>
556 488
557<pre caption="Applying a filesystem on a partition"> 489<pre caption="Applying a filesystem on a partition">
558# <i>mkdosfs /dev/sda1</i> 490# <i>mkdosfs /dev/sda1</i>
559mkdosfs 2.10 (22 Sep 2003)
560
561# <i>mke2fs -j /dev/sda3</i> 491# <i>mkfs.ext3 /dev/sda3</i>
562mke2fs 1.36 (05-Feb-2005)
563Filesystem label=
564OS type: Linux
565Block size=4096 (log=2)
566Fragment size=4096 (log=2)
5674382336 inodes, 8752348 blocks
568437617 blocks (5.00%) reserved for the super user
569First data block=0
570268 block groups
57132768 blocks per group, 32768 fragments per group
57216352 inodes per group
573Superblock backups stored on blocks:
574 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
575 4096000, 7962624
576
577Writing inode tables: done
578Creating journal (8192 blocks): done
579Writing superblocks and filesystem accounting information: done
580
581This filesystem will be automatically checked every 26 mounts or
582180 days, whichever comes first. Use tune2fs -c or -i to override.
583</pre> 492</pre>
584 493
585</body> 494</body>
586</subsection> 495</subsection>
587<subsection> 496<subsection>
626# <i>mount /dev/sda3 /mnt/gentoo</i> 535# <i>mount /dev/sda3 /mnt/gentoo</i>
627</pre> 536</pre>
628 537
629<note> 538<note>
630Unlike some of the other architectures supported by Gentoo, <path>/boot</path> 539Unlike some of the other architectures supported by Gentoo, <path>/boot</path>
631is not mounted on ia64. The reason for this is that the EFI boot partition will 540is not mounted on ia64. The reason for this is that the EFI boot partition will
632be automatically mounted and written by the elilo command each time that you run 541be automatically mounted and written by the <c>elilo</c> command each time that
633it. Because of this, /boot resides on the root filesystem and is the storage 542you run it. Because of this, <path>/boot</path> resides on the root filesystem
634place for the kernels referenced by your elilo configuration. 543and is the storage place for the kernels referenced by your <c>elilo</c>
544configuration.
635</note> 545</note>
636 546
637<note> 547<note>
638If you want your <path>/tmp</path> to reside on a separate partition, be sure to 548If you want your <path>/tmp</path> to reside on a separate partition, be sure to
639change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This 549change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20