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

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

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

Revision 1.10 Revision 1.25
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/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-hppa-disk.xml,v 1.10 2004/11/09 13:01:52 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-hppa-disk.xml,v 1.25 2008/04/01 16:44:56 rane Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.9</version> 11<version>9.1</version>
12<date>September 30, 2004</date> 12<date>2008-04-01</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>Partitions and Slices</title> 22<title>Partitions and Slices</title>
46<body> 23<body>
47 24
48<p> 25<p>
49Although it is theoretically possible to use a full disk to house your Linux 26Although it is theoretically possible to use a full disk to house your Linux
50system, this is almost never done in practice. Instead, full disk block devices 27system, this is almost never done in practice. Instead, full disk block devices
51are split up in smaller, more manageable block devices. On most systems, 28are split up in smaller, more manageable block devices. On most systems, these
52these are called <e>partitions</e>. Other architectures use a similar technique, 29are called <e>partitions</e>. Other architectures use a similar technique,
53called <e>slices</e>. 30called <e>slices</e>.
54</p> 31</p>
55 32
56</body> 33</body>
57</subsection> 34</subsection>
64 41
65<p> 42<p>
66The number of partitions is highly dependent on your environment. For instance, 43The number of partitions is highly dependent on your environment. For instance,
67if you have lots of users, you will most likely want to have your 44if you have lots of users, you will most likely want to have your
68<path>/home</path> separate as it increases security and makes backups easier. 45<path>/home</path> separate as it increases security and makes backups easier.
69If you are installing Gentoo to perform as a mailserver, your 46If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
70<path>/var</path> should be separate as all mails are stored inside 47should be separate as all mails are stored inside <path>/var</path>. A good
71<path>/var</path>. A good choice of filesystem will then maximise your 48choice of filesystem will then maximise your performance. Gameservers will have
72performance. Gameservers will have a separate <path>/opt</path> as most gaming 49a separate <path>/opt</path> as most gaming servers are installed there. The
73servers are installed there. The reason is similar for <path>/home</path>: 50reason is similar for <path>/home</path>: security and backups. You will
74security and backups. 51definitely want to keep <path>/usr</path> big: not only will it contain the
52majority of applications, the Portage tree alone takes around 500 Mbyte
53excluding the various sources that are stored in it.
75</p> 54</p>
76 55
77<p> 56<p>
78As you can see, it very much depends on what you want to achieve. Separate 57As you can see, it very much depends on what you want to achieve. Separate
79partitions or volumes have the following advantages: 58partitions or volumes have the following advantages:
97 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. 76 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
98</li> 77</li>
99</ul> 78</ul>
100 79
101<p> 80<p>
102However, multiple partitions have one big disadvantage: if not configured 81However, multiple partitions have one big disadvantage: if not configured
103properly, you might result in having a system with lots 82properly, you might result in having a system with lots of free space on one
104of free space on one partition and none on another. There is also a 15-partition 83partition and none on another. There is also a 15-partition limit for SCSI and
105limit for SCSI and SATA. 84SATA.
106</p> 85</p>
107 86
108</body> 87</body>
109</subsection> 88</subsection>
110</section> 89</section>
132Building a new DOS disklabel. 111Building a new DOS disklabel.
133</pre> 112</pre>
134 113
135<p> 114<p>
136PALO (the HPPA bootloader) needs a special partition to work. You have 115PALO (the HPPA bootloader) needs a special partition to work. You have
137to create a partition of at least 16Mb at the beginning of your disk. 116to create a partition of at least 16MB at the beginning of your disk.
138The partition type must be of type <e>f0</e> (Linux/PA-RISC boot). 117The partition type must be of type <e>f0</e> (Linux/PA-RISC boot).
139</p> 118</p>
140 119
141<impo> 120<impo>
142If you ignore this and continue without a special PALO partition, your system 121If you ignore this and continue without a special PALO partition, your system
143will stop loving you and fail to start. Also, if your disk is larger than 2Gb, 122will stop loving you and fail to start. Also, if your disk is larger than 2GB,
144make sure that the boot partition is in the first 2Gb of your disk. PALO is 123make sure that the boot partition is in the first 2GB of your disk. PALO is
145unable to read a kernel after the 2Gb limit. 124unable to read a kernel after the 2GB limit.
146</impo> 125</impo>
147 126
148<pre caption="A simple default partition schema"> 127<pre caption="A simple default partition schema">
149# <i>cat /etc/fstab</i> 128# <i>cat /etc/fstab</i>
150/dev/sda2 /boot ext3 noauto,noatime 1 1 129/dev/sda2 /boot ext3 noauto,noatime 1 1
187Otherwise read on to learn about the available filesystems... 166Otherwise read on to learn about the available filesystems...
188</p> 167</p>
189 168
190</body> 169</body>
191</subsection> 170</subsection>
192<subsection>
193<title>Filesystems?</title>
194<body>
195 171
196<p>
197Several filesystems are available. Ext2, ext3, XFS and reiserfs are found stable on
198the HPPA architecture. The others are very experimental.
199</p>
200
201<p>
202<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
203journaling, which means that routine ext2 filesystem checks at startup time can
204be quite time-consuming. There is now quite a selection of newer-generation
205journaled filesystems that can be checked for consistency very quickly and are
206thus generally preferred over their non-journaled counterparts. Journaled
207filesystems prevent long delays when you boot your system and your filesystem
208happens to be in an inconsistent state.
209</p>
210
211<p>
212<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
213journaling for fast recovery in addition to other enhanced journaling modes like
214full data and ordered data journaling. ext3 is a very good and reliable
215filesystem. It has an additional hashed b-tree indexing option that enables
216high performance in almost all situations. In short, ext3 is an excellent
217filesystem.
218</p>
219
220<p>
221<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
222performance and greatly outperforms both ext2 and ext3 when dealing with small
223files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
224extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
225solid and usable as both general-purpose filesystem and for extreme cases such
226as the creation of large filesystems, the use of many small files, very large
227files and directories containing tens of thousands of files.
228</p>
229
230<p>
231<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
232feature-set and is optimized for scalability. We only recommend using this
233filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
234an uninterruptible power supply. Because XFS aggressively caches in-transit data
235in RAM, improperly designed programs (those that don't take proper precautions
236when writing files to disk and there are quite a few of them) can lose a good
237deal of data if the system goes down unexpectedly.
238</p>
239
240<p>
241<b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
242become production-ready and there hasn't been a sufficient track record to
243comment positively nor negatively on its general stability at this point.
244</p>
245
246</body>
247</subsection> 172<subsection>
173<include href="hb-install-filesystems.xml"/>
174</subsection>
175
248<subsection id="filesystems-apply"> 176<subsection id="filesystems-apply">
249<title>Applying a Filesystem to a Partition</title> 177<title>Applying a Filesystem to a Partition</title>
250<body> 178<body>
251 179
252<p> 180<p>
318<pre caption="Activating the swap partition"> 246<pre caption="Activating the swap partition">
319# <i>swapon /dev/sda3</i> 247# <i>swapon /dev/sda3</i>
320</pre> 248</pre>
321 249
322<p> 250<p>
323Create and activate the swap now. 251Create and activate the swap with the commands mentioned above.
324</p> 252</p>
325 253
326</body> 254</body>
327</subsection> 255</subsection>
328</section> 256</section>
342# <i>mkdir /mnt/gentoo/boot</i> 270# <i>mkdir /mnt/gentoo/boot</i>
343# <i>mount /dev/sda2 /mnt/gentoo/boot</i> 271# <i>mount /dev/sda2 /mnt/gentoo/boot</i>
344</pre> 272</pre>
345 273
346<note> 274<note>
347If you want your <path>/tmp</path> to reside on a separate partition, be sure to 275If you want your <path>/tmp</path> to reside on a separate partition, be sure
348change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This 276to change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>.
349also holds for <path>/var/tmp</path>. 277This also holds for <path>/var/tmp</path>.
350</note> 278</note>
351 279
352<p> 280<p>
353We will also have to mount the proc filesystem (a virtual interface with the 281We will also have to mount the proc filesystem (a virtual interface with the
354kernel) on <path>/proc</path>. But first we will need to place our files on the partitions. 282kernel) on <path>/proc</path>. But first we will need to place our files on the
283partitions.
355</p> 284</p>
356 285
357<p> 286<p>
358Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo 287Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
359Installation Files</uri>. 288Installation Files</uri>.

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.20