/[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.26 - (hide annotations) (download) (as text)
Mon Jan 26 08:04:26 2009 UTC (5 years, 7 months ago) by nightmorph
Branch: MAIN
Changes since 1.25: +2 -2 lines
File MIME type: application/xml
Engrish fixes, bug 253374

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 nightmorph 1.26 <!-- $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 swift 1.1
9     <sections>
10 swift 1.10
11 rane 1.25 <version>9.1</version>
12 nightmorph 1.24 <date>2008-04-01</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 vapier 1.9 <pre caption="A simple default partition schema">
128     # <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     <ti><c>mke2fs</c></ti>
193     </tr>
194     <tr>
195     <ti>ext3</ti>
196     <ti><c>mke2fs -j</c></ti>
197     </tr>
198     <tr>
199     <ti>reiserfs</ti>
200     <ti><c>mkreiserfs</c></ti>
201     </tr>
202     <tr>
203     <ti>xfs</ti>
204     <ti><c>mkfs.xfs</c></ti>
205     </tr>
206     <tr>
207     <ti>jfs</ti>
208     <ti><c>mkfs.jfs</c></ti>
209     </tr>
210     </table>
211    
212     <p>
213 dertobi123 1.2 For instance, to have the boot partition (<path>/dev/sda2</path> in our
214     example) in ext2 and the root partition (<path>/dev/sda4</path> in our example)
215 swift 1.1 in ext3 (as in our example), you would use:
216     </p>
217    
218     <pre caption="Applying a filesystem on a partition">
219 dertobi123 1.2 # <i>mke2fs /dev/sda2</i>
220 nightmorph 1.22 # <i>mke2fs -j /dev/sda4</i>
221 swift 1.1 </pre>
222    
223     <p>
224     Now create the filesystems on your newly created partitions (or logical
225     volumes).
226     </p>
227    
228     </body>
229     </subsection>
230     <subsection>
231     <title>Activating the Swap Partition</title>
232     <body>
233    
234     <p>
235     <c>mkswap</c> is the command that is used to initialize swap partitions:
236     </p>
237    
238     <pre caption="Creating a Swap signature">
239 dertobi123 1.2 # <i>mkswap /dev/sda3</i>
240 swift 1.1 </pre>
241    
242     <p>
243     To activate the swap partition, use <c>swapon</c>:
244     </p>
245    
246     <pre caption="Activating the swap partition">
247 dertobi123 1.2 # <i>swapon /dev/sda3</i>
248 swift 1.1 </pre>
249    
250     <p>
251 swift 1.15 Create and activate the swap with the commands mentioned above.
252 swift 1.1 </p>
253    
254     </body>
255     </subsection>
256     </section>
257     <section>
258     <title>Mounting</title>
259     <body>
260    
261     <p>
262     Now that your partitions are initialized and are housing a filesystem, it is
263     time to mount those partitions. Use the <c>mount</c> command. Don't forget to
264     create the necessary mount directories for every partition you created. As an
265     example we mount the root and boot partition:
266     </p>
267    
268     <pre caption="Mounting partitions">
269 dertobi123 1.2 # <i>mount /dev/sda4 /mnt/gentoo</i>
270 swift 1.1 # <i>mkdir /mnt/gentoo/boot</i>
271 dertobi123 1.2 # <i>mount /dev/sda2 /mnt/gentoo/boot</i>
272 swift 1.1 </pre>
273    
274     <note>
275 neysx 1.18 If you want your <path>/tmp</path> to reside on a separate partition, be sure
276     to change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>.
277     This also holds for <path>/var/tmp</path>.
278 swift 1.1 </note>
279    
280     <p>
281 neysx 1.18 We will also have to mount the proc filesystem (a virtual interface with the
282     kernel) on <path>/proc</path>. But first we will need to place our files on the
283     partitions.
284 swift 1.1 </p>
285    
286     <p>
287 swift 1.6 Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
288 swift 1.1 Installation Files</uri>.
289     </p>
290    
291     </body>
292     </section>
293     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20