/[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.30
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
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/2.5 -->
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.30 2005/08/02 08:03:53 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.19</version> 11<version>2.2</version>
12<date>2004-11-02</date> 12<date>2005-08-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>
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>
139<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.
140If you are installing Gentoo to perform as a mailserver, your <path>/var</path> 171If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
141should be separate as all mails are stored inside <path>/var</path>. A good 172should be separate as all mails are stored inside <path>/var</path>. A good
142choice of filesystem will then maximise your performance. Gameservers will have 173choice of filesystem will then maximise your performance. Gameservers will have
143a separate <path>/opt</path> as most gaming servers are installed there. The 174a separate <path>/opt</path> as most gaming servers are installed there. The
144reason is similar for <path>/home</path>: security and backups. 175reason is similar for <path>/home</path>: security and backups. You will
176definitely want to keep <path>/usr</path> big: not only will it contain the
177majority of applications, the Portage tree alone takes around 500 Mbyte
178excluding the various sources that are stored in it.
145</p> 179</p>
146 180
147<p> 181<p>
148As you can see, it very much depends on what you want to achieve. Separate 182As you can see, it very much depends on what you want to achieve. Separate
149partitions or volumes have the following advantages: 183partitions or volumes have the following advantages:
161 If necessary, file system checks are reduced in time, as multiple checks can 195 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 196 be done in parallel (although this advantage is more with multiple disks than
163 it is with multiple partitions) 197 it is with multiple partitions)
164</li> 198</li>
165<li> 199<li>
166 Security can be enhanced by mounting some partitions or volumes read-only, 200 Security can be enhanced by mounting some partitions or volumes read-only,
167 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. 201 nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
168</li> 202</li>
169</ul> 203</ul>
170 204
171<p> 205<p>
172However, multiple partitions have one big disadvantage: if not configured 206However, multiple partitions have one big disadvantage: if not configured
173properly, you might result in having a system with lots 207properly, 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 208partition and none on another. There is also a 15-partition limit for SCSI and
175limit for SCSI and SATA. 209SATA.
176</p> 210</p>
177 211
178</body> 212</body>
179</subsection> 213</subsection>
180</section> 214</section>
181<section id="fdisk"> 215<section id="fdisk">
182<title>Default: Using mac-fdisk (Apple/IBM) Partition your Disk</title> 216<title>Default: Using mac-fdisk (Apple) Partition your Disk</title>
183<body> 217<body>
184 218
185<p> 219<p>
186At this point, create your partitions using <c>mac-fdisk</c>: 220At this point, create your partitions using <c>mac-fdisk</c>:
187</p> 221</p>
202ask for what block you want to start. Enter the number of your first free 236ask 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>. 237partition, followed by a <c>p</c>. For instance this is <c>2p</c>.
204</p> 238</p>
205 239
206<note> 240<note>
207This partition is <e>not</e> a "boot" partition. It is not used by Linux at all; 241This 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 242Linux 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>. 243mount it. Apple users don't need an extra partition for <path>/boot</path>.
210</note> 244</note>
211 245
212<p> 246<p>
213Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will 247Now 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> 248ask 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> 283<title>Using parted (especially Pegasos) to Partition your Disk</title>
250<body> 284<body>
251 285
252<p> 286<p>
253<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
254Mac OS and Mac OS X. With this tool you can shrink your Mac-partitions and 288Mac 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 289create space for your Linux partitions. Nevertheless, the example below
256describes partitioning for Pegasos machines only. 290describes partitioning for Pegasos machines only.
257</p> 291</p>
258 292
259<p> 293<p>
269disklabel for the drive. 303disklabel for the drive.
270</p> 304</p>
271 305
272<p> 306<p>
273You can type <c>print</c> at any time in parted to display the current partition 307You 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 308table. 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 309<c>Ctrl-c</c> to abort parted.
276parted.
277</p> 310</p>
278 311
279<p> 312<p>
280If you intend to also install MorphOS on your Pegasos create an affs1 filesystem 313If 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 314named "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 315to 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 316xfs, 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 317Pegasos 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 318<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 319be replaced with the megabyte range (e.g. <c>0 32</c> creates a 32 MB partition
287starting at 5MB and ending at 55MB. 320starting at 0MB and ending at 32MB.
288</p> 321</p>
289 322
290<p> 323<p>
291You need to create two partitions for Linux, one root filesystem for all your 324You 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 325program files etc, and one swap partition. To create the root filesystem you
323<subsection> 356<subsection>
324<title>Introduction</title> 357<title>Introduction</title>
325<body> 358<body>
326 359
327<p> 360<p>
328Now that your partitions are created, it is time to place a filesystem on them. 361Now 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 362If you don't care about what filesystem to choose and are happy with what we use
330as default in this handbook, continue with <uri 363as default in this handbook, continue with <uri
331link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. 364 link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
332Otherwise read on to learn about the available filesystems... 365Otherwise read on to learn about the available filesystems...
333</p> 366</p>
334 367
335</body> 368</body>
336</subsection> 369</subsection>
337<subsection> 370<subsection>
338<title>Filesystems?</title> 371<title>Filesystems?</title>
339<body> 372<body>
340 373
341<p> 374<p>
342Several filesystems are available. ext2, ext3, ReiserFS and XFS are found stable 375Several filesystems are available. ext2, ext3 and XFS are found stable on the
343on the PPC architecture. jfs is unsupported. 376PPC architecture. jfs is unsupported, ReiserFS still has some problems on ppc
377and is not supported.
344</p> 378</p>
345 379
346<p> 380<p>
347<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata 381<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 382journaling, which means that routine ext2 filesystem checks at startup time can
356<p> 390<p>
357<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata 391<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
358journaling for fast recovery in addition to other enhanced journaling modes like 392journaling for fast recovery in addition to other enhanced journaling modes like
359full data and ordered data journaling. ext3 is a very good and reliable 393full data and ordered data journaling. ext3 is a very good and reliable
360filesystem. It has an additional hashed b-tree indexing option that enables 394filesystem. It has an additional hashed b-tree indexing option that enables
361high performance in almost all situations. In short, ext3 is an excellent 395high performance in almost all situations. You can enable this indexing by
362filesystem. 396adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an
397excellent filesystem.
363</p> 398</p>
364 399
365<p> 400<p>
366<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall 401<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
367performance and greatly outperforms both ext2 and ext3 when dealing with small 402performance 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 403files (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 404extremely 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 405solid 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 406as the creation of large filesystems, the use of many small files, very large
372files and directories containing tens of thousands of files. 407files and directories containing tens of thousands of files. Unfortunately we still have some
408issues with ReiserFS on ppc. We do not encourage people to use this filesystem.
373</p> 409</p>
374 410
375<p> 411<p>
376<b>XFS</b> is a filesystem with metadata journaling which comes with a robust 412<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 413feature-set and is optimized for scalability. We only recommend using this
398 <th>Filesystem</th> 434 <th>Filesystem</th>
399 <th>Creation Command</th> 435 <th>Creation Command</th>
400</tr> 436</tr>
401<tr> 437<tr>
402 <ti>ext2</ti> 438 <ti>ext2</ti>
403 <ti><c>mke2fs</c></ti> 439 <ti><c>mkfs.ext2</c></ti>
404</tr> 440</tr>
405<tr> 441<tr>
406 <ti>ext3</ti> 442 <ti>ext3</ti>
407 <ti><c>mke2fs -j</c></ti> 443 <ti><c>mkfs.ext3</c></ti>
408</tr> 444</tr>
409<tr> 445<tr>
410 <ti>reiserfs</ti> 446 <ti>reiserfs</ti>
411 <ti><c>mkreiserfs</c></ti> 447 <ti><c>mkfs.reiserfs</c></ti>
412</tr> 448</tr>
413<tr> 449<tr>
414 <ti>xfs</ti> 450 <ti>xfs</ti>
415 <ti><c>mkfs.xfs</c></ti> 451 <ti><c>mkfs.xfs</c></ti>
416</tr> 452</tr>
420For instance, to have the root partition (<path>/dev/hda4</path> in our example) 456For instance, to have the root partition (<path>/dev/hda4</path> in our example)
421in ext3 (as in our example), you would use: 457in ext3 (as in our example), you would use:
422</p> 458</p>
423 459
424<pre caption="Applying a filesystem on a partition"> 460<pre caption="Applying a filesystem on a partition">
425# <i>mke2fs -j /dev/hda4</i> 461# <i>mkfs.ext3 /dev/hda4</i>
426</pre> 462</pre>
427 463
428<p> 464<p>
429Now create the filesystems on your newly created partitions (or logical 465Now create the filesystems on your newly created partitions (or logical
430volumes). 466volumes).
474time to mount those partitions. Use the <c>mount</c> command. Don't forget to 510time 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 511create the necessary mount directories for every partition you created. As an
476example we create a mount-point and mount the root partition: 512example we create a mount-point and mount the root partition:
477</p> 513</p>
478 514
515<warn>
516Due to a bug in the e2fsprogs package, you need to explicitly use
517the <c>mount -t ext3</c> option if you are using an ext3 filesystem.
518</warn>
519
479<pre caption="Mounting partitions"> 520<pre caption="Mounting partitions">
480# <i>mkdir /mnt/gentoo</i> 521# <i>mkdir /mnt/gentoo</i>
481# <i>mount /dev/hda4 /mnt/gentoo</i> 522# <i>mount /dev/hda4 /mnt/gentoo</i>
523<comment>(For ext3 partitions:)</comment>
524# <i>mount -t ext3 /dev/hda4 /mnt/gentoo</i>
482</pre> 525</pre>
483 526
484<note> 527<note>
485If you want your <path>/tmp</path> to reside on a separate partition, be sure to 528If 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 529change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
487also holds for <path>/var/tmp</path>. 530also holds for <path>/var/tmp</path>.
488</note> 531</note>
489 532
490<p> 533
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> 534<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 535We 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 536kernel) on <path>/proc</path>. But first we will need to place our files on the
504partitions. 537partitions.
505</p> 538</p>
506 539
507<p> 540<p>

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

  ViewVC Help
Powered by ViewVC 1.1.20