/[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.20 Revision 1.23
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.20 2004/11/09 13:01:52 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 10
11<version>1.19</version> 11<version>1.19</version>
12<date>November 2, 2004</date> 12<date>2004-11-02</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>
108 <ti>ext3</ti> 108 <ti>ext3</ti>
109 <ti>Rest of the disk</ti> 109 <ti>Rest of the disk</ti>
110 <ti>Root partition</ti> 110 <ti>Root partition</ti>
111</tr> 111</tr>
112</table> 112</table>
113
113<note> 114<note>
114There are some partitions named like this: <path>Apple_Driver43, 115There are some partitions named like this: <path>Apple_Driver43,
115Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, 116Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit,
116Apple_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
117delete them, because MacOS X and Linux don't need them. 118delete them, because MacOS X and Linux don't need them.
118You might have to use parted in order to delete them, as mac-fdisk can't delete them yet. 119You might have to use parted in order to delete them, as mac-fdisk can't delete them yet.
119</note> 120</note>
121
120<p> 122<p>
121If 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
122many partitions you need, read on. Otherwise continue now with 124partitions you need, read on. Otherwise continue now with <uri
123<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>
124Disk</uri> or <uri link="#parted">Alternative: Using parted (especially Pegasos) to 126or <uri link="#parted">Alternative: Using parted (especially Pegasos) to
125Partition your Disk</uri>. 127Partition your Disk</uri>.
126</p> 128</p>
127 129
128</body> 130</body>
129</subsection> 131</subsection>
133 135
134<p> 136<p>
135The number of partitions is highly dependent on your environment. For instance, 137The number of partitions is highly dependent on your environment. For instance,
136if 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
137<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.
138If you are installing Gentoo to perform as a mailserver, your 140If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
139<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
140<path>/var</path>. A good choice of filesystem will then maximise your 142choice of filesystem will then maximise your performance. Gameservers will have
141performance. Gameservers will have a separate <path>/opt</path> as most gaming 143a separate <path>/opt</path> as most gaming servers are installed there. The
142servers are installed there. The reason is similar for <path>/home</path>: 144reason is similar for <path>/home</path>: security and backups.
143security and backups.
144</p> 145</p>
145 146
146<p> 147<p>
147As 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
148partitions or volumes have the following advantages: 149partitions or volumes have the following advantages:
190</pre> 191</pre>
191 192
192<p> 193<p>
193First 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
194Linux 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).
195It 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.
196</p> 198</p>
197 199
198<p> 200<p>
199Second, 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
200ask 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
201partition, 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>.
202</p> 204</p>
203 205
204<note> 206<note>
205This 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;
206you 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
207users don't need a an extra partition for <path>/boot</path>. 209users don't need an extra partition for <path>/boot</path>.
208</note> 210</note>
209 211
210<p> 212<p>
211Now 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
212ask 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>
213before to create the Apple_Bootstrap partition, you now have to enter 215before to create the Apple_Bootstrap partition, you now have to enter
214<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
215you 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>
216(mandatory). 218(mandatory).
217</p> 219</p>
218 220
219<p> 221<p>
220To 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
221from 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
222<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
223space". When asked for the name, enter <c>root</c> (mandatory). 225space". When asked for the name, enter <c>root</c> (mandatory).
224</p> 226</p>
225 227
226<p> 228<p>
227To 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
228quit <c>mac-fdisk</c>. 230quit <c>mac-fdisk</c>.
229</p> 231</p>
230 232
231<note> 233<note>
232To make sure everything is ok, you should run mac-fdisk once more and check whether all the partitions are there. 234To make sure everything is ok, you should run mac-fdisk once more and check
233If you don't see any of the partitions you created, or the changes you made, you should reinitialize your partitions by pressing "i" in mac-fdisk. 235whether all the partitions are there. If you don't see any of the partitions
234Note that this will recreate the partition map and thus remove all your partitions. 236you created, or the changes you made, you should reinitialize your partitions
237by pressing "i" in mac-fdisk. Note that this will recreate the partition map
238and thus remove all your partitions.
235</note> 239</note>
236 240
237<p> 241<p>
238Now that your partitions are created, you can now continue with <uri 242Now that your partitions are created, you can continue with <uri
239link="#filesystems">Creating Filesystems</uri>. 243link="#filesystems">Creating Filesystems</uri>.
240</p> 244</p>
241 245
242</body> 246</body>
243</section> 247</section>
277named "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
278to 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
279xfs, 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
280Pegasos 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
281<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
282be 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
283starting at 5MB and ending at 55MB. 287starting at 5MB and ending at 55MB.
284</p> 288</p>
285 289
286<p> 290<p>
287You 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
301partition, run <c>mkpart primary linux-swap START END</c>. 305partition, run <c>mkpart primary linux-swap START END</c>.
302</p> 306</p>
303 307
304<p> 308<p>
305Write down the partition minor numbers as they are required during the 309Write down the partition minor numbers as they are required during the
306installation 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
307are 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
308of the partition. 312of the partition.
309</p> 313</p>
310 314
311<p> 315<p>
333<subsection> 337<subsection>
334<title>Filesystems?</title> 338<title>Filesystems?</title>
335<body> 339<body>
336 340
337<p> 341<p>
338Several filesystems are available. ext2, ext3, reiserfs and xfs are found stable 342Several filesystems are available. ext2, ext3, ReiserFS and XFS are found stable
339on the PPC architecture. jfs is unsupported. 343on the PPC architecture. jfs is unsupported.
340</p> 344</p>
341 345
342<p> 346<p>
343<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
411 <ti><c>mkfs.xfs</c></ti> 415 <ti><c>mkfs.xfs</c></ti>
412</tr> 416</tr>
413</table> 417</table>
414 418
415<p> 419<p>
416For 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)
417in ext3 (as in our example), you would use: 421in ext3 (as in our example), you would use:
418</p> 422</p>
419 423
420<pre caption="Applying a filesystem on a partition"> 424<pre caption="Applying a filesystem on a partition">
421# <i>mke2fs -j /dev/hda3</i> 425# <i>mke2fs -j /dev/hda4</i>
422</pre> 426</pre>
423 427
424<p> 428<p>
425Now create the filesystems on your newly created partitions (or logical 429Now create the filesystems on your newly created partitions (or logical
426volumes). 430volumes).
427</p> 431</p>
428 432
429<note> 433<note>
430Be sure that the partition which will host your kernel (the 434On OldWorld machines and the PegasosII your partition which holds the kernel must
431<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,
432this filesystem. 436ReiserFS or even HFS/HFS+ filesystems.
433</note> 437</note>
434 438
435</body> 439</body>
436</subsection> 440</subsection>
437<subsection> 441<subsection>
441<p> 445<p>
442<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:
443</p> 447</p>
444 448
445<pre caption="Creating a Swap signature"> 449<pre caption="Creating a Swap signature">
446# <i>mkswap /dev/hda2</i> 450# <i>mkswap /dev/hda3</i>
447</pre> 451</pre>
448 452
449<p> 453<p>
450To activate the swap partition, use <c>swapon</c>: 454To activate the swap partition, use <c>swapon</c>:
451</p> 455</p>
452 456
453<pre caption="Activating the swap partition"> 457<pre caption="Activating the swap partition">
454# <i>swapon /dev/hda2</i> 458# <i>swapon /dev/hda3</i>
455</pre> 459</pre>
456 460
457<p> 461<p>
458Create and activate the swap now. 462Create and activate the swap now.
459</p> 463</p>
467 471
468<p> 472<p>
469Now 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
470time 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
471create the necessary mount directories for every partition you created. As an 475create the necessary mount directories for every partition you created. As an
472example we create a mount-point and mount the root and boot partition: 476example we create a mount-point and mount the root partition:
473</p> 477</p>
474 478
475<pre caption="Mounting partitions"> 479<pre caption="Mounting partitions">
476# <i>mkdir /mnt/gentoo</i> 480# <i>mkdir /mnt/gentoo</i>
477# <i>mount /dev/hda3 /mnt/gentoo</i> 481# <i>mount /dev/hda4 /mnt/gentoo</i>
478</pre> 482</pre>
479 483
480<note> 484<note>
481If 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
482change 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
493# <i>mkdir /mnt/gentoo/dev</i> 497# <i>mkdir /mnt/gentoo/dev</i>
494# <i>mount -o bind /dev /mnt/gentoo/dev</i> 498# <i>mount -o bind /dev /mnt/gentoo/dev</i>
495</pre> 499</pre>
496 500
497<p> 501<p>
498We 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
499kernel) 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.
500</p> 505</p>
501 506
502<p> 507<p>
503Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo 508Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
504Installation Files</uri>. 509Installation Files</uri>.

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.20