| … | |
… | |
| 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.30 2005/08/02 08:03:53 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.31 2005/08/09 09:43:58 swift Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <version>2.2</version> |
11 | <version>2.3</version> |
| 12 | <date>2005-08-02</date> |
12 | <date>2005-08-09</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> |
| … | |
… | |
| 41 | </p> |
41 | </p> |
| 42 | |
42 | |
| 43 | </body> |
43 | </body> |
| 44 | </subsection> |
44 | </subsection> |
| 45 | <subsection> |
45 | <subsection> |
| 46 | <title>Partitions and Slices</title> |
46 | <title>Partitions</title> |
| 47 | <body> |
47 | <body> |
| 48 | |
48 | |
| 49 | <p> |
49 | <p> |
| 50 | Although it is theoretically possible to use a full disk to house your Linux |
50 | Although it is theoretically possible to use a full disk to house your Linux |
| 51 | system, this is almost never done in practice. Instead, full disk block devices |
51 | system, this is almost never done in practice. Instead, full disk block devices |
| 52 | are split up in smaller, more manageable block devices. On most systems, |
52 | are split up in smaller, more manageable block devices. On most systems, |
| 53 | these are called <e>partitions</e>. Other architectures use a similar technique, |
53 | these are called <e>partitions</e>. |
| 54 | called <e>slices</e>. |
|
|
| 55 | </p> |
54 | </p> |
| 56 | |
55 | |
| 57 | </body> |
56 | </body> |
| 58 | </subsection> |
57 | </subsection> |
| 59 | </section> |
58 | </section> |
| … | |
… | |
| 87 | <ti>32k</ti> |
86 | <ti>32k</ti> |
| 88 | <ti>Apple_partition_map</ti> |
87 | <ti>Apple_partition_map</ti> |
| 89 | </tr> |
88 | </tr> |
| 90 | <tr> |
89 | <tr> |
| 91 | <ti><path>/dev/hda2</path></ti> |
90 | <ti><path>/dev/hda2</path></ti> |
| 92 | <ti>(Not needed)</ti> |
91 | <ti>(Not applicable)</ti> |
| 93 | <ti>(Not applicable)</ti> |
92 | <ti>(Not applicable)</ti> |
| 94 | <ti>(Not applicable)</ti> |
93 | <ti>(Not applicable)</ti> |
| 95 | <ti>(bootstrap)</ti> |
94 | <ti>(bootstrap)</ti> |
| 96 | <ti>800k</ti> |
95 | <ti>800k</ti> |
| 97 | <ti>Apple_Bootstrap</ti> |
96 | <ti>Apple_Bootstrap</ti> |
| … | |
… | |
| 104 | <ti>(PReP Boot)</ti> |
103 | <ti>(PReP Boot)</ti> |
| 105 | <ti>800k</ti> |
104 | <ti>800k</ti> |
| 106 | <ti>Type 0x41</ti> |
105 | <ti>Type 0x41</ti> |
| 107 | </tr> |
106 | </tr> |
| 108 | <tr> |
107 | <tr> |
| 109 | <ti>(Not needed)</ti> |
108 | <ti>(Not applicable)</ti> |
| 110 | <ti>(Not needed)</ti> |
109 | <ti><path>/dev/hda2</path> (If using quik)</ti> |
| 111 | <ti><path>/dev/hda1</path></ti> |
110 | <ti><path>/dev/hda1</path></ti> |
| 112 | <ti>(Not needed)</ti> |
111 | <ti>(Not needed)</ti> |
| 113 | <ti>ext2</ti> |
112 | <ti>ext2</ti> |
| 114 | <ti>32MB</ti> |
113 | <ti>32MB</ti> |
| 115 | <ti>Boot partition</ti> |
114 | <ti>Boot partition</ti> |
| 116 | </tr> |
115 | </tr> |
| 117 | <tr> |
116 | <tr> |
| 118 | <ti><path>/dev/hda3</path></ti> |
117 | <ti><path>/dev/hda3</path></ti> |
| 119 | <ti><path>/dev/hda2</path></ti> |
118 | <ti><path>/dev/hda2</path>(<path>/dev/hda3</path> if using quik)</ti> |
| 120 | <ti><path>/dev/hda2</path></ti> |
119 | <ti><path>/dev/hda2</path></ti> |
| 121 | <ti><path>/dev/sda2</path></ti> |
120 | <ti><path>/dev/sda2</path></ti> |
| 122 | <ti>(swap)</ti> |
121 | <ti>(swap)</ti> |
| 123 | <ti>512M</ti> |
122 | <ti>512M</ti> |
| 124 | <ti>Swap partition, Type 0x82</ti> |
123 | <ti>Swap partition, Type 0x82</ti> |
| 125 | </tr> |
124 | </tr> |
| 126 | <tr> |
125 | <tr> |
| 127 | <ti><path>/dev/hda4</path></ti> |
126 | <ti><path>/dev/hda4</path></ti> |
| 128 | <ti><path>/dev/hda3</path></ti> |
127 | <ti><path>/dev/hda3</path> (<path>/dev/hda4</path> if using quik)</ti> |
| 129 | <ti><path>/dev/hda3</path></ti> |
128 | <ti><path>/dev/hda3</path></ti> |
| 130 | <ti><path>/dev/sda3</path></ti> |
129 | <ti><path>/dev/sda3</path></ti> |
| 131 | <ti>ext3, xfs</ti> |
130 | <ti>ext3, xfs</ti> |
| 132 | <ti>Rest of the disk</ti> |
131 | <ti>Rest of the disk</ti> |
| 133 | <ti>Root partition, Type 0x83</ti> |
132 | <ti>Root partition, Type 0x83</ti> |
| 134 | </tr> |
133 | </tr> |
| 135 | </table> |
134 | </table> |
| 136 | |
135 | |
| 137 | <note> |
136 | <note> |
| 138 | There are some partitions named like this: <path>Apple_Driver43, |
137 | There are some partitions named: <path>Apple_Driver43, Apple_Driver_ATA, |
| 139 | Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches</path>. If |
138 | Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches</path>. If you are not |
| 140 | you are not planning to use MacOS 9 you can delete them, because MacOS X and |
139 | planning to use MacOS 9 you can delete them, because MacOS X and Linux don't |
| 141 | Linux don't need them. You might have to use <c>parted</c> in order to delete |
140 | need them. To delete them, either use parted or erase the whole disk by |
| 142 | them, as mac-fdisk can't delete them yet. |
141 | initialing the partition map. |
| 143 | </note> |
142 | </note> |
| 144 | |
143 | |
| 145 | <warn> |
144 | <warn> |
| 146 | <c>parted</c> is able to resize partitions. On the Installation CD there |
145 | <c>parted</c> is able to resize partitions. On the Installation CD there |
| 147 | are patches included to resize HFS+ filesystem. Unfortunately it is not |
146 | are patches included to resize HFS+ filesystem. Unfortunately it is risky to |
| 148 | possible to resize HFS+ journaled filesystems, even if the journaling has been |
147 | resize HFS+ journaled filesystems, be sure to switch off journaling in Mac OS X |
| 149 | switchedoff in Mac OS X. Everything you do with resizing in parted you do it |
148 | first and make sure to run a disk checking tool after the resize. Everything |
| 150 | on your own risk! Be sure to have a backup of your data! |
149 | you do with resizing in parted you do it at your own risk! Be sure to have a |
|
|
150 | backup of your data! |
| 151 | </warn> |
151 | </warn> |
| 152 | |
152 | |
| 153 | <p> |
153 | <p> |
| 154 | If you are interested in knowing how big a partition should be, or even how many |
154 | If you are interested in knowing how big a partition should be, or even how many |
| 155 | partitions you need, read on. Otherwise continue now with <uri |
155 | partitions you need, read on. Otherwise continue now with |
| 156 | link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your Disk</uri> |
156 | <uri link="#mac-fdisk"> Default: Using mac-fdisk (Apple) to Partition your Disk |
| 157 | or <uri link="#parted">Alternative: Using parted (especially Pegasos) to |
157 | </uri> or <uri link="#parted">Alternative: Using parted (IBM/Pegasos) to |
| 158 | Partition your Disk</uri>. |
158 | Partition your Disk</uri>. |
| 159 | </p> |
159 | </p> |
| 160 | |
160 | |
| 161 | </body> |
161 | </body> |
| 162 | </subsection> |
162 | </subsection> |
| … | |
… | |
| 168 | The number of partitions is highly dependent on your environment. For instance, |
168 | The number of partitions is highly dependent on your environment. For instance, |
| 169 | if you have lots of users, you will most likely want to have your |
169 | if you have lots of users, you will most likely want to have your |
| 170 | <path>/home</path> separate as it increases security and makes backups easier. |
170 | <path>/home</path> separate as it increases security and makes backups easier. |
| 171 | If you are installing Gentoo to perform as a mailserver, your <path>/var</path> |
171 | If you are installing Gentoo to perform as a mailserver, your <path>/var</path> |
| 172 | should be separate as all mails are stored inside <path>/var</path>. A good |
172 | should be separate as all mails are stored inside <path>/var</path>. A good |
| 173 | choice of filesystem will then maximise your performance. Gameservers will have |
173 | choice of filesystem will then maximize your performance. Gameservers will have |
| 174 | a separate <path>/opt</path> as most gaming servers are installed there. The |
174 | a separate <path>/opt</path> as most gaming servers are installed there. The |
| 175 | reason is similar for <path>/home</path>: security and backups. You will |
175 | reason is similar for <path>/home</path>: security and backups. You will |
| 176 | definitely want to keep <path>/usr</path> big: not only will it contain the |
176 | definitely want to keep <path>/usr</path> big: not only will it contain the |
| 177 | majority of applications, the Portage tree alone takes around 500 Mbyte |
177 | majority of applications, the Portage tree alone takes around 500 MB |
| 178 | excluding the various sources that are stored in it. |
178 | excluding the various sources that are stored in it. |
| 179 | </p> |
179 | </p> |
| 180 | |
180 | |
| 181 | <p> |
181 | <p> |
| 182 | As you can see, it very much depends on what you want to achieve. Separate |
182 | As you can see, it very much depends on what you want to achieve. Separate |
| … | |
… | |
| 210 | </p> |
210 | </p> |
| 211 | |
211 | |
| 212 | </body> |
212 | </body> |
| 213 | </subsection> |
213 | </subsection> |
| 214 | </section> |
214 | </section> |
| 215 | <section id="fdisk"> |
215 | <section id="mac-fdisk"> |
| 216 | <title>Default: Using mac-fdisk (Apple) Partition your Disk</title> |
216 | <title>Default: Using mac-fdisk (Apple) Partition your Disk</title> |
| 217 | <body> |
217 | <body> |
| 218 | |
218 | |
| 219 | <p> |
219 | <p> |
| 220 | At this point, create your partitions using <c>mac-fdisk</c>: |
220 | At this point, create your partitions using <c>mac-fdisk</c>: |
| … | |
… | |
| 225 | </pre> |
225 | </pre> |
| 226 | |
226 | |
| 227 | <p> |
227 | <p> |
| 228 | First delete the partitions you have cleared previously to make room for your |
228 | First delete the partitions you have cleared previously to make room for your |
| 229 | Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). |
229 | Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). |
| 230 | It will ask for the partition number to delete. Usually the first partition on |
230 | It will ask for the partition number to delete. The first partition on Apple |
| 231 | NewWorld machines (Apple_partition_map) could not be deleted. |
231 | machines (Apple_partition_map) can not be deleted. |
| 232 | </p> |
|
|
| 233 | |
|
|
| 234 | <p> |
232 | </p> |
|
|
233 | |
|
|
234 | <p> |
| 235 | Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will |
235 | On NewWorld Macs, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. |
| 236 | ask for what block you want to start. Enter the number of your first free |
236 | It will ask for what block you want to start. Enter the number of your first |
| 237 | partition, followed by a <c>p</c>. For instance this is <c>2p</c>. |
237 | free partition, followed by a <c>p</c>. For instance this is <c>2p</c>. |
| 238 | </p> |
238 | </p> |
| 239 | |
239 | |
| 240 | <note> |
240 | <note> |
| 241 | This partition is <e>not</e> a <path>/boot</path> partition. It is not used by |
241 | This partition is <e>not</e> a <path>/boot</path> partition. It is not used by |
| 242 | Linux at all; you don't have to place any filesystem on it and you should never |
242 | Linux at all; you don't have to place any filesystem on it and you should never |
| … | |
… | |
| 246 | <p> |
246 | <p> |
| 247 | Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will |
247 | Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will |
| 248 | ask for what block you want to start this partition from. As we used <c>2</c> |
248 | ask for what block you want to start this partition from. As we used <c>2</c> |
| 249 | before to create the Apple_Bootstrap partition, you now have to enter |
249 | before to create the Apple_Bootstrap partition, you now have to enter |
| 250 | <c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size |
250 | <c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size |
| 251 | you want -- 512MB is recommended though). When asked for a name, enter <c>swap</c> |
251 | you want -- 512MB is recommended though). When asked for a name, enter |
| 252 | (mandatory). |
252 | <c>swap</c> (mandatory). |
| 253 | </p> |
253 | </p> |
| 254 | |
254 | |
| 255 | <p> |
255 | <p> |
| 256 | To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select |
256 | To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select |
| 257 | from what block the root partition should start. When asked for the size, enter |
257 | from what block the root partition should start. When asked for the size, enter |
| … | |
… | |
| 278 | </p> |
278 | </p> |
| 279 | |
279 | |
| 280 | </body> |
280 | </body> |
| 281 | </section> |
281 | </section> |
| 282 | <section id="parted"> |
282 | <section id="parted"> |
| 283 | <title>Using parted (especially Pegasos) to Partition your Disk</title> |
283 | <title>Using parted (Mostly Pegasos) to Partition your Disk</title> |
| 284 | <body> |
284 | <body> |
| 285 | |
285 | |
| 286 | <p> |
286 | <p> |
| 287 | <c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by |
287 | <c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by |
| 288 | Mac OS and Mac OS X. With this tool you can resize your Mac-partitions and |
288 | Mac OS and Mac OS X. With this tool you can resize your Mac-partitions and |
| … | |
… | |
| 297 | <pre caption="Starting parted"> |
297 | <pre caption="Starting parted"> |
| 298 | # <i>parted /dev/hda</i> |
298 | # <i>parted /dev/hda</i> |
| 299 | </pre> |
299 | </pre> |
| 300 | |
300 | |
| 301 | <p> |
301 | <p> |
| 302 | If the drive is unpartitioned, run <c>mklabel amiga</c> to create a new |
302 | If the drive isn't partitioned, run <c>mklabel amiga</c> to create a new |
| 303 | disklabel for the drive. |
303 | disklabel for the drive. |
| 304 | </p> |
304 | </p> |
| 305 | |
305 | |
| 306 | <p> |
306 | <p> |
| 307 | You can type <c>print</c> at any time in parted to display the current partition |
307 | You can type <c>print</c> at any time in parted to display the current partition |
| … | |
… | |
| 310 | </p> |
310 | </p> |
| 311 | |
311 | |
| 312 | <p> |
312 | <p> |
| 313 | If you intend to also install MorphOS on your Pegasos create an affs1 filesystem |
313 | If you intend to also install MorphOS on your Pegasos create an affs1 filesystem |
| 314 | named "BI0" (BI zero) at the start of the drive. 32MB should be more than enough |
314 | named "BI0" (BI zero) at the start of the drive. 32MB should be more than enough |
| 315 | to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs or |
315 | to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs |
| 316 | xfs, you will also have to store your Linux kernel on this partition (the |
316 | or xfs, you will also have to store your Linux kernel on this partition (the |
| 317 | Pegasos II can only boot from ext2/ext3 or affs1 partitions). To create the partition run |
317 | Pegasos II can only boot from ext2/ext3 or affs1 partitions). To create the partition run |
| 318 | <c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should |
318 | <c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should |
| 319 | be replaced with the megabyte range (e.g. <c>0 32</c> creates a 32 MB partition |
319 | be replaced with the megabyte range (e.g. <c>0 32</c> creates a 32 MB partition |
| 320 | starting at 0MB and ending at 32MB. |
320 | starting at 0MB and ending at 32MB. |
| 321 | </p> |
321 | </p> |
| … | |
… | |
| 370 | <subsection> |
370 | <subsection> |
| 371 | <title>Filesystems?</title> |
371 | <title>Filesystems?</title> |
| 372 | <body> |
372 | <body> |
| 373 | |
373 | |
| 374 | <p> |
374 | <p> |
| 375 | Several filesystems are available. ext2, ext3 and XFS are found stable on the |
375 | Several filesystems are available. ext2, ext3, ReiserFS and XFS have been found |
| 376 | PPC architecture. jfs is unsupported, ReiserFS still has some problems on ppc |
376 | stable on the PPC architecture. |
| 377 | and is not supported. |
|
|
| 378 | </p> |
377 | </p> |
| 379 | |
378 | |
| 380 | <p> |
379 | <p> |
| 381 | <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata |
380 | <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata |
| 382 | journaling, which means that routine ext2 filesystem checks at startup time can |
381 | journaling, which means that routine ext2 filesystem checks at startup time can |
| … | |
… | |
| 402 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
401 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
| 403 | files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales |
402 | files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales |
| 404 | extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is |
403 | extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is |
| 405 | solid and usable as both general-purpose filesystem and for extreme cases such |
404 | solid and usable as both general-purpose filesystem and for extreme cases such |
| 406 | as the creation of large filesystems, the use of many small files, very large |
405 | as the creation of large filesystems, the use of many small files, very large |
| 407 | files and directories containing tens of thousands of files. Unfortunately we still have some |
406 | files and directories containing tens of thousands of files. |
| 408 | issues with ReiserFS on ppc. We do not encourage people to use this filesystem. |
|
|
| 409 | </p> |
407 | </p> |
| 410 | |
408 | |
| 411 | <p> |
409 | <p> |
| 412 | <b>XFS</b> is a filesystem with metadata journaling which comes with a robust |
410 | <b>XFS</b> is a filesystem with metadata journaling which comes with a robust |
| 413 | feature-set and is optimized for scalability. We only recommend using this |
411 | feature-set and is optimized for scalability. We only recommend using this |
| … | |
… | |
| 465 | Now create the filesystems on your newly created partitions (or logical |
463 | Now create the filesystems on your newly created partitions (or logical |
| 466 | volumes). |
464 | volumes). |
| 467 | </p> |
465 | </p> |
| 468 | |
466 | |
| 469 | <note> |
467 | <note> |
| 470 | On OldWorld machines and the PegasosII your partition which holds the kernel must |
468 | On the PegasosII your partition which holds the kernel must be ext2 or ext3. |
| 471 | be ext2 or ext3. NewWorld machines can boot from any of ext2, ext3, XFS, |
469 | NewWorld machines can boot from any of ext2, ext3, XFS, ReiserFS or even |
| 472 | ReiserFS or even HFS/HFS+ filesystems. |
470 | HFS/HFS+ filesystems. On OldWorld machines booting with BootX, the kernel must |
|
|
471 | be placed on an HFS partition, but this will be completed when you configure |
|
|
472 | your bootloader. |
| 473 | </note> |
473 | </note> |
| 474 | |
474 | |
| 475 | </body> |
475 | </body> |
| 476 | </subsection> |
476 | </subsection> |
| 477 | <subsection> |
477 | <subsection> |