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

Diff of /xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.21 Revision 1.22
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.21 2004/11/14 08:35:27 dertobi123 Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.22 2004/11/15 12:47:47 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.19</version> 11<version>1.19</version>
12<date>November 2, 2004</date> 12<date>November 2, 2004</date>
114<note> 114<note>
115There are some partitions named like this: <path>Apple_Driver43, 115There are some partitions named like this: <path>Apple_Driver43,
116Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, 116Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit,
117Apple_Patches</path>. If you are not planning to use MacOS 9 you can 117Apple_Patches</path>. If you are not planning to use MacOS 9 you can
118delete them, because MacOS X and Linux don't need them. 118delete them, because MacOS X and Linux don't need them.
119You might have to use parted in order to delete them, as mac-fdisk can't 119You might have to use parted in order to delete them, as mac-fdisk can't delete them yet.
120delete them yet.
121</note> 120</note>
122 121
123<p> 122<p>
124If you are interested in knowing how big a partition should be, or even how 123If you are interested in knowing how big a partition should be, or even how many
125many partitions you need, read on. Otherwise continue now with 124partitions you need, read on. Otherwise continue now with <uri
126<uri link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your 125link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your Disk</uri>
127Disk</uri> or <uri link="#parted">Alternative: Using parted (especially Pegasos) to 126or <uri link="#parted">Alternative: Using parted (especially Pegasos) to
128Partition your Disk</uri>. 127Partition your Disk</uri>.
129</p> 128</p>
130 129
131</body> 130</body>
132</subsection> 131</subsection>
136 135
137<p> 136<p>
138The number of partitions is highly dependent on your environment. For instance, 137The number of partitions is highly dependent on your environment. For instance,
139if you have lots of users, you will most likely want to have your 138if you have lots of users, you will most likely want to have your
140<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.
141If you are installing Gentoo to perform as a mailserver, your 140If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
142<path>/var</path> should be separate as all mails are stored inside 141should be separate as all mails are stored inside <path>/var</path>. A good
143<path>/var</path>. A good choice of filesystem will then maximise your 142choice of filesystem will then maximise your performance. Gameservers will have
144performance. Gameservers will have a separate <path>/opt</path> as most gaming 143a separate <path>/opt</path> as most gaming servers are installed there. The
145servers are installed there. The reason is similar for <path>/home</path>: 144reason is similar for <path>/home</path>: security and backups.
146security and backups.
147</p> 145</p>
148 146
149<p> 147<p>
150As you can see, it very much depends on what you want to achieve. Separate 148As you can see, it very much depends on what you want to achieve. Separate
151partitions or volumes have the following advantages: 149partitions or volumes have the following advantages:
193</pre> 191</pre>
194 192
195<p> 193<p>
196First delete the partitions you have cleared previously to make room for your 194First delete the partitions you have cleared previously to make room for your
197Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). 195Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s).
198It will ask for the partition number to delete. 196It will ask for the partition number to delete. Usually the first partition on
197NewWorld machines (Apple_partition_map) could not be deleted.
199</p> 198</p>
200 199
201<p> 200<p>
202Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will 201Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will
203ask for what block you want to start. Enter the number of your first free 202ask for what block you want to start. Enter the number of your first free
204partition, followed by a <c>p</c>. For instance this is <c>1p</c>. 203partition, followed by a <c>p</c>. For instance this is <c>2p</c>.
205</p> 204</p>
206 205
207<note> 206<note>
208This partition is <e>not</e> a "boot" partition. It is not used by Linux at all; 207This partition is <e>not</e> a "boot" partition. It is not used by Linux at all;
209you don't have to place any filesystem on it and you should never mount it. PPC 208you don't have to place any filesystem on it and you should never mount it. PPC
210users don't need a an extra partition for <path>/boot</path>. 209users don't need an extra partition for <path>/boot</path>.
211</note> 210</note>
212 211
213<p> 212<p>
214Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will 213Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will
215ask for what block you want to start this partition from. As we used <c>1</c> 214ask for what block you want to start this partition from. As we used <c>2</c>
216before to create the Apple_Bootstrap partition, you now have to enter 215before to create the Apple_Bootstrap partition, you now have to enter
217<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
218you want -- 512MB is recommended though). When asked for a name, enter <c>swap</c> 217you want -- 512MB is recommended though). When asked for a name, enter <c>swap</c>
219(mandatory). 218(mandatory).
220</p> 219</p>
221 220
222<p> 221<p>
223To create the root partition, enter <c>c</c>, followed by <c>3p</c> to select 222To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select
224from what block the root partition should start. When asked for the size, enter 223from what block the root partition should start. When asked for the size, enter
225<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
226space". When asked for the name, enter <c>root</c> (mandatory). 225space". When asked for the name, enter <c>root</c> (mandatory).
227</p> 226</p>
228 227
229<p> 228<p>
230To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to 229To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to
238by pressing "i" in mac-fdisk. Note that this will recreate the partition map 237by pressing "i" in mac-fdisk. Note that this will recreate the partition map
239and thus remove all your partitions. 238and thus remove all your partitions.
240</note> 239</note>
241 240
242<p> 241<p>
243Now that your partitions are created, you can now continue with <uri 242Now that your partitions are created, you can continue with <uri
244link="#filesystems">Creating Filesystems</uri>. 243link="#filesystems">Creating Filesystems</uri>.
245</p> 244</p>
246 245
247</body> 246</body>
248</section> 247</section>
282named "BI0" (BI zero) at the start of the drive. 50MB should be more than enough 281named "BI0" (BI zero) at the start of the drive. 50MB should be more than enough
283to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs or 282to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs or
284xfs, you will also have to store your Linux kernel on this partition (the 283xfs, you will also have to store your Linux kernel on this partition (the
285Pegasos II can boot from ext2/ext3 drives). To create the partition run 284Pegasos II can boot from ext2/ext3 drives). To create the partition run
286<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
287be replaced with the megabyte range (f.i. <c>5 55</c> creates a 50 MB partition 286be replaced with the megabyte range (e.g. <c>5 55</c> creates a 50 MB partition
288starting at 5MB and ending at 55MB. 287starting at 5MB and ending at 55MB.
289</p> 288</p>
290 289
291<p> 290<p>
292You need to create two partitions for Linux, one root filesystem for all your 291You need to create two partitions for Linux, one root filesystem for all your
306partition, run <c>mkpart primary linux-swap START END</c>. 305partition, run <c>mkpart primary linux-swap START END</c>.
307</p> 306</p>
308 307
309<p> 308<p>
310Write down the partition minor numbers as they are required during the 309Write down the partition minor numbers as they are required during the
311installation process. To dislay the minor numbers run <c>print</c>. Your drives 310installation process. To display the minor numbers run <c>print</c>. Your drives
312are accessed as <path>/dev/hdaX</path> where X is replaced with the minor number 311are accessed as <path>/dev/hdaX</path> where X is replaced with the minor number
313of the partition. 312of the partition.
314</p> 313</p>
315 314
316<p> 315<p>
338<subsection> 337<subsection>
339<title>Filesystems?</title> 338<title>Filesystems?</title>
340<body> 339<body>
341 340
342<p> 341<p>
343Several filesystems are available. ext2, ext3, reiserfs and xfs are found stable 342Several filesystems are available. ext2, ext3, ReiserFS and XFS are found stable
344on the PPC architecture. jfs is unsupported. 343on the PPC architecture. jfs is unsupported.
345</p> 344</p>
346 345
347<p> 346<p>
348<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
416 <ti><c>mkfs.xfs</c></ti> 415 <ti><c>mkfs.xfs</c></ti>
417</tr> 416</tr>
418</table> 417</table>
419 418
420<p> 419<p>
421For instance, to have the root partition (<path>/dev/hda3</path> in our example) 420For instance, to have the root partition (<path>/dev/hda4</path> in our example)
422in ext3 (as in our example), you would use: 421in ext3 (as in our example), you would use:
423</p> 422</p>
424 423
425<pre caption="Applying a filesystem on a partition"> 424<pre caption="Applying a filesystem on a partition">
426# <i>mke2fs -j /dev/hda3</i> 425# <i>mke2fs -j /dev/hda4</i>
427</pre> 426</pre>
428 427
429<p> 428<p>
430Now create the filesystems on your newly created partitions (or logical 429Now create the filesystems on your newly created partitions (or logical
431volumes). 430volumes).
432</p> 431</p>
433 432
434<note> 433<note>
435Be sure that the partition which will host your kernel (the 434On OldWorld machines and the PegasosII your partition which holds the kernel must
436<path>/boot</path>-path) must be ext2 or ext3. The bootloader can only handle 435be ext2 or ext3. NewWorld machines can boot from any of ext2, ext3, XFS,
437this filesystem. 436ReiserFS or even HFS/HFS+ filesystems.
438</note> 437</note>
439 438
440</body> 439</body>
441</subsection> 440</subsection>
442<subsection> 441<subsection>
446<p> 445<p>
447<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:
448</p> 447</p>
449 448
450<pre caption="Creating a Swap signature"> 449<pre caption="Creating a Swap signature">
451# <i>mkswap /dev/hda2</i> 450# <i>mkswap /dev/hda3</i>
452</pre> 451</pre>
453 452
454<p> 453<p>
455To activate the swap partition, use <c>swapon</c>: 454To activate the swap partition, use <c>swapon</c>:
456</p> 455</p>
457 456
458<pre caption="Activating the swap partition"> 457<pre caption="Activating the swap partition">
459# <i>swapon /dev/hda2</i> 458# <i>swapon /dev/hda3</i>
460</pre> 459</pre>
461 460
462<p> 461<p>
463Create and activate the swap now. 462Create and activate the swap now.
464</p> 463</p>
472 471
473<p> 472<p>
474Now that your partitions are initialized and are housing a filesystem, it is 473Now that your partitions are initialized and are housing a filesystem, it is
475time to mount those partitions. Use the <c>mount</c> command. Don't forget to 474time to mount those partitions. Use the <c>mount</c> command. Don't forget to
476create the necessary mount directories for every partition you created. As an 475create the necessary mount directories for every partition you created. As an
477example we create a mount-point and mount the root and boot partition: 476example we create a mount-point and mount the root partition:
478</p> 477</p>
479 478
480<pre caption="Mounting partitions"> 479<pre caption="Mounting partitions">
481# <i>mkdir /mnt/gentoo</i> 480# <i>mkdir /mnt/gentoo</i>
482# <i>mount /dev/hda3 /mnt/gentoo</i> 481# <i>mount /dev/hda4 /mnt/gentoo</i>
483</pre> 482</pre>
484 483
485<note> 484<note>
486If you want your <path>/tmp</path> to reside on a separate partition, be sure to 485If you want your <path>/tmp</path> to reside on a separate partition, be sure to
487change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This 486change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
498# <i>mkdir /mnt/gentoo/dev</i> 497# <i>mkdir /mnt/gentoo/dev</i>
499# <i>mount -o bind /dev /mnt/gentoo/dev</i> 498# <i>mount -o bind /dev /mnt/gentoo/dev</i>
500</pre> 499</pre>
501 500
502<p> 501<p>
503We will also have to mount the proc filesystem (a virtual interface with the 502We will also have to mount the proc filesystem (a virtual interface with the
504kernel) on <path>/proc</path>. But first we will need to place our files on the partitions. 503kernel) on <path>/proc</path>. But first we will need to place our files on the
504partitions.
505</p> 505</p>
506 506
507<p> 507<p>
508Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo 508Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
509Installation Files</uri>. 509Installation Files</uri>.

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.20