… | |
… | |
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-ppc-disk.xml,v 1.35 2006/07/25 18:01:45 josejx Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.36 2006/08/30 22:52:28 nightmorph Exp $ --> |
8 | |
8 | |
9 | <sections> |
9 | <sections> |
10 | |
10 | |
11 | <version>2.6</version> |
11 | <version>7.0</version> |
12 | <date>2006-07-25</date> |
12 | <date>2006-08-30</date> |
13 | |
13 | |
14 | <section> |
14 | <section> |
15 | <title>Introduction to Block Devices</title> |
15 | <title>Introduction to Block Devices</title> |
16 | <subsection> |
16 | <subsection> |
17 | <title>Block Devices</title> |
17 | <title>Block Devices</title> |
… | |
… | |
91 | <ti>32k</ti> |
91 | <ti>32k</ti> |
92 | <ti>Apple_partition_map</ti> |
92 | <ti>Apple_partition_map</ti> |
93 | </tr> |
93 | </tr> |
94 | <tr> |
94 | <tr> |
95 | <ti><path>/dev/hda2</path></ti> |
95 | <ti><path>/dev/hda2</path></ti> |
96 | <ti>(Not applicable)</ti> |
96 | <ti>(Not needed)</ti> |
97 | <ti>(Not applicable)</ti> |
97 | <ti>(Not applicable)</ti> |
98 | <ti>(Not applicable)</ti> |
98 | <ti>(Not applicable)</ti> |
99 | <ti>(bootstrap)</ti> |
99 | <ti>(bootstrap)</ti> |
100 | <ti>800k</ti> |
100 | <ti>800k</ti> |
101 | <ti>Apple_Bootstrap</ti> |
101 | <ti>Apple_Bootstrap</ti> |
… | |
… | |
118 | <ti>32MB</ti> |
118 | <ti>32MB</ti> |
119 | <ti>Boot partition</ti> |
119 | <ti>Boot partition</ti> |
120 | </tr> |
120 | </tr> |
121 | <tr> |
121 | <tr> |
122 | <ti><path>/dev/hda3</path></ti> |
122 | <ti><path>/dev/hda3</path></ti> |
123 | <ti><path>/dev/hda2</path>(<path>/dev/hda3</path> if using quik)</ti> |
123 | <ti><path>/dev/hda2</path> (<path>/dev/hda3</path> if using quik)</ti> |
124 | <ti><path>/dev/hda2</path></ti> |
124 | <ti><path>/dev/hda2</path></ti> |
125 | <ti><path>/dev/sda2</path></ti> |
125 | <ti><path>/dev/sda2</path></ti> |
126 | <ti>(swap)</ti> |
126 | <ti>(swap)</ti> |
127 | <ti>512M</ti> |
127 | <ti>512M</ti> |
128 | <ti>Swap partition, Type 0x82</ti> |
128 | <ti>Swap partition, Type 0x82</ti> |
… | |
… | |
137 | <ti>Root partition, Type 0x83</ti> |
137 | <ti>Root partition, Type 0x83</ti> |
138 | </tr> |
138 | </tr> |
139 | </table> |
139 | </table> |
140 | |
140 | |
141 | <note> |
141 | <note> |
142 | There are some partitions named: <path>Apple_Driver43, Apple_Driver_ATA, |
142 | There are some partitions named: <path>Apple_Driver63, Apple_Driver_ATA, |
143 | Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches</path>. If you are not |
143 | Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches</path>. If you are not |
144 | planning to use MacOS 9 you can delete them, because MacOS X and Linux don't |
144 | planning to use MacOS 9 you can delete them, because MacOS X and Linux don't |
145 | need them. To delete them, either use parted or erase the whole disk by |
145 | need them. To delete them, either use parted or erase the whole disk by |
146 | initializing the partition map. |
146 | initializing the partition map. |
147 | </note> |
147 | </note> |
148 | |
148 | |
149 | <warn> |
149 | <warn> |
150 | <c>parted</c> is able to resize partitions including HFS+. Unfortunately it is |
150 | <c>parted</c> is able to resize partitions including HFS+. Unfortunately it is |
151 | not possible to resize HFS+ journaled filesystems, so switch off journaling in |
151 | not possible to resize HFS+ journaled filesystems, so switch off journaling in |
152 | Mac OS X before resizing. Remeber that any resizing operation is dangerous, |
152 | Mac OS X before resizing. Remember that any resizing operation is dangerous, |
153 | so attempt at your own risk! Be sure to always have a backup of your data |
153 | so attempt at your own risk! Be sure to always have a backup of your data |
154 | before resizing! |
154 | before resizing! |
155 | </warn> |
155 | </warn> |
156 | |
156 | |
157 | <p> |
157 | <p> |
158 | If you are interested in knowing how big a partition should be, or even how many |
158 | If you are interested in knowing how big a partition should be, or even how many |
159 | partitions you need, read on. Otherwise continue now with |
159 | partitions you need, read on. Otherwise continue now with |
160 | <uri link="#mac-fdisk"> Default: Using mac-fdisk (Apple) to Partition your Disk |
160 | <uri link="#mac-fdisk"> Default: Using mac-fdisk (Apple) to Partition your Disk |
161 | </uri> or <uri link="#parted">Alternative: Using parted (IBM/Pegasos) to |
161 | </uri> or <uri link="#parted">Alternative: Using parted (IBM/Pegasos) to |
… | |
… | |
172 | The number of partitions is highly dependent on your environment. For instance, |
172 | The number of partitions is highly dependent on your environment. For instance, |
173 | if you have lots of users, you will most likely want to have your |
173 | if you have lots of users, you will most likely want to have your |
174 | <path>/home</path> separate as it increases security and makes backups easier. |
174 | <path>/home</path> separate as it increases security and makes backups easier. |
175 | If you are installing Gentoo to perform as a mailserver, your <path>/var</path> |
175 | If you are installing Gentoo to perform as a mailserver, your <path>/var</path> |
176 | should be separate as all mails are stored inside <path>/var</path>. A good |
176 | should be separate as all mails are stored inside <path>/var</path>. A good |
177 | choice of filesystem will then maximize your performance. Gameservers will have |
177 | choice of filesystem will then maximise your performance. Gameservers will have |
178 | a separate <path>/opt</path> as most gaming servers are installed there. The |
178 | a separate <path>/opt</path> as most gaming servers are installed there. The |
179 | reason is similar for <path>/home</path>: security and backups. You will |
179 | reason is similar for <path>/home</path>: security and backups. You will |
180 | definitely want to keep <path>/usr</path> big: not only will it contain the |
180 | definitely want to keep <path>/usr</path> big: not only will it contain the |
181 | majority of applications, the Portage tree alone takes around 500 MB |
181 | majority of applications, the Portage tree alone takes around 500 Mbyte |
182 | excluding the various sources that are stored in it. |
182 | excluding the various sources that are stored in it. |
183 | </p> |
183 | </p> |
184 | |
184 | |
185 | <p> |
185 | <p> |
186 | As you can see, it very much depends on what you want to achieve. Separate |
186 | As you can see, it very much depends on what you want to achieve. Separate |
… | |
… | |
229 | </pre> |
229 | </pre> |
230 | |
230 | |
231 | <p> |
231 | <p> |
232 | First delete the partitions you have cleared previously to make room for your |
232 | First delete the partitions you have cleared previously to make room for your |
233 | Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). |
233 | Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). |
234 | It will ask for the partition number to delete. The first partition on Apple |
234 | It will ask for the partition number to delete. Usually the first partition on |
235 | machines (Apple_partition_map) can not be deleted. |
235 | NewWorld machines (Apple_partition_map) could not be deleted. |
236 | </p> |
|
|
237 | |
|
|
238 | <p> |
236 | </p> |
|
|
237 | |
|
|
238 | <p> |
239 | On NewWorld Macs, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. |
239 | Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will |
240 | It will ask for what block you want to start. Enter the number of your first |
240 | ask for what block you want to start. Enter the number of your first free |
241 | free partition, followed by a <c>p</c>. For instance this is <c>2p</c>. |
241 | partition, followed by a <c>p</c>. For instance this is <c>2p</c>. |
242 | </p> |
242 | </p> |
243 | |
243 | |
244 | <note> |
244 | <note> |
245 | This partition is <e>not</e> a <path>/boot</path> partition. It is not used by |
245 | This partition is <e>not</e> a <path>/boot</path> partition. It is not used by |
246 | Linux at all; you don't have to place any filesystem on it and you should never |
246 | Linux at all; you don't have to place any filesystem on it and you should never |
… | |
… | |
250 | <p> |
250 | <p> |
251 | Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will |
251 | Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will |
252 | ask for what block you want to start this partition from. As we used <c>2</c> |
252 | ask for what block you want to start this partition from. As we used <c>2</c> |
253 | before to create the Apple_Bootstrap partition, you now have to enter |
253 | before to create the Apple_Bootstrap partition, you now have to enter |
254 | <c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size |
254 | <c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size |
255 | you want -- 512MB is recommended though). When asked for a name, enter |
255 | you want -- 512MB is recommended though). When asked for a name, enter <c>swap</c> |
256 | <c>swap</c> (mandatory). |
256 | (mandatory). |
257 | </p> |
257 | </p> |
258 | |
258 | |
259 | <p> |
259 | <p> |
260 | To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select |
260 | To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select |
261 | from what block the root partition should start. When asked for the size, enter |
261 | from what block the root partition should start. When asked for the size, enter |
… | |
… | |
282 | </p> |
282 | </p> |
283 | |
283 | |
284 | </body> |
284 | </body> |
285 | </section> |
285 | </section> |
286 | <section id="parted"> |
286 | <section id="parted"> |
287 | <title>Using parted (Mostly Pegasos) to Partition your Disk</title> |
287 | <title>Using parted (especially Pegasos) to Partition your Disk</title> |
288 | <body> |
288 | <body> |
289 | |
289 | |
290 | <p> |
290 | <p> |
291 | <c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by |
291 | <c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by |
292 | Mac OS and Mac OS X. With this tool you can resize your Mac-partitions and |
292 | Mac OS and Mac OS X. With this tool you can resize your Mac-partitions and |
… | |
… | |
301 | <pre caption="Starting parted"> |
301 | <pre caption="Starting parted"> |
302 | # <i>parted /dev/hda</i> |
302 | # <i>parted /dev/hda</i> |
303 | </pre> |
303 | </pre> |
304 | |
304 | |
305 | <p> |
305 | <p> |
306 | If the drive isn't partitioned, run <c>mklabel amiga</c> to create a new |
306 | If the drive is unpartitioned, run <c>mklabel amiga</c> to create a new |
307 | disklabel for the drive. |
307 | disklabel for the drive. |
308 | </p> |
308 | </p> |
309 | |
309 | |
310 | <p> |
310 | <p> |
311 | You can type <c>print</c> at any time in parted to display the current partition |
311 | You can type <c>print</c> at any time in parted to display the current partition |
… | |
… | |
314 | </p> |
314 | </p> |
315 | |
315 | |
316 | <p> |
316 | <p> |
317 | If you intend to also install MorphOS on your Pegasos create an affs1 filesystem |
317 | If you intend to also install MorphOS on your Pegasos create an affs1 filesystem |
318 | named "BI0" (BI zero) at the start of the drive. 32MB should be more than enough |
318 | named "BI0" (BI zero) at the start of the drive. 32MB should be more than enough |
319 | to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs |
319 | to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs or |
320 | or xfs, you will also have to store your Linux kernel on this partition (the |
320 | xfs, you will also have to store your Linux kernel on this partition (the |
321 | Pegasos II can only boot from ext2/ext3 or affs1 partitions). To create the partition run |
321 | Pegasos II can only boot from ext2/ext3 or affs1 partitions). To create the partition run |
322 | <c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should |
322 | <c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should |
323 | be replaced with the megabyte range (e.g. <c>0 32</c> creates a 32 MB partition |
323 | be replaced with the megabyte range (e.g. <c>0 32</c> creates a 32 MB partition |
324 | starting at 0MB and ending at 32MB. |
324 | starting at 0MB and ending at 32MB. |
325 | </p> |
325 | </p> |
… | |
… | |
392 | |
392 | |
393 | <p> |
393 | <p> |
394 | <b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata |
394 | <b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata |
395 | journaling for fast recovery in addition to other enhanced journaling modes like |
395 | journaling for fast recovery in addition to other enhanced journaling modes like |
396 | full data and ordered data journaling. ext3 is a very good and reliable |
396 | full data and ordered data journaling. ext3 is a very good and reliable |
397 | filesystem. It has an additional hashed b-tree indexing option that enables |
397 | filesystem. |
398 | high performance in almost all situations. You can enable this indexing by |
|
|
399 | adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an |
|
|
400 | excellent filesystem. |
|
|
401 | </p> |
398 | </p> |
402 | |
399 | |
403 | <p> |
400 | <p> |
404 | <b>ReiserFS</b> is a B*-tree based filesystem that has very good overall |
401 | <b>ReiserFS</b> is a B*-tree based filesystem that has very good overall |
405 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
402 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
… | |
… | |
467 | Now create the filesystems on your newly created partitions (or logical |
464 | Now create the filesystems on your newly created partitions (or logical |
468 | volumes). |
465 | volumes). |
469 | </p> |
466 | </p> |
470 | |
467 | |
471 | <note> |
468 | <note> |
472 | On the PegasosII your partition which holds the kernel must be ext2 or ext3. |
469 | On the PegasosII your partition which holds the kernel must be ext2/ext3 or |
473 | NewWorld machines can boot from any of ext2, ext3, XFS, ReiserFS or even |
470 | affs1. NewWorld machines can boot from any of ext2, ext3, XFS, ReiserFS or |
474 | HFS/HFS+ filesystems. On OldWorld machines booting with BootX, the kernel must |
471 | even HFS/HFS+ filesystems. On OldWorld machines booting with BootX, the kernel |
475 | be placed on an HFS partition, but this will be completed when you configure |
472 | must be placed on an HFS partition, but this will be completed when you |
476 | your bootloader. |
473 | configure your bootloader. |
477 | </note> |
474 | </note> |
478 | |
475 | |
479 | </body> |
476 | </body> |
480 | </subsection> |
477 | </subsection> |
481 | <subsection> |
478 | <subsection> |
… | |
… | |
509 | <title>Mounting</title> |
506 | <title>Mounting</title> |
510 | <body> |
507 | <body> |
511 | |
508 | |
512 | <p> |
509 | <p> |
513 | Now that your partitions are initialized and are housing a filesystem, it is |
510 | Now that your partitions are initialized and are housing a filesystem, it is |
514 | time to mount those partitions. Use the <c>mount</c> command. Don't forget to |
511 | time to mount those partitions. Use the <c>mount</c> command. As an example we |
515 | create the necessary mount directories for every partition you created. As an |
512 | mount the root partition: |
516 | example we create a mount-point and mount the root partition: |
|
|
517 | </p> |
513 | </p> |
518 | |
514 | |
519 | <pre caption="Mounting partitions"> |
515 | <pre caption="Mounting partitions"> |
520 | # <i>mkdir /mnt/gentoo</i> |
|
|
521 | # <i>mount /dev/hda4 /mnt/gentoo</i> |
516 | # <i>mount /dev/hda4 /mnt/gentoo</i> |
522 | </pre> |
517 | </pre> |
523 | |
518 | |
524 | <note> |
519 | <note> |
525 | If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
520 | If you want your <path>/tmp</path> to reside on a separate partition, be sure to |