| … | |
… | |
| 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/1.0 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.8 2004/05/03 07:53:45 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.23 2004/11/20 22:23:30 neysx Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
|
|
10 | |
|
|
11 | <version>1.19</version> |
|
|
12 | <date>2004-11-02</date> |
|
|
13 | |
| 10 | <section> |
14 | <section> |
| 11 | <title>Introduction to Block Devices</title> |
15 | <title>Introduction to Block Devices</title> |
| 12 | <subsection> |
16 | <subsection> |
| 13 | <title>Block Devices</title> |
17 | <title>Block Devices</title> |
| 14 | <body> |
18 | <body> |
| … | |
… | |
| 73 | <th>Size</th> |
77 | <th>Size</th> |
| 74 | <th>Description</th> |
78 | <th>Description</th> |
| 75 | </tr> |
79 | </tr> |
| 76 | <tr> |
80 | <tr> |
| 77 | <ti><path>/dev/hda1</path></ti> |
81 | <ti><path>/dev/hda1</path></ti> |
|
|
82 | <ti>/dev/hda1</ti> |
|
|
83 | <ti>(Not applicable)</ti> |
|
|
84 | <ti>(Partition Map)</ti> |
|
|
85 | <ti>32k</ti> |
|
|
86 | <ti>Apple_partition_map</ti> |
|
|
87 | </tr> |
|
|
88 | <tr> |
|
|
89 | <ti><path>/dev/hda2</path></ti> |
| 78 | <ti>(Not needed)</ti> |
90 | <ti>(Not needed)</ti> |
| 79 | <ti>(Not applicable)</ti> |
91 | <ti>(Not applicable)</ti> |
| 80 | <ti>(bootstrap)</ti> |
92 | <ti>(bootstrap)</ti> |
| 81 | <ti>800k</ti> |
93 | <ti>800k</ti> |
| 82 | <ti>Apple_Bootstrap</ti> |
94 | <ti>Apple_Bootstrap</ti> |
| 83 | </tr> |
95 | </tr> |
| 84 | <tr> |
96 | <tr> |
|
|
97 | <ti><path>/dev/hda3</path></ti> |
| 85 | <ti><path>/dev/hda2</path></ti> |
98 | <ti><path>/dev/hda2</path></ti> |
| 86 | <ti><path>/dev/hda1</path></ti> |
|
|
| 87 | <ti><path>/dev/hda1</path></ti> |
99 | <ti><path>/dev/hda1</path></ti> |
| 88 | <ti>(swap)</ti> |
100 | <ti>(swap)</ti> |
| 89 | <ti>512M</ti> |
101 | <ti>512M</ti> |
| 90 | <ti>Swap partition</ti> |
102 | <ti>Swap partition</ti> |
| 91 | </tr> |
103 | </tr> |
| 92 | <tr> |
104 | <tr> |
|
|
105 | <ti><path>/dev/hda4</path></ti> |
| 93 | <ti><path>/dev/hda3</path></ti> |
106 | <ti><path>/dev/hda3</path></ti> |
| 94 | <ti><path>/dev/hda2</path></ti> |
|
|
| 95 | <ti><path>/dev/hda2</path></ti> |
107 | <ti><path>/dev/hda2</path></ti> |
| 96 | <ti>ext3</ti> |
108 | <ti>ext3</ti> |
| 97 | <ti>Rest of the disk</ti> |
109 | <ti>Rest of the disk</ti> |
| 98 | <ti>Root partition</ti> |
110 | <ti>Root partition</ti> |
| 99 | </tr> |
111 | </tr> |
| 100 | </table> |
112 | </table> |
| 101 | |
113 | |
|
|
114 | <note> |
|
|
115 | There are some partitions named like this: <path>Apple_Driver43, |
|
|
116 | Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, |
|
|
117 | Apple_Patches</path>. If you are not planning to use MacOS 9 you can |
|
|
118 | delete them, because MacOS X and Linux don't need them. |
|
|
119 | You might have to use parted in order to delete them, as mac-fdisk can't delete them yet. |
|
|
120 | </note> |
|
|
121 | |
| 102 | <p> |
122 | <p> |
| 103 | If you are interested in knowing how big a partition should be, or even how |
123 | If you are interested in knowing how big a partition should be, or even how many |
| 104 | many partitions you need, read on. Otherwise continue now with |
124 | partitions you need, read on. Otherwise continue now with <uri |
| 105 | <uri link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your |
125 | link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your Disk</uri> |
| 106 | Disk</uri> or <uri link="#parted">Alternative: Using parted (Pegasos) to |
126 | or <uri link="#parted">Alternative: Using parted (especially Pegasos) to |
| 107 | Partition your Disk</uri>. |
127 | Partition your Disk</uri>. |
| 108 | </p> |
128 | </p> |
| 109 | |
129 | |
| 110 | </body> |
130 | </body> |
| 111 | </subsection> |
131 | </subsection> |
| … | |
… | |
| 115 | |
135 | |
| 116 | <p> |
136 | <p> |
| 117 | The number of partitions is highly dependent on your environment. For instance, |
137 | The number of partitions is highly dependent on your environment. For instance, |
| 118 | if you have lots of users, you will most likely want to have your |
138 | if you have lots of users, you will most likely want to have your |
| 119 | <path>/home</path> separate as it increases security and makes backups easier. |
139 | <path>/home</path> separate as it increases security and makes backups easier. |
| 120 | If you are installing Gentoo to perform as a mailserver, your |
140 | If you are installing Gentoo to perform as a mailserver, your <path>/var</path> |
| 121 | <path>/var</path> should be separate as all mails are stored inside |
141 | should be separate as all mails are stored inside <path>/var</path>. A good |
| 122 | <path>/var</path>. A good choice of filesystem will then maximise your |
142 | choice of filesystem will then maximise your performance. Gameservers will have |
| 123 | performance. Gameservers will have a separate <path>/opt</path> as most gaming |
143 | a separate <path>/opt</path> as most gaming servers are installed there. The |
| 124 | servers are installed there. The reason is similar for <path>/home</path>: |
144 | reason is similar for <path>/home</path>: security and backups. |
| 125 | security and backups. |
|
|
| 126 | </p> |
145 | </p> |
| 127 | |
146 | |
| 128 | <p> |
147 | <p> |
| 129 | As you can see, it very much depends on what you want to achieve. Separate |
148 | As you can see, it very much depends on what you want to achieve. Separate |
| 130 | partitions or volumes have the following advantages: |
149 | partitions or volumes have the following advantages: |
| 131 | </p> |
150 | </p> |
| 132 | |
151 | |
| 133 | <ul> |
152 | <ul> |
| 134 | <li> |
153 | <li> |
| 135 | You can choose the most performant filesystem for each partition or volume |
154 | You can choose the best performing filesystem for each partition or volume |
| 136 | </li> |
155 | </li> |
| 137 | <li> |
156 | <li> |
| 138 | Your entire system cannot run out of free space if one defunct tool is |
157 | Your entire system cannot run out of free space if one defunct tool is |
| 139 | continuously writing files to a partition or volume |
158 | continuously writing files to a partition or volume |
| 140 | </li> |
159 | </li> |
| … | |
… | |
| 150 | </ul> |
169 | </ul> |
| 151 | |
170 | |
| 152 | <p> |
171 | <p> |
| 153 | However, multiple partitions have one big disadvantage: if not configured |
172 | However, multiple partitions have one big disadvantage: if not configured |
| 154 | properly, you might result in having a system with lots |
173 | properly, you might result in having a system with lots |
| 155 | of free space on one partition and none on another. |
174 | of free space on one partition and none on another. There is also a 15-partition |
|
|
175 | limit for SCSI and SATA. |
| 156 | </p> |
176 | </p> |
| 157 | |
177 | |
| 158 | </body> |
178 | </body> |
| 159 | </subsection> |
179 | </subsection> |
| 160 | </section> |
180 | </section> |
| … | |
… | |
| 171 | </pre> |
191 | </pre> |
| 172 | |
192 | |
| 173 | <p> |
193 | <p> |
| 174 | First delete the partitions you have cleared previously to make room for your |
194 | First delete the partitions you have cleared previously to make room for your |
| 175 | Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). |
195 | Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). |
| 176 | It will ask for the partition number to delete. |
196 | It will ask for the partition number to delete. Usually the first partition on |
|
|
197 | NewWorld machines (Apple_partition_map) could not be deleted. |
| 177 | </p> |
198 | </p> |
| 178 | |
199 | |
| 179 | <p> |
200 | <p> |
| 180 | Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will |
201 | Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will |
| 181 | ask for what block you want to start. Enter the number of your first free |
202 | ask for what block you want to start. Enter the number of your first free |
| 182 | partition, followed by a <c>p</c>. For instance this is <c>1p</c>. |
203 | partition, followed by a <c>p</c>. For instance this is <c>2p</c>. |
| 183 | </p> |
204 | </p> |
| 184 | |
205 | |
| 185 | <note> |
206 | <note> |
| 186 | This partition is <e>not</e> a "boot" partition. It is not used by Linux at all; |
207 | This partition is <e>not</e> a "boot" partition. It is not used by Linux at all; |
| 187 | you don't have to place any filesystem on it and you should never mount it. PPC |
208 | you don't have to place any filesystem on it and you should never mount it. PPC |
| 188 | users don't need a an extra partition for <path>/boot</path>. |
209 | users don't need an extra partition for <path>/boot</path>. |
| 189 | </note> |
210 | </note> |
| 190 | |
211 | |
| 191 | <p> |
212 | <p> |
| 192 | Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will |
213 | Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will |
| 193 | ask for what block you want to start this partition from. As we used <c>1</c> |
214 | ask for what block you want to start this partition from. As we used <c>2</c> |
| 194 | before to create the Apple_Bootstrap partition, you now have to enter |
215 | before to create the Apple_Bootstrap partition, you now have to enter |
| 195 | <c>2p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size |
216 | <c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size |
| 196 | you want -- 512MB is recommended though). When asked for a name, enter <c>swap</c> |
217 | you want -- 512MB is recommended though). When asked for a name, enter <c>swap</c> |
| 197 | (mandatory). |
218 | (mandatory). |
| 198 | </p> |
219 | </p> |
| 199 | |
220 | |
| 200 | <p> |
221 | <p> |
| 201 | To create the root partition, enter <c>c</c>, followed by <c>3p</c> to select |
222 | To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select |
| 202 | from what block the root partition should start. When asked for the size, enter |
223 | from what block the root partition should start. When asked for the size, enter |
| 203 | <c>3p</c> again. <c>mac-fdisk</c> will interpret this as "Use all available |
224 | <c>4p</c> again. <c>mac-fdisk</c> will interpret this as "Use all available |
| 204 | space". When asked for the name, enter <c>root</c> (mandatory). |
225 | space". When asked for the name, enter <c>root</c> (mandatory). |
| 205 | </p> |
226 | </p> |
| 206 | |
227 | |
| 207 | <p> |
228 | <p> |
| 208 | To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to |
229 | To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to |
| 209 | quit <c>mac-fdisk</c>. |
230 | quit <c>mac-fdisk</c>. |
| 210 | </p> |
231 | </p> |
| 211 | |
232 | |
|
|
233 | <note> |
|
|
234 | To make sure everything is ok, you should run mac-fdisk once more and check |
|
|
235 | whether all the partitions are there. If you don't see any of the partitions |
|
|
236 | you created, or the changes you made, you should reinitialize your partitions |
|
|
237 | by pressing "i" in mac-fdisk. Note that this will recreate the partition map |
|
|
238 | and thus remove all your partitions. |
|
|
239 | </note> |
|
|
240 | |
| 212 | <p> |
241 | <p> |
| 213 | Now that your partitions are created, you can now continue with <uri |
242 | Now that your partitions are created, you can continue with <uri |
| 214 | link="#filesystems">Creating Filesystems</uri>. |
243 | link="#filesystems">Creating Filesystems</uri>. |
| 215 | </p> |
244 | </p> |
| 216 | |
245 | |
| 217 | </body> |
246 | </body> |
| 218 | </section> |
247 | </section> |
| 219 | <section id="parted"> |
248 | <section id="parted"> |
| 220 | <title>Using parted (Pegasos) to Partition your Disk</title> |
249 | <title>Using parted (especially Pegasos) to Partition your Disk</title> |
| 221 | <body> |
250 | <body> |
|
|
251 | |
|
|
252 | <p> |
|
|
253 | <c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by |
|
|
254 | Mac OS and Mac OS X. With this tool you can shrink your Mac-partitions and |
|
|
255 | create space for your Linux partitions. Nevertheless, the example below |
|
|
256 | describes partitioning for Pegasos machines only. |
|
|
257 | </p> |
| 222 | |
258 | |
| 223 | <p> |
259 | <p> |
| 224 | To begin let's fire up <c>parted</c>: |
260 | To begin let's fire up <c>parted</c>: |
| 225 | </p> |
261 | </p> |
| 226 | |
262 | |
| … | |
… | |
| 241 | </p> |
277 | </p> |
| 242 | |
278 | |
| 243 | <p> |
279 | <p> |
| 244 | If you intend to also install MorphOS on your Pegasos create an affs1 filesystem |
280 | If you intend to also install MorphOS on your Pegasos create an affs1 filesystem |
| 245 | named "BI0" (BI zero) at the start of the drive. 50MB should be more than enough |
281 | named "BI0" (BI zero) at the start of the drive. 50MB should be more than enough |
| 246 | to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs, |
282 | to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs or |
| 247 | xfs or jfs you will also have to store your Linux kernel on this partition (the |
283 | xfs, you will also have to store your Linux kernel on this partition (the |
| 248 | Pegasos II can boot from ext2/ext3 drives). To create the partition run |
284 | Pegasos II can boot from ext2/ext3 drives). To create the partition run |
| 249 | <c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should |
285 | <c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should |
| 250 | be replaced with the megabyte range (f.i. <c>5 55</c> creates a 50 MB partition |
286 | be replaced with the megabyte range (e.g. <c>5 55</c> creates a 50 MB partition |
| 251 | starting at 5MB and ending at 55MB. |
287 | starting at 5MB and ending at 55MB. |
| 252 | </p> |
288 | </p> |
| 253 | |
289 | |
| 254 | <p> |
290 | <p> |
| 255 | You need to create two partitions for Linux, one root filesystem for all your |
291 | You need to create two partitions for Linux, one root filesystem for all your |
| 256 | program files etc, and one swap partition. To create the root filesystem you |
292 | program files etc, and one swap partition. To create the root filesystem you |
| 257 | must first decide which filesystem to use. Possible options are ext2, ext3, |
293 | must first decide which filesystem to use. Possible options are ext2, ext3, |
| 258 | reiserfs, jfs and xfs. Unless you know what you are doing, use ext3. Run |
294 | reiserfs and xfs. Unless you know what you are doing, use ext3. Run |
| 259 | <c>mkpart primary ext3 START END</c> to create an ext3 partition. Again, replace |
295 | <c>mkpart primary ext3 START END</c> to create an ext3 partition. Again, replace |
| 260 | <c>START</c> and <c>END</c> with the megabyte start and stop marks for the |
296 | <c>START</c> and <c>END</c> with the megabyte start and stop marks for the |
| 261 | partition. |
297 | partition. |
| 262 | </p> |
298 | </p> |
| 263 | |
299 | |
| … | |
… | |
| 269 | partition, run <c>mkpart primary linux-swap START END</c>. |
305 | partition, run <c>mkpart primary linux-swap START END</c>. |
| 270 | </p> |
306 | </p> |
| 271 | |
307 | |
| 272 | <p> |
308 | <p> |
| 273 | Write down the partition minor numbers as they are required during the |
309 | Write down the partition minor numbers as they are required during the |
| 274 | installation process. To dislay the minor numbers run <c>print</c>. Your drives |
310 | installation process. To display the minor numbers run <c>print</c>. Your drives |
| 275 | are accessed as <path>/dev/hdaX</path> where X is replaced with the minor number |
311 | are accessed as <path>/dev/hdaX</path> where X is replaced with the minor number |
| 276 | of the partition. |
312 | of the partition. |
| 277 | </p> |
313 | </p> |
| 278 | |
314 | |
| 279 | <p> |
315 | <p> |
| … | |
… | |
| 301 | <subsection> |
337 | <subsection> |
| 302 | <title>Filesystems?</title> |
338 | <title>Filesystems?</title> |
| 303 | <body> |
339 | <body> |
| 304 | |
340 | |
| 305 | <p> |
341 | <p> |
| 306 | Several filesystems are available. Ext2 and ext3 are found stable on the |
342 | Several filesystems are available. ext2, ext3, ReiserFS and XFS are found stable |
| 307 | PPC architecture, reiserfs and xfs are in experimental stage. jfs is |
343 | on the PPC architecture. jfs is unsupported. |
| 308 | unsupported. |
|
|
| 309 | </p> |
344 | </p> |
| 310 | |
345 | |
| 311 | <p> |
346 | <p> |
| 312 | <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata |
347 | <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata |
| 313 | journaling, which means that routine ext2 filesystem checks at startup time can |
348 | journaling, which means that routine ext2 filesystem checks at startup time can |
| … | |
… | |
| 336 | as the creation of large filesystems, the use of many small files, very large |
371 | as the creation of large filesystems, the use of many small files, very large |
| 337 | files and directories containing tens of thousands of files. |
372 | files and directories containing tens of thousands of files. |
| 338 | </p> |
373 | </p> |
| 339 | |
374 | |
| 340 | <p> |
375 | <p> |
| 341 | <b>XFS</b> is a filesystem with metadata journaling that is fully supported |
376 | <b>XFS</b> is a filesystem with metadata journaling which comes with a robust |
| 342 | under Gentoo Linux's xfs-sources kernel. It comes with a robust feature-set and |
|
|
| 343 | is optimized for scalability. We only recommend using this filesystem on Linux |
377 | feature-set and is optimized for scalability. We only recommend using this |
| 344 | systems with high-end SCSI and/or fibre channel storage and a uninterruptible |
378 | filesystem on Linux systems with high-end SCSI and/or fibre channel storage and |
| 345 | power supply. Because XFS aggressively caches in-transit data in RAM, improperly |
379 | an uninterruptible power supply. Because XFS aggressively caches in-transit data |
| 346 | designed programs (those that don't take proper precautions when writing files |
380 | in RAM, improperly designed programs (those that don't take proper precautions |
| 347 | to disk and there are quite a few of them) can lose a good deal of data if the |
381 | when writing files to disk and there are quite a few of them) can lose a good |
| 348 | system goes down unexpectedly. |
382 | deal of data if the system goes down unexpectedly. |
| 349 | </p> |
|
|
| 350 | |
|
|
| 351 | <p> |
|
|
| 352 | <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently |
|
|
| 353 | become production-ready and there hasn't been a sufficient track record to |
|
|
| 354 | comment positively nor negatively on its general stability at this point. |
|
|
| 355 | </p> |
383 | </p> |
| 356 | |
384 | |
| 357 | </body> |
385 | </body> |
| 358 | </subsection> |
386 | </subsection> |
| 359 | <subsection id="filesystems-apply"> |
387 | <subsection id="filesystems-apply"> |
| … | |
… | |
| 384 | </tr> |
412 | </tr> |
| 385 | <tr> |
413 | <tr> |
| 386 | <ti>xfs</ti> |
414 | <ti>xfs</ti> |
| 387 | <ti><c>mkfs.xfs</c></ti> |
415 | <ti><c>mkfs.xfs</c></ti> |
| 388 | </tr> |
416 | </tr> |
| 389 | <tr> |
|
|
| 390 | <ti>jfs</ti> |
|
|
| 391 | <ti><c>mkfs.jfs</c></ti> |
|
|
| 392 | </tr> |
|
|
| 393 | </table> |
417 | </table> |
| 394 | |
418 | |
| 395 | <p> |
419 | <p> |
| 396 | For instance, to have the root partition (<path>/dev/hda3</path> in our example) |
420 | For instance, to have the root partition (<path>/dev/hda4</path> in our example) |
| 397 | in ext3 (as in our example), you would use: |
421 | in ext3 (as in our example), you would use: |
| 398 | </p> |
422 | </p> |
| 399 | |
423 | |
| 400 | <pre caption="Applying a filesystem on a partition"> |
424 | <pre caption="Applying a filesystem on a partition"> |
| 401 | # <i>mke2fs -j /dev/hda3</i> |
425 | # <i>mke2fs -j /dev/hda4</i> |
| 402 | </pre> |
426 | </pre> |
| 403 | |
427 | |
| 404 | <p> |
428 | <p> |
| 405 | Now create the filesystems on your newly created partitions (or logical |
429 | Now create the filesystems on your newly created partitions (or logical |
| 406 | volumes). |
430 | volumes). |
| 407 | </p> |
431 | </p> |
| 408 | |
432 | |
|
|
433 | <note> |
|
|
434 | On OldWorld machines and the PegasosII your partition which holds the kernel must |
|
|
435 | be ext2 or ext3. NewWorld machines can boot from any of ext2, ext3, XFS, |
|
|
436 | ReiserFS or even HFS/HFS+ filesystems. |
|
|
437 | </note> |
|
|
438 | |
| 409 | </body> |
439 | </body> |
| 410 | </subsection> |
440 | </subsection> |
| 411 | <subsection> |
441 | <subsection> |
| 412 | <title>Activating the Swap Partition</title> |
442 | <title>Activating the Swap Partition</title> |
| 413 | <body> |
443 | <body> |
| … | |
… | |
| 415 | <p> |
445 | <p> |
| 416 | <c>mkswap</c> is the command that is used to initialize swap partitions: |
446 | <c>mkswap</c> is the command that is used to initialize swap partitions: |
| 417 | </p> |
447 | </p> |
| 418 | |
448 | |
| 419 | <pre caption="Creating a Swap signature"> |
449 | <pre caption="Creating a Swap signature"> |
| 420 | # <i>mkswap /dev/hda2</i> |
450 | # <i>mkswap /dev/hda3</i> |
| 421 | </pre> |
451 | </pre> |
| 422 | |
452 | |
| 423 | <p> |
453 | <p> |
| 424 | To activate the swap partition, use <c>swapon</c>: |
454 | To activate the swap partition, use <c>swapon</c>: |
| 425 | </p> |
455 | </p> |
| 426 | |
456 | |
| 427 | <pre caption="Activating the swap partition"> |
457 | <pre caption="Activating the swap partition"> |
| 428 | # <i>swapon /dev/hda2</i> |
458 | # <i>swapon /dev/hda3</i> |
| 429 | </pre> |
459 | </pre> |
| 430 | |
460 | |
| 431 | <p> |
461 | <p> |
| 432 | Create and activate the swap now. |
462 | Create and activate the swap now. |
| 433 | </p> |
463 | </p> |
| … | |
… | |
| 441 | |
471 | |
| 442 | <p> |
472 | <p> |
| 443 | Now that your partitions are initialized and are housing a filesystem, it is |
473 | Now that your partitions are initialized and are housing a filesystem, it is |
| 444 | time to mount those partitions. Use the <c>mount</c> command. Don't forget to |
474 | time to mount those partitions. Use the <c>mount</c> command. Don't forget to |
| 445 | create the necessary mount directories for every partition you created. As an |
475 | create the necessary mount directories for every partition you created. As an |
| 446 | example we create a mount-point and mount the root and boot partition: |
476 | example we create a mount-point and mount the root partition: |
| 447 | </p> |
477 | </p> |
| 448 | |
478 | |
| 449 | <pre caption="Mounting partitions"> |
479 | <pre caption="Mounting partitions"> |
| 450 | # <i>mkdir /mnt/gentoo</i> |
480 | # <i>mkdir /mnt/gentoo</i> |
| 451 | # <i>mount /dev/hda3 /mnt/gentoo</i> |
481 | # <i>mount /dev/hda4 /mnt/gentoo</i> |
| 452 | </pre> |
482 | </pre> |
| 453 | |
483 | |
| 454 | <note> |
484 | <note> |
| 455 | If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
485 | If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
| 456 | change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This |
486 | change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This |
| 457 | also holds for <path>/var/tmp</path>. |
487 | also holds for <path>/var/tmp</path>. |
| 458 | </note> |
488 | </note> |
| 459 | |
489 | |
| 460 | <p> |
490 | <p> |
| 461 | We also need to mount the proc filesystem (a virtual interface with the kernel) |
|
|
| 462 | on <path>/proc</path>. We first create the <path>/mnt/gentoo/proc</path> |
|
|
| 463 | mountpoint and then mount the filesystem: |
|
|
| 464 | </p> |
|
|
| 465 | |
|
|
| 466 | <pre caption="Creating the /mnt/gentoo/proc mountpoint"> |
|
|
| 467 | # <i>mkdir /mnt/gentoo/proc</i> |
|
|
| 468 | # <i>mount -t proc none /mnt/gentoo/proc</i> |
|
|
| 469 | </pre> |
|
|
| 470 | |
|
|
| 471 | <p> |
|
|
| 472 | Finally we have to create the <path>/dev</path> files in our new home, which is |
491 | Finally we have to create the <path>/dev</path> files in our new home, which is |
| 473 | needed during the bootloader installation. This could be done by "bind"-mapping |
492 | needed during the bootloader installation. This could be done by "bind"-mapping |
| 474 | the <path>/dev</path>-filesystem from the LiveCD: |
493 | the <path>/dev</path>-filesystem from the LiveCD: |
| 475 | </p> |
494 | </p> |
| 476 | |
495 | |
| … | |
… | |
| 478 | # <i>mkdir /mnt/gentoo/dev</i> |
497 | # <i>mkdir /mnt/gentoo/dev</i> |
| 479 | # <i>mount -o bind /dev /mnt/gentoo/dev</i> |
498 | # <i>mount -o bind /dev /mnt/gentoo/dev</i> |
| 480 | </pre> |
499 | </pre> |
| 481 | |
500 | |
| 482 | <p> |
501 | <p> |
|
|
502 | We will also have to mount the proc filesystem (a virtual interface with the |
|
|
503 | kernel) on <path>/proc</path>. But first we will need to place our files on the |
|
|
504 | partitions. |
|
|
505 | </p> |
|
|
506 | |
|
|
507 | <p> |
| 483 | Now continue with <uri link="?part=1&chap=5">Installing the Gentoo |
508 | Continue with <uri link="?part=1&chap=5">Installing the Gentoo |
| 484 | Installation Files</uri>. |
509 | Installation Files</uri>. |
| 485 | </p> |
510 | </p> |
| 486 | |
511 | |
| 487 | </body> |
512 | </body> |
| 488 | </section> |
513 | </section> |