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

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

  ViewVC Help
Powered by ViewVC 1.1.20