/[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.2 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.2 2004/04/02 22:15:29 neysx 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>
66 70
67<table> 71<table>
68<tr> 72<tr>
69 <th>Partition NewWorld</th> 73 <th>Partition NewWorld</th>
70 <th>Partition OldWorld</th> 74 <th>Partition OldWorld</th>
75 <th>Partition Pegasos</th>
71 <th>Filesystem</th> 76 <th>Filesystem</th>
72 <th>Size</th> 77 <th>Size</th>
73 <th>Description</th> 78 <th>Description</th>
74</tr> 79</tr>
75<tr> 80<tr>
76 <ti><path>/dev/hda1</path></ti> 81 <ti><path>/dev/hda1</path></ti>
82 <ti>/dev/hda1</ti>
83 <ti>(Not applicable)</ti>
84 <ti>(Partition Map)</ti>
85 <ti>32k</ti>
86 <ti>Apple_partition_map</ti>
87</tr>
88<tr>
89 <ti><path>/dev/hda2</path></ti>
77 <ti>(Not needed)</ti> 90 <ti>(Not needed)</ti>
91 <ti>(Not applicable)</ti>
78 <ti>(bootstrap)</ti> 92 <ti>(bootstrap)</ti>
79 <ti>800k</ti> 93 <ti>800k</ti>
80 <ti>Apple_Bootstrap</ti> 94 <ti>Apple_Bootstrap</ti>
81</tr> 95</tr>
82<tr> 96<tr>
97 <ti><path>/dev/hda3</path></ti>
83 <ti><path>/dev/hda2</path></ti> 98 <ti><path>/dev/hda2</path></ti>
84 <ti><path>/dev/hda1</path></ti> 99 <ti><path>/dev/hda1</path></ti>
85 <ti>(swap)</ti> 100 <ti>(swap)</ti>
86 <ti>512M</ti> 101 <ti>512M</ti>
87 <ti>Swap partition</ti> 102 <ti>Swap partition</ti>
88</tr> 103</tr>
89<tr> 104<tr>
105 <ti><path>/dev/hda4</path></ti>
90 <ti><path>/dev/hda3</path></ti> 106 <ti><path>/dev/hda3</path></ti>
91 <ti><path>/dev/hda2</path></ti> 107 <ti><path>/dev/hda2</path></ti>
92 <ti>ext3</ti> 108 <ti>ext3</ti>
93 <ti>Rest of the disk</ti> 109 <ti>Rest of the disk</ti>
94 <ti>Root partition</ti> 110 <ti>Root partition</ti>
95</tr> 111</tr>
96</table> 112</table>
97 113
114<note>
115There are some partitions named like this: <path>Apple_Driver43,
116Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit,
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.
119You might have to use parted in order to delete them, as mac-fdisk can't delete them yet.
120</note>
121
98<p> 122<p>
99If 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
100many partitions you need, read on. Otherwise continue now with 124partitions you need, read on. Otherwise continue now with <uri
101<uri link="#fdisk">Using fdisk to Partition your Disk</uri>. 125link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your Disk</uri>
126or <uri link="#parted">Alternative: Using parted (especially Pegasos) to
127Partition your Disk</uri>.
102</p> 128</p>
103 129
104</body> 130</body>
105</subsection> 131</subsection>
106<subsection> 132<subsection>
109 135
110<p> 136<p>
111The number of partitions is highly dependent on your environment. For instance, 137The number of partitions is highly dependent on your environment. For instance,
112if 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
113<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.
114If you are installing Gentoo to perform as a mailserver, your 140If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
115<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
116<path>/var</path>. A good choice of filesystem will then maximise your 142choice of filesystem will then maximise your performance. Gameservers will have
117performance. Gameservers will have a separate <path>/opt</path> as most gaming 143a separate <path>/opt</path> as most gaming servers are installed there. The
118servers are installed there. The reason is similar for <path>/home</path>: 144reason is similar for <path>/home</path>: security and backups.
119security and backups.
120</p> 145</p>
121 146
122<p> 147<p>
123As 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
124partitions or volumes have the following advantages: 149partitions or volumes have the following advantages:
125</p> 150</p>
126 151
127<ul> 152<ul>
128<li> 153<li>
129 You can choose the most performant filesystem for each partition or volume 154 You can choose the best performing filesystem for each partition or volume
130</li> 155</li>
131<li> 156<li>
132 Your entire system cannot run out of free space if one defunct tool is 157 Your entire system cannot run out of free space if one defunct tool is
133 continuously writing files to a partition or volume 158 continuously writing files to a partition or volume
134</li> 159</li>
144</ul> 169</ul>
145 170
146<p> 171<p>
147However, multiple partitions have one big disadvantage: if not configured 172However, multiple partitions have one big disadvantage: if not configured
148properly, you might result in having a system with lots 173properly, you might result in having a system with lots
149of free space on one partition and none on another. 174of free space on one partition and none on another. There is also a 15-partition
175limit for SCSI and SATA.
150</p> 176</p>
151 177
152</body> 178</body>
153</subsection> 179</subsection>
154</section> 180</section>
155<section id="fdisk"> 181<section id="fdisk">
156<title>Using mac-fdisk on PPC to Partition your Disk</title> 182<title>Default: Using mac-fdisk (Apple/IBM) Partition your Disk</title>
157<body> 183<body>
158 184
159<p> 185<p>
160At this point, create your partitions using <c>mac-fdisk</c>: 186At this point, create your partitions using <c>mac-fdisk</c>:
161</p> 187</p>
165</pre> 191</pre>
166 192
167<p> 193<p>
168First 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
169Linux 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).
170It 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.
171</p> 198</p>
172 199
173<p> 200<p>
174Second, 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
175ask for what block you want to start. If you previously selected <c>3</c> as 202ask for what block you want to start. Enter the number of your first free
176partition number, enter <c>3p</c>. 203partition, followed by a <c>p</c>. For instance this is <c>2p</c>.
177</p> 204</p>
178 205
179<note> 206<note>
180This 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;
181you 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
182users don't need a boot partition. 209users don't need an extra partition for <path>/boot</path>.
183</note> 210</note>
184 211
185<p> 212<p>
186Now 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
187ask for what block you want to start this partition from. As we used <c>3</c> 214ask for what block you want to start this partition from. As we used <c>2</c>
188before to create the Apple_Bootstrap partition, you now have to enter 215before to create the Apple_Bootstrap partition, you now have to enter
189<c>4p</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
190you want -- 512 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>
191(mandatory). 218(mandatory).
192</p> 219</p>
193 220
194<p> 221<p>
195To create the root partition, enter <c>c</c>, followed by <c>5p</c> to select 222To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select
196from 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
197<c>5p</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
198space". When asked for the name, enter <c>root</c> (mandatory). 225space". When asked for the name, enter <c>root</c> (mandatory).
199</p> 226</p>
200 227
201<p> 228<p>
202To 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
203quit <c>mac-fdisk</c>. 230quit <c>mac-fdisk</c>.
204</p> 231</p>
205 232
233<note>
234To make sure everything is ok, you should run mac-fdisk once more and check
235whether all the partitions are there. If you don't see any of the 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.
239</note>
240
206<p> 241<p>
207Now that your partitions are created, you can now continue with <uri 242Now that your partitions are created, you can continue with <uri
208link="#filesystems">Creating Filesystems</uri>. 243link="#filesystems">Creating Filesystems</uri>.
244</p>
245
246</body>
247</section>
248<section id="parted">
249<title>Using parted (especially Pegasos) to Partition your Disk</title>
250<body>
251
252<p>
253<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
255create space for your Linux partitions. Nevertheless, the example below
256describes partitioning for Pegasos machines only.
257</p>
258
259<p>
260To begin let's fire up <c>parted</c>:
261</p>
262
263<pre caption="Starting parted">
264# <i>parted /dev/hda</i>
265</pre>
266
267<p>
268If the drive is unpartitioned, run <c>mklabel amiga</c> to create a new
269disklabel for the drive.
270</p>
271
272<p>
273You 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
275you change your mind or made a mistake you can press <c>Ctrl-c</c> to abort
276parted.
277</p>
278
279<p>
280If 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
282to 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
284Pegasos II can boot from ext2/ext3 drives). To create the partition run
285<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
287starting at 5MB and ending at 55MB.
288</p>
289
290<p>
291You 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
293must first decide which filesystem to use. Possible options are ext2, ext3,
294reiserfs and xfs. Unless you know what you are doing, use ext3. Run
295<c>mkpart primary ext3 START END</c> to create an ext3 partition. Again, replace
296<c>START</c> and <c>END</c> with the megabyte start and stop marks for the
297partition.
298</p>
299
300<p>
301It is generally recommended that you create a swap partition the same size as
302the amount of RAM in your computer times two. You will probably get away with a
303smaller swap partition unless you intend to run a lot of applications at the
304same time (although at least 512MB is recommended). To create the swap
305partition, run <c>mkpart primary linux-swap START END</c>.
306</p>
307
308<p>
309Write down the partition minor numbers as they are required during the
310installation process. To display the minor numbers run <c>print</c>. Your drives
311are accessed as <path>/dev/hdaX</path> where X is replaced with the minor number
312of the partition.
313</p>
314
315<p>
316When you are done in parted simply run <c>quit</c>.
209</p> 317</p>
210 318
211</body> 319</body>
212</section> 320</section>
213<section id="filesystems"> 321<section id="filesystems">
229<subsection> 337<subsection>
230<title>Filesystems?</title> 338<title>Filesystems?</title>
231<body> 339<body>
232 340
233<p> 341<p>
234Several filesystems are available. Ext2 and ext3 are found stable on the 342Several filesystems are available. ext2, ext3, ReiserFS and XFS are found stable
235PPC architecture, reiserfs and xfs are in experimental stage. jfs is 343on the PPC architecture. jfs is unsupported.
236unsupported.
237</p> 344</p>
238 345
239<p> 346<p>
240<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
241journaling, which means that routine ext2 filesystem checks at startup time can 348journaling, which means that routine ext2 filesystem checks at startup time can
264as the creation of large filesystems, the use of many small files, very large 371as the creation of large filesystems, the use of many small files, very large
265files and directories containing tens of thousands of files. 372files and directories containing tens of thousands of files.
266</p> 373</p>
267 374
268<p> 375<p>
269<b>XFS</b> is a filesystem with metadata journaling that is fully supported 376<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
270under Gentoo Linux's xfs-sources kernel. It comes with a robust feature-set and
271is optimized for scalability. We only recommend using this filesystem on Linux 377feature-set and is optimized for scalability. We only recommend using this
272systems with high-end SCSI and/or fibre channel storage and a uninterruptible 378filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
273power supply. Because XFS aggressively caches in-transit data in RAM, improperly 379an uninterruptible power supply. Because XFS aggressively caches in-transit data
274designed programs (those that don't take proper precautions when writing files 380in RAM, improperly designed programs (those that don't take proper precautions
275to disk and there are quite a few of them) can lose a good deal of data if the 381when writing files to disk and there are quite a few of them) can lose a good
276system goes down unexpectedly. 382deal of data if the system goes down unexpectedly.
277</p>
278
279<p>
280<b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
281become production-ready and there hasn't been a sufficient track record to
282comment positively nor negatively on its general stability at this point.
283</p> 383</p>
284 384
285</body> 385</body>
286</subsection> 386</subsection>
287<subsection id="filesystems-apply"> 387<subsection id="filesystems-apply">
312</tr> 412</tr>
313<tr> 413<tr>
314 <ti>xfs</ti> 414 <ti>xfs</ti>
315 <ti><c>mkfs.xfs</c></ti> 415 <ti><c>mkfs.xfs</c></ti>
316</tr> 416</tr>
317<tr>
318 <ti>jfs</ti>
319 <ti><c>mkfs.jfs</c></ti>
320</tr>
321</table> 417</table>
322 418
323<p> 419<p>
324For 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)
325in ext3 (as in our example), you would use: 421in ext3 (as in our example), you would use:
326</p> 422</p>
327 423
328<pre caption="Applying a filesystem on a partition"> 424<pre caption="Applying a filesystem on a partition">
329# <i>mke2fs -j /dev/hda3</i> 425# <i>mke2fs -j /dev/hda4</i>
330</pre> 426</pre>
331 427
332<p> 428<p>
333Now create the filesystems on your newly created partitions (or logical 429Now create the filesystems on your newly created partitions (or logical
334volumes). 430volumes).
335</p> 431</p>
336 432
433<note>
434On OldWorld machines and the PegasosII your partition which holds the kernel must
435be ext2 or ext3. NewWorld machines can boot from any of ext2, ext3, XFS,
436ReiserFS or even HFS/HFS+ filesystems.
437</note>
438
337</body> 439</body>
338</subsection> 440</subsection>
339<subsection> 441<subsection>
340<title>Activating the Swap Partition</title> 442<title>Activating the Swap Partition</title>
341<body> 443<body>
343<p> 445<p>
344<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:
345</p> 447</p>
346 448
347<pre caption="Creating a Swap signature"> 449<pre caption="Creating a Swap signature">
348# <i>mkswap /dev/hda2</i> 450# <i>mkswap /dev/hda3</i>
349</pre> 451</pre>
350 452
351<p> 453<p>
352To activate the swap partition, use <c>swapon</c>: 454To activate the swap partition, use <c>swapon</c>:
353</p> 455</p>
354 456
355<pre caption="Activating the swap partition"> 457<pre caption="Activating the swap partition">
356# <i>swapon /dev/hda2</i> 458# <i>swapon /dev/hda3</i>
357</pre> 459</pre>
358 460
359<p> 461<p>
360Create and activate the swap now. 462Create and activate the swap now.
361</p> 463</p>
369 471
370<p> 472<p>
371Now 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
372time 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
373create the necessary mount directories for every partition you created. As an 475create the necessary mount directories for every partition you created. As an
374example we mount the root and boot partition: 476example we create a mount-point and mount the root partition:
375</p> 477</p>
376 478
377<pre caption="Mounting partitions"> 479<pre caption="Mounting partitions">
480# <i>mkdir /mnt/gentoo</i>
378# <i>mount /dev/hda3 /mnt/gentoo</i> 481# <i>mount /dev/hda4 /mnt/gentoo</i>
379</pre> 482</pre>
380 483
381<note> 484<note>
382If 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
383change 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
384also holds for <path>/var/tmp</path>. 487also holds for <path>/var/tmp</path>.
385</note> 488</note>
386 489
387<p> 490<p>
388We also need to mount the proc filesystem (a virtual interface with the kernel) 491Finally we have to create the <path>/dev</path> files in our new home, which is
389on <path>/proc</path>. We first create the <path>/mnt/gentoo/proc</path> 492needed during the bootloader installation. This could be done by "bind"-mapping
390mountpoint and then mount the filesystem: 493the <path>/dev</path>-filesystem from the LiveCD:
391</p> 494</p>
392 495
393<pre caption="Creating the /mnt/gentoo/proc mountpoint"> 496<pre caption="Bind-mounting the /dev-filesystem">
394# <i>mkdir /mnt/gentoo/proc</i> 497# <i>mkdir /mnt/gentoo/dev</i>
395# <i>mount -t proc none /mnt/gentoo/proc</i> 498# <i>mount -o bind /dev /mnt/gentoo/dev</i>
396</pre> 499</pre>
397 500
501<p>
502We will also 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
504partitions.
398<p> 505</p>
506
507<p>
399Now continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo 508Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
400Installation Files</uri>. 509Installation Files</uri>.
401</p> 510</p>
402 511
403</body> 512</body>
404</section> 513</section>

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

  ViewVC Help
Powered by ViewVC 1.1.20