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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.28 - (hide annotations) (download) (as text)
Sat Sep 17 12:16:09 2011 UTC (3 years, 6 months ago) by swift
Branch: MAIN
Changes since 1.27: +11 -7 lines
File MIME type: application/xml
Bug #334167 - Add ext4 information for HPPA architecture

1 swift 1.1 <?xml version='1.0' encoding='UTF-8'?>
2     <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3    
4     <!-- The content of this document is licensed under the CC-BY-SA license -->
5 swift 1.16 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 swift 1.1
7 swift 1.28 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-hppa-disk.xml,v 1.27 2010/07/20 00:05:24 nightmorph Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.10
11 swift 1.28 <version>11</version>
12     <date>2011-09-17</date>
13 swift 1.10
14 swift 1.1 <section>
15     <title>Introduction to Block Devices</title>
16 nightmorph 1.24
17 swift 1.1 <subsection>
18 rane 1.25 <include href="hb-install-blockdevices.xml"/>
19 nightmorph 1.24 </subsection>
20 swift 1.1
21     <subsection>
22     <title>Partitions and Slices</title>
23     <body>
24    
25     <p>
26     Although it is theoretically possible to use a full disk to house your Linux
27     system, this is almost never done in practice. Instead, full disk block devices
28 neysx 1.18 are split up in smaller, more manageable block devices. On most systems, these
29     are called <e>partitions</e>. Other architectures use a similar technique,
30 swift 1.1 called <e>slices</e>.
31     </p>
32    
33     </body>
34     </subsection>
35     </section>
36     <section>
37     <title>Designing a Partitioning Scheme</title>
38     <subsection>
39     <title>How Many and How Big?</title>
40     <body>
41    
42     <p>
43     The number of partitions is highly dependent on your environment. For instance,
44     if you have lots of users, you will most likely want to have your
45     <path>/home</path> separate as it increases security and makes backups easier.
46 neysx 1.18 If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
47     should be separate as all mails are stored inside <path>/var</path>. A good
48     choice of filesystem will then maximise your performance. Gameservers will have
49     a separate <path>/opt</path> as most gaming servers are installed there. The
50     reason is similar for <path>/home</path>: security and backups. You will
51     definitely want to keep <path>/usr</path> big: not only will it contain the
52     majority of applications, the Portage tree alone takes around 500 Mbyte
53     excluding the various sources that are stored in it.
54 swift 1.1 </p>
55    
56     <p>
57     As you can see, it very much depends on what you want to achieve. Separate
58     partitions or volumes have the following advantages:
59     </p>
60    
61     <ul>
62     <li>
63 neysx 1.3 You can choose the best performing filesystem for each partition or volume
64 swift 1.1 </li>
65     <li>
66     Your entire system cannot run out of free space if one defunct tool is
67     continuously writing files to a partition or volume
68     </li>
69     <li>
70     If necessary, file system checks are reduced in time, as multiple checks can
71     be done in parallel (although this advantage is more with multiple disks than
72     it is with multiple partitions)
73     </li>
74     <li>
75     Security can be enhanced by mounting some partitions or volumes read-only,
76     nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
77     </li>
78     </ul>
79    
80     <p>
81 neysx 1.18 However, multiple partitions have one big disadvantage: if not configured
82     properly, you might result in having a system with lots of free space on one
83     partition and none on another. There is also a 15-partition limit for SCSI and
84     SATA.
85 swift 1.1 </p>
86    
87     </body>
88     </subsection>
89     </section>
90     <section>
91     <title>Using fdisk on HPPA to Partition your Disk</title>
92     <body>
93    
94     <p>
95     Use <c>fdisk</c> to create the partitions you want:
96     </p>
97    
98     <pre caption="Partitioning the disk">
99     # <i>fdisk /dev/sda</i>
100     </pre>
101    
102     <p>
103 vapier 1.9 HPPA machines use the PC standard DOS partition tables. To create a new
104     DOS partition table, simply use the <c>o</c> command.
105     </p>
106    
107     <pre caption="Creating a DOS partition table">
108     # <i>fdisk /dev/sda</i>
109    
110     Command (m for help): <i>o</i>
111     Building a new DOS disklabel.
112     </pre>
113    
114     <p>
115     PALO (the HPPA bootloader) needs a special partition to work. You have
116 swift 1.13 to create a partition of at least 16MB at the beginning of your disk.
117 vapier 1.9 The partition type must be of type <e>f0</e> (Linux/PA-RISC boot).
118 swift 1.1 </p>
119    
120     <impo>
121     If you ignore this and continue without a special PALO partition, your system
122 swift 1.13 will stop loving you and fail to start. Also, if your disk is larger than 2GB,
123     make sure that the boot partition is in the first 2GB of your disk. PALO is
124     unable to read a kernel after the 2GB limit.
125 swift 1.1 </impo>
126    
127 nightmorph 1.27 <pre caption="A simple default partition scheme">
128 vapier 1.9 # <i>cat /etc/fstab</i>
129     /dev/sda2 /boot ext3 noauto,noatime 1 1
130     /dev/sda3 none swap sw 0 0
131     /dev/sda4 / ext3 noatime 0 0
132    
133     # <i>fdisk /dev/sda</i>
134    
135     Command (m for help): <i>p</i>
136    
137     Disk /dev/sda: 4294 MB, 4294816768 bytes
138     133 heads, 62 sectors/track, 1017 cylinders
139     Units = cylinders of 8246 * 512 = 4221952 bytes
140    
141     Device Boot Start End Blocks Id System
142     /dev/sda1 1 8 32953 f0 Linux/PA-RISC boot
143     /dev/sda2 9 20 49476 83 Linux
144     /dev/sda3 21 70 206150 82 Linux swap
145     /dev/sda4 71 1017 3904481 83 Linux
146     </pre>
147    
148 swift 1.1 <p>
149 nightmorph 1.26 Now that your partitions are created, you can continue with <uri
150 swift 1.1 link="#filesystems">Creating Filesystems</uri>.
151     </p>
152    
153     </body>
154     </section>
155     <section id="filesystems">
156     <title>Creating Filesystems</title>
157     <subsection>
158     <title>Introduction</title>
159     <body>
160    
161     <p>
162     Now that your partitions are created, it is time to place a filesystem on them.
163     If you don't care about what filesystem to choose and are happy with what we use
164     as default in this handbook, continue with <uri
165     link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
166     Otherwise read on to learn about the available filesystems...
167     </p>
168    
169     </body>
170     </subsection>
171 nightmorph 1.24
172 swift 1.1 <subsection>
173 nightmorph 1.24 <include href="hb-install-filesystems.xml"/>
174     </subsection>
175 swift 1.1
176     <subsection id="filesystems-apply">
177     <title>Applying a Filesystem to a Partition</title>
178     <body>
179    
180     <p>
181     To create a filesystem on a partition or volume, there are tools available for
182     each possible filesystem:
183     </p>
184    
185     <table>
186     <tr>
187     <th>Filesystem</th>
188     <th>Creation Command</th>
189     </tr>
190     <tr>
191     <ti>ext2</ti>
192 swift 1.28 <ti><c>mkfs.ext2</c></ti>
193 swift 1.1 </tr>
194     <tr>
195     <ti>ext3</ti>
196 swift 1.28 <ti><c>mkfs.ext3</c></ti>
197     </tr>
198     <tr>
199     <ti>ext4</ti>
200     <ti><c>mkfs.ext4</c></ti>
201 swift 1.1 </tr>
202     <tr>
203     <ti>reiserfs</ti>
204     <ti><c>mkreiserfs</c></ti>
205     </tr>
206     <tr>
207     <ti>xfs</ti>
208     <ti><c>mkfs.xfs</c></ti>
209     </tr>
210     <tr>
211     <ti>jfs</ti>
212     <ti><c>mkfs.jfs</c></ti>
213     </tr>
214     </table>
215    
216     <p>
217 dertobi123 1.2 For instance, to have the boot partition (<path>/dev/sda2</path> in our
218     example) in ext2 and the root partition (<path>/dev/sda4</path> in our example)
219 swift 1.1 in ext3 (as in our example), you would use:
220     </p>
221    
222     <pre caption="Applying a filesystem on a partition">
223 swift 1.28 # <i>mkfs.ext2 /dev/sda2</i>
224     # <i>mkfs.ext3 /dev/sda4</i>
225 swift 1.1 </pre>
226    
227     <p>
228     Now create the filesystems on your newly created partitions (or logical
229     volumes).
230     </p>
231    
232     </body>
233     </subsection>
234     <subsection>
235     <title>Activating the Swap Partition</title>
236     <body>
237    
238     <p>
239     <c>mkswap</c> is the command that is used to initialize swap partitions:
240     </p>
241    
242     <pre caption="Creating a Swap signature">
243 dertobi123 1.2 # <i>mkswap /dev/sda3</i>
244 swift 1.1 </pre>
245    
246     <p>
247     To activate the swap partition, use <c>swapon</c>:
248     </p>
249    
250     <pre caption="Activating the swap partition">
251 dertobi123 1.2 # <i>swapon /dev/sda3</i>
252 swift 1.1 </pre>
253    
254     <p>
255 swift 1.15 Create and activate the swap with the commands mentioned above.
256 swift 1.1 </p>
257    
258     </body>
259     </subsection>
260     </section>
261     <section>
262     <title>Mounting</title>
263     <body>
264    
265     <p>
266     Now that your partitions are initialized and are housing a filesystem, it is
267     time to mount those partitions. Use the <c>mount</c> command. Don't forget to
268     create the necessary mount directories for every partition you created. As an
269     example we mount the root and boot partition:
270     </p>
271    
272     <pre caption="Mounting partitions">
273 dertobi123 1.2 # <i>mount /dev/sda4 /mnt/gentoo</i>
274 swift 1.1 # <i>mkdir /mnt/gentoo/boot</i>
275 dertobi123 1.2 # <i>mount /dev/sda2 /mnt/gentoo/boot</i>
276 swift 1.1 </pre>
277    
278     <note>
279 neysx 1.18 If you want your <path>/tmp</path> to reside on a separate partition, be sure
280     to change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>.
281     This also holds for <path>/var/tmp</path>.
282 swift 1.1 </note>
283    
284     <p>
285 neysx 1.18 We will also have to mount the proc filesystem (a virtual interface with the
286     kernel) on <path>/proc</path>. But first we will need to place our files on the
287     partitions.
288 swift 1.1 </p>
289    
290     <p>
291 swift 1.6 Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
292 swift 1.1 Installation Files</uri>.
293     </p>
294    
295     </body>
296     </section>
297     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20