/[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.23 Revision 1.28
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.23 2004/11/20 22:23:30 neysx Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.28 2005/03/28 11:30:52 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.19</version> 11<version>2.00</version>
12<date>2004-11-02</date> 12<date>2005-03-28</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>
26</p> 26</p>
27 27
28<p> 28<p>
29To begin, we'll introduce <e>block devices</e>. The most famous block device is 29To begin, we'll introduce <e>block devices</e>. The most famous block device is
30probably the one that represents the first IDE drive in a Linux system, namely 30probably the one that represents the first IDE drive in a Linux system, namely
31<path>/dev/hda</path>. If your system uses SCSI drives, then your first hard 31<path>/dev/hda</path>. If your system uses SCSI or SATA drives, then your first
32drive would be <path>/dev/sda</path>. 32hard drive would be <path>/dev/sda</path>.
33</p> 33</p>
34 34
35<p> 35<p>
36The block devices above represent an abstract interface to the disk. User 36The block devices above represent an abstract interface to the disk. User
37programs can use these block devices to interact with your disk without worrying 37programs can use these block devices to interact with your disk without worrying
71<table> 71<table>
72<tr> 72<tr>
73 <th>Partition NewWorld</th> 73 <th>Partition NewWorld</th>
74 <th>Partition OldWorld</th> 74 <th>Partition OldWorld</th>
75 <th>Partition Pegasos</th> 75 <th>Partition Pegasos</th>
76 <th>Partition RS/6000</th>
76 <th>Filesystem</th> 77 <th>Filesystem</th>
77 <th>Size</th> 78 <th>Size</th>
78 <th>Description</th> 79 <th>Description</th>
79</tr> 80</tr>
80<tr> 81<tr>
81 <ti><path>/dev/hda1</path></ti> 82 <ti><path>/dev/hda1</path></ti>
82 <ti>/dev/hda1</ti> 83 <ti><path>/dev/hda1</path></ti>
84 <ti>(Not applicable)</ti>
83 <ti>(Not applicable)</ti> 85 <ti>(Not applicable)</ti>
84 <ti>(Partition Map)</ti> 86 <ti>(Partition Map)</ti>
85 <ti>32k</ti> 87 <ti>32k</ti>
86 <ti>Apple_partition_map</ti> 88 <ti>Apple_partition_map</ti>
87</tr> 89</tr>
88<tr> 90<tr>
89 <ti><path>/dev/hda2</path></ti> 91 <ti><path>/dev/hda2</path></ti>
90 <ti>(Not needed)</ti> 92 <ti>(Not needed)</ti>
91 <ti>(Not applicable)</ti> 93 <ti>(Not applicable)</ti>
94 <ti>(Not applicable)</ti>
92 <ti>(bootstrap)</ti> 95 <ti>(bootstrap)</ti>
93 <ti>800k</ti> 96 <ti>800k</ti>
94 <ti>Apple_Bootstrap</ti> 97 <ti>Apple_Bootstrap</ti>
95</tr> 98</tr>
96<tr> 99<tr>
100 <ti>(Not applicable</ti>
101 <ti>(Not applicable)</ti>
102 <ti>(Not applicable)</ti>
103 <ti><path>/dev/sda1</path></ti>
104 <ti>(PReP Boot)</ti>
105 <ti>800k</ti>
106 <ti>Type 0x41</ti>
107</tr>
108<tr>
109 <ti>(Not needed)</ti>
110 <ti>(Not needed)</ti>
111 <ti><path>/dev/hda1</path></ti>
112 <ti>(Not needed)</ti>
113 <ti>ext2</ti>
114 <ti>32MB</ti>
115 <ti>Boot partition</ti>
116</tr>
117<tr>
97 <ti><path>/dev/hda3</path></ti> 118 <ti><path>/dev/hda3</path></ti>
98 <ti><path>/dev/hda2</path></ti> 119 <ti><path>/dev/hda2</path></ti>
99 <ti><path>/dev/hda1</path></ti> 120 <ti><path>/dev/hda2</path></ti>
121 <ti><path>/dev/sda2</path></ti>
100 <ti>(swap)</ti> 122 <ti>(swap)</ti>
101 <ti>512M</ti> 123 <ti>512M</ti>
102 <ti>Swap partition</ti> 124 <ti>Swap partition, Type 0x82</ti>
103</tr> 125</tr>
104<tr> 126<tr>
105 <ti><path>/dev/hda4</path></ti> 127 <ti><path>/dev/hda4</path></ti>
106 <ti><path>/dev/hda3</path></ti> 128 <ti><path>/dev/hda3</path></ti>
107 <ti><path>/dev/hda2</path></ti> 129 <ti><path>/dev/hda3</path></ti>
130 <ti><path>/dev/sda3</path></ti>
108 <ti>ext3</ti> 131 <ti>ext3, xfs</ti>
109 <ti>Rest of the disk</ti> 132 <ti>Rest of the disk</ti>
110 <ti>Root partition</ti> 133 <ti>Root partition, Type 0x83</ti>
111</tr> 134</tr>
112</table> 135</table>
113 136
114<note> 137<note>
115There are some partitions named like this: <path>Apple_Driver43, 138There are some partitions named like this: <path>Apple_Driver43,
116Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, 139Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches</path>. If
117Apple_Patches</path>. If you are not planning to use MacOS 9 you can 140you are not planning to use MacOS 9 you can delete them, because MacOS X and
118delete them, because MacOS X and Linux don't need them. 141Linux don't need them. You might have to use <c>parted</c> in order to delete
119You might have to use parted in order to delete them, as mac-fdisk can't delete them yet. 142them, as mac-fdisk can't delete them yet.
120</note> 143</note>
144
145<warn>
146<c>parted</c> is able to resize partitions. On the Installation CD there
147are patches included to resize HFS+ filesystem. Unfortunately it is not
148possible to resize HFS+ journaled filesystems, even if the journaling has been
149switchedoff in Mac OS X. Everything you do with resizing in parted you do it
150on your own risk! Be sure to have a backup of your data!
151</warn>
121 152
122<p> 153<p>
123If you are interested in knowing how big a partition should be, or even how many 154If you are interested in knowing how big a partition should be, or even how many
124partitions you need, read on. Otherwise continue now with <uri 155partitions you need, read on. Otherwise continue now with <uri
125link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your Disk</uri> 156link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your Disk</uri>
161 If necessary, file system checks are reduced in time, as multiple checks can 192 If necessary, file system checks are reduced in time, as multiple checks can
162 be done in parallel (although this advantage is more with multiple disks than 193 be done in parallel (although this advantage is more with multiple disks than
163 it is with multiple partitions) 194 it is with multiple partitions)
164</li> 195</li>
165<li> 196<li>
166 Security can be enhanced by mounting some partitions or volumes read-only, 197 Security can be enhanced by mounting some partitions or volumes read-only,
167 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. 198 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
168</li> 199</li>
169</ul> 200</ul>
170 201
171<p> 202<p>
172However, multiple partitions have one big disadvantage: if not configured 203However, multiple partitions have one big disadvantage: if not configured
173properly, you might result in having a system with lots 204properly, you might result in having a system with lots of free space on one
174of free space on one partition and none on another. There is also a 15-partition 205partition and none on another. There is also a 15-partition limit for SCSI and
175limit for SCSI and SATA. 206SATA.
176</p> 207</p>
177 208
178</body> 209</body>
179</subsection> 210</subsection>
180</section> 211</section>
181<section id="fdisk"> 212<section id="fdisk">
182<title>Default: Using mac-fdisk (Apple/IBM) Partition your Disk</title> 213<title>Default: Using mac-fdisk (Apple) Partition your Disk</title>
183<body> 214<body>
184 215
185<p> 216<p>
186At this point, create your partitions using <c>mac-fdisk</c>: 217At this point, create your partitions using <c>mac-fdisk</c>:
187</p> 218</p>
202ask for what block you want to start. Enter the number of your first free 233ask for what block you want to start. Enter the number of your first free
203partition, followed by a <c>p</c>. For instance this is <c>2p</c>. 234partition, followed by a <c>p</c>. For instance this is <c>2p</c>.
204</p> 235</p>
205 236
206<note> 237<note>
207This partition is <e>not</e> a "boot" partition. It is not used by Linux at all; 238This partition is <e>not</e> a <path>/boot</path> partition. It is not used by
208you don't have to place any filesystem on it and you should never mount it. PPC 239Linux at all; you don't have to place any filesystem on it and you should never
209users don't need an extra partition for <path>/boot</path>. 240mount it. Apple users don't need an extra partition for <path>/boot</path>.
210</note> 241</note>
211 242
212<p> 243<p>
213Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will 244Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will
214ask for what block you want to start this partition from. As we used <c>2</c> 245ask for what block you want to start this partition from. As we used <c>2</c>
249<title>Using parted (especially Pegasos) to Partition your Disk</title> 280<title>Using parted (especially Pegasos) to Partition your Disk</title>
250<body> 281<body>
251 282
252<p> 283<p>
253<c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by 284<c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by
254Mac OS and Mac OS X. With this tool you can shrink your Mac-partitions and 285Mac OS and Mac OS X. With this tool you can resize your Mac-partitions and
255create space for your Linux partitions. Nevertheless, the example below 286create space for your Linux partitions. Nevertheless, the example below
256describes partitioning for Pegasos machines only. 287describes partitioning for Pegasos machines only.
257</p> 288</p>
258 289
259<p> 290<p>
269disklabel for the drive. 300disklabel for the drive.
270</p> 301</p>
271 302
272<p> 303<p>
273You can type <c>print</c> at any time in parted to display the current partition 304You can type <c>print</c> at any time in parted to display the current partition
274table. Your changes aren't saved until you quit the application; if at any time 305table. If at any time you change your mind or made a mistake you can press
275you change your mind or made a mistake you can press <c>Ctrl-c</c> to abort 306<c>Ctrl-c</c> to abort parted.
276parted.
277</p> 307</p>
278 308
279<p> 309<p>
280If you intend to also install MorphOS on your Pegasos create an affs1 filesystem 310If you intend to also install MorphOS on your Pegasos create an affs1 filesystem
281named "BI0" (BI zero) at the start of the drive. 50MB should be more than enough 311named "BI0" (BI zero) at the start of the drive. 32MB should be more than enough
282to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs or 312to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs or
283xfs, you will also have to store your Linux kernel on this partition (the 313xfs, you will also have to store your Linux kernel on this partition (the
284Pegasos II can boot from ext2/ext3 drives). To create the partition run 314Pegasos II can only boot from ext2/ext3 or affs1 partitions). To create the partition run
285<c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should 315<c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should
286be replaced with the megabyte range (e.g. <c>5 55</c> creates a 50 MB partition 316be replaced with the megabyte range (e.g. <c>0 32</c> creates a 32 MB partition
287starting at 5MB and ending at 55MB. 317starting at 0MB and ending at 32MB.
288</p> 318</p>
289 319
290<p> 320<p>
291You need to create two partitions for Linux, one root filesystem for all your 321You need to create two partitions for Linux, one root filesystem for all your
292program files etc, and one swap partition. To create the root filesystem you 322program files etc, and one swap partition. To create the root filesystem you
323<subsection> 353<subsection>
324<title>Introduction</title> 354<title>Introduction</title>
325<body> 355<body>
326 356
327<p> 357<p>
328Now that your partitions are created, it is time to place a filesystem on them. 358Now that your partitions are created, it is time to place a filesystem on them.
329If you don't care about what filesystem to choose and are happy with what we use 359If you don't care about what filesystem to choose and are happy with what we use
330as default in this handbook, continue with <uri 360as default in this handbook, continue with <uri
331link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. 361 link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
332Otherwise read on to learn about the available filesystems... 362Otherwise read on to learn about the available filesystems...
333</p> 363</p>
334 364
335</body> 365</body>
336</subsection> 366</subsection>
337<subsection> 367<subsection>
338<title>Filesystems?</title> 368<title>Filesystems?</title>
339<body> 369<body>
340 370
341<p> 371<p>
342Several filesystems are available. ext2, ext3, ReiserFS and XFS are found stable 372Several filesystems are available. ext2, ext3 and XFS are found stable on the
343on the PPC architecture. jfs is unsupported. 373PPC architecture. jfs is unsupported, ReiserFS still has some problems on ppc
374and is not supported.
344</p> 375</p>
345 376
346<p> 377<p>
347<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata 378<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
348journaling, which means that routine ext2 filesystem checks at startup time can 379journaling, which means that routine ext2 filesystem checks at startup time can
367performance and greatly outperforms both ext2 and ext3 when dealing with small 398performance and greatly outperforms both ext2 and ext3 when dealing with small
368files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales 399files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
369extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is 400extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
370solid and usable as both general-purpose filesystem and for extreme cases such 401solid and usable as both general-purpose filesystem and for extreme cases such
371as the creation of large filesystems, the use of many small files, very large 402as the creation of large filesystems, the use of many small files, very large
372files and directories containing tens of thousands of files. 403files and directories containing tens of thousands of files. Unfortunately we still have some
404issues with ReiserFS on ppc. We do not encourage people to use this filesystem.
373</p> 405</p>
374 406
375<p> 407<p>
376<b>XFS</b> is a filesystem with metadata journaling which comes with a robust 408<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
377feature-set and is optimized for scalability. We only recommend using this 409feature-set and is optimized for scalability. We only recommend using this
398 <th>Filesystem</th> 430 <th>Filesystem</th>
399 <th>Creation Command</th> 431 <th>Creation Command</th>
400</tr> 432</tr>
401<tr> 433<tr>
402 <ti>ext2</ti> 434 <ti>ext2</ti>
403 <ti><c>mke2fs</c></ti> 435 <ti><c>mkfs.ext2</c></ti>
404</tr> 436</tr>
405<tr> 437<tr>
406 <ti>ext3</ti> 438 <ti>ext3</ti>
407 <ti><c>mke2fs -j</c></ti> 439 <ti><c>mkfs.ext3</c></ti>
408</tr> 440</tr>
409<tr> 441<tr>
410 <ti>reiserfs</ti> 442 <ti>reiserfs</ti>
411 <ti><c>mkreiserfs</c></ti> 443 <ti><c>mkfs.reiserfs</c></ti>
412</tr> 444</tr>
413<tr> 445<tr>
414 <ti>xfs</ti> 446 <ti>xfs</ti>
415 <ti><c>mkfs.xfs</c></ti> 447 <ti><c>mkfs.xfs</c></ti>
416</tr> 448</tr>
420For instance, to have the root partition (<path>/dev/hda4</path> in our example) 452For instance, to have the root partition (<path>/dev/hda4</path> in our example)
421in ext3 (as in our example), you would use: 453in ext3 (as in our example), you would use:
422</p> 454</p>
423 455
424<pre caption="Applying a filesystem on a partition"> 456<pre caption="Applying a filesystem on a partition">
425# <i>mke2fs -j /dev/hda4</i> 457# <i>mkfs.ext3 /dev/hda4</i>
426</pre> 458</pre>
427 459
428<p> 460<p>
429Now create the filesystems on your newly created partitions (or logical 461Now create the filesystems on your newly created partitions (or logical
430volumes). 462volumes).
474time to mount those partitions. Use the <c>mount</c> command. Don't forget to 506time to mount those partitions. Use the <c>mount</c> command. Don't forget to
475create the necessary mount directories for every partition you created. As an 507create the necessary mount directories for every partition you created. As an
476example we create a mount-point and mount the root partition: 508example we create a mount-point and mount the root partition:
477</p> 509</p>
478 510
511<warn>
512Due to a bug in the e2fsprogs package, you need to explicitly use
513the <c>mount -t ext3</c> option if you are using an ext3 filesystem.
514</warn>
515
479<pre caption="Mounting partitions"> 516<pre caption="Mounting partitions">
480# <i>mkdir /mnt/gentoo</i> 517# <i>mkdir /mnt/gentoo</i>
481# <i>mount /dev/hda4 /mnt/gentoo</i> 518# <i>mount /dev/hda4 /mnt/gentoo</i>
519<comment>(For ext3 partitions:)</comment>
520# <i>mount -t ext3 /dev/hda4 /mnt/gentoo</i>
482</pre> 521</pre>
483 522
484<note> 523<note>
485If you want your <path>/tmp</path> to reside on a separate partition, be sure to 524If you want your <path>/tmp</path> to reside on a separate partition, be sure to
486change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This 525change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
487also holds for <path>/var/tmp</path>. 526also holds for <path>/var/tmp</path>.
488</note> 527</note>
489 528
490<p> 529
491Finally we have to create the <path>/dev</path> files in our new home, which is
492needed during the bootloader installation. This could be done by "bind"-mapping
493the <path>/dev</path>-filesystem from the LiveCD:
494</p> 530<p>
495
496<pre caption="Bind-mounting the /dev-filesystem">
497# <i>mkdir /mnt/gentoo/dev</i>
498# <i>mount -o bind /dev /mnt/gentoo/dev</i>
499</pre>
500
501<p>
502We will also have to mount the proc filesystem (a virtual interface with the 531We will have to mount the proc filesystem (a virtual interface with the
503kernel) on <path>/proc</path>. But first we will need to place our files on the 532kernel) on <path>/proc</path>. But first we will need to place our files on the
504partitions. 533partitions.
505</p> 534</p>
506 535
507<p> 536<p>

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

  ViewVC Help
Powered by ViewVC 1.1.20