/[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.28 Revision 1.34
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.28 2005/03/28 11:30:52 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-disk.xml,v 1.34 2006/02/27 00:55:34 fox2mike Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>2.00</version> 11<version>2.5</version>
12<date>2005-03-28</date> 12<date>2006-02-27</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>
24you'll be guided through the process of setting up partitions and filesystems 24you'll be guided through the process of setting up partitions and filesystems
25for your Gentoo Linux installation. 25for your Gentoo Linux installation.
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 common block device is
30probably the one that represents the first IDE drive in a Linux system, namely 30the one that represents the first IDE drive in a Linux system, namely
31<path>/dev/hda</path>. If your system uses SCSI or SATA drives, then your first 31<path>/dev/hda</path>. If you are installing onto SCSI, FireWire, USB or SATA
32hard drive would be <path>/dev/sda</path>. 32drives, then your first hard 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
41</p> 41</p>
42 42
43</body> 43</body>
44</subsection> 44</subsection>
45<subsection> 45<subsection>
46<title>Partitions and Slices</title> 46<title>Partitions</title>
47<body> 47<body>
48 48
49<p> 49<p>
50Although it is theoretically possible to use a full disk to house your Linux 50Although it is theoretically possible to use a full disk to house your Linux
51system, this is almost never done in practice. Instead, full disk block devices 51system, this is almost never done in practice. Instead, full disk block devices
52are split up in smaller, more manageable block devices. On most systems, 52are split up in smaller, more manageable block devices. On most systems,
53these are called <e>partitions</e>. Other architectures use a similar technique, 53these are called <e>partitions</e>.
54called <e>slices</e>.
55</p> 54</p>
56 55
57</body> 56</body>
58</subsection> 57</subsection>
59</section> 58</section>
87 <ti>32k</ti> 86 <ti>32k</ti>
88 <ti>Apple_partition_map</ti> 87 <ti>Apple_partition_map</ti>
89</tr> 88</tr>
90<tr> 89<tr>
91 <ti><path>/dev/hda2</path></ti> 90 <ti><path>/dev/hda2</path></ti>
92 <ti>(Not needed)</ti> 91 <ti>(Not applicable)</ti>
93 <ti>(Not applicable)</ti> 92 <ti>(Not applicable)</ti>
94 <ti>(Not applicable)</ti> 93 <ti>(Not applicable)</ti>
95 <ti>(bootstrap)</ti> 94 <ti>(bootstrap)</ti>
96 <ti>800k</ti> 95 <ti>800k</ti>
97 <ti>Apple_Bootstrap</ti> 96 <ti>Apple_Bootstrap</ti>
98</tr> 97</tr>
99<tr> 98<tr>
100 <ti>(Not applicable</ti> 99 <ti>(Not applicable)</ti>
101 <ti>(Not applicable)</ti> 100 <ti>(Not applicable)</ti>
102 <ti>(Not applicable)</ti> 101 <ti>(Not applicable)</ti>
103 <ti><path>/dev/sda1</path></ti> 102 <ti><path>/dev/sda1</path></ti>
104 <ti>(PReP Boot)</ti> 103 <ti>(PReP Boot)</ti>
105 <ti>800k</ti> 104 <ti>800k</ti>
106 <ti>Type 0x41</ti> 105 <ti>Type 0x41</ti>
107</tr> 106</tr>
108<tr> 107<tr>
109 <ti>(Not needed)</ti> 108 <ti>(Not applicable)</ti>
110 <ti>(Not needed)</ti> 109 <ti><path>/dev/hda2</path> (If using quik)</ti>
111 <ti><path>/dev/hda1</path></ti> 110 <ti><path>/dev/hda1</path></ti>
112 <ti>(Not needed)</ti> 111 <ti>(Not applicable)</ti>
113 <ti>ext2</ti> 112 <ti>ext2</ti>
114 <ti>32MB</ti> 113 <ti>32MB</ti>
115 <ti>Boot partition</ti> 114 <ti>Boot partition</ti>
116</tr> 115</tr>
117<tr> 116<tr>
118 <ti><path>/dev/hda3</path></ti> 117 <ti><path>/dev/hda3</path></ti>
119 <ti><path>/dev/hda2</path></ti> 118 <ti><path>/dev/hda2</path>(<path>/dev/hda3</path> if using quik)</ti>
120 <ti><path>/dev/hda2</path></ti> 119 <ti><path>/dev/hda2</path></ti>
121 <ti><path>/dev/sda2</path></ti> 120 <ti><path>/dev/sda2</path></ti>
122 <ti>(swap)</ti> 121 <ti>(swap)</ti>
123 <ti>512M</ti> 122 <ti>512M</ti>
124 <ti>Swap partition, Type 0x82</ti> 123 <ti>Swap partition, Type 0x82</ti>
125</tr> 124</tr>
126<tr> 125<tr>
127 <ti><path>/dev/hda4</path></ti> 126 <ti><path>/dev/hda4</path></ti>
128 <ti><path>/dev/hda3</path></ti> 127 <ti><path>/dev/hda3</path> (<path>/dev/hda4</path> if using quik)</ti>
129 <ti><path>/dev/hda3</path></ti> 128 <ti><path>/dev/hda3</path></ti>
130 <ti><path>/dev/sda3</path></ti> 129 <ti><path>/dev/sda3</path></ti>
131 <ti>ext3, xfs</ti> 130 <ti>ext3, xfs</ti>
132 <ti>Rest of the disk</ti> 131 <ti>Rest of the disk</ti>
133 <ti>Root partition, Type 0x83</ti> 132 <ti>Root partition, Type 0x83</ti>
134</tr> 133</tr>
135</table> 134</table>
136 135
137<note> 136<note>
138There are some partitions named like this: <path>Apple_Driver43, 137There are some partitions named: <path>Apple_Driver43, Apple_Driver_ATA,
139Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches</path>. If 138Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches</path>. If you are not
140you are not planning to use MacOS 9 you can delete them, because MacOS X and 139planning to use MacOS 9 you can delete them, because MacOS X and Linux don't
141Linux don't need them. You might have to use <c>parted</c> in order to delete 140need them. To delete them, either use parted or erase the whole disk by
142them, as mac-fdisk can't delete them yet. 141initializing the partition map.
143</note> 142</note>
144 143
145<warn> 144<warn>
146<c>parted</c> is able to resize partitions. On the Installation CD there 145<c>parted</c> is able to resize partitions including HFS+. Unfortunately it is
147are patches included to resize HFS+ filesystem. Unfortunately it is not
148possible to resize HFS+ journaled filesystems, even if the journaling has been 146not possible to resize HFS+ journaled filesystems, so switch off journaling in
149switchedoff in Mac OS X. Everything you do with resizing in parted you do it 147Mac OS X before resizing. Remeber that any resizing operation is dangerous,
150on your own risk! Be sure to have a backup of your data! 148so attempt at your own risk! Be sure to always have a backup of your data
149before resizing!
151</warn> 150</warn>
152 151
153<p> 152<p>
154If you are interested in knowing how big a partition should be, or even how many 153If you are interested in knowing how big a partition should be, or even how many
155partitions you need, read on. Otherwise continue now with <uri 154partitions you need, read on. Otherwise continue now with
156link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your Disk</uri> 155<uri link="#mac-fdisk"> Default: Using mac-fdisk (Apple) to Partition your Disk
157or <uri link="#parted">Alternative: Using parted (especially Pegasos) to 156</uri> or <uri link="#parted">Alternative: Using parted (IBM/Pegasos) to
158Partition your Disk</uri>. 157Partition your Disk</uri>.
159</p> 158</p>
160 159
161</body> 160</body>
162</subsection> 161</subsection>
168The number of partitions is highly dependent on your environment. For instance, 167The number of partitions is highly dependent on your environment. For instance,
169if you have lots of users, you will most likely want to have your 168if you have lots of users, you will most likely want to have your
170<path>/home</path> separate as it increases security and makes backups easier. 169<path>/home</path> separate as it increases security and makes backups easier.
171If you are installing Gentoo to perform as a mailserver, your <path>/var</path> 170If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
172should be separate as all mails are stored inside <path>/var</path>. A good 171should be separate as all mails are stored inside <path>/var</path>. A good
173choice of filesystem will then maximise your performance. Gameservers will have 172choice of filesystem will then maximize your performance. Gameservers will have
174a separate <path>/opt</path> as most gaming servers are installed there. The 173a separate <path>/opt</path> as most gaming servers are installed there. The
175reason is similar for <path>/home</path>: security and backups. 174reason is similar for <path>/home</path>: security and backups. You will
175definitely want to keep <path>/usr</path> big: not only will it contain the
176majority of applications, the Portage tree alone takes around 500 MB
177excluding the various sources that are stored in it.
176</p> 178</p>
177 179
178<p> 180<p>
179As you can see, it very much depends on what you want to achieve. Separate 181As you can see, it very much depends on what you want to achieve. Separate
180partitions or volumes have the following advantages: 182partitions or volumes have the following advantages:
207</p> 209</p>
208 210
209</body> 211</body>
210</subsection> 212</subsection>
211</section> 213</section>
212<section id="fdisk"> 214<section id="mac-fdisk">
213<title>Default: Using mac-fdisk (Apple) Partition your Disk</title> 215<title>Default: Using mac-fdisk (Apple) Partition your Disk</title>
214<body> 216<body>
215 217
216<p> 218<p>
217At this point, create your partitions using <c>mac-fdisk</c>: 219At this point, create your partitions using <c>mac-fdisk</c>:
222</pre> 224</pre>
223 225
224<p> 226<p>
225First delete the partitions you have cleared previously to make room for your 227First delete the partitions you have cleared previously to make room for your
226Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). 228Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s).
227It will ask for the partition number to delete. Usually the first partition on 229It will ask for the partition number to delete. The first partition on Apple
228NewWorld machines (Apple_partition_map) could not be deleted. 230machines (Apple_partition_map) can not be deleted.
229</p>
230
231<p> 231</p>
232
233<p>
232Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will 234On NewWorld Macs, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>.
233ask for what block you want to start. Enter the number of your first free 235It will ask for what block you want to start. Enter the number of your first
234partition, followed by a <c>p</c>. For instance this is <c>2p</c>. 236free partition, followed by a <c>p</c>. For instance this is <c>2p</c>.
235</p> 237</p>
236 238
237<note> 239<note>
238This partition is <e>not</e> a <path>/boot</path> partition. It is not used by 240This partition is <e>not</e> a <path>/boot</path> partition. It is not used by
239Linux at all; you don't have to place any filesystem on it and you should never 241Linux at all; you don't have to place any filesystem on it and you should never
243<p> 245<p>
244Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will 246Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will
245ask for what block you want to start this partition from. As we used <c>2</c> 247ask for what block you want to start this partition from. As we used <c>2</c>
246before to create the Apple_Bootstrap partition, you now have to enter 248before to create the Apple_Bootstrap partition, you now have to enter
247<c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size 249<c>3p</c>. When you're asked for the size, enter <c>512M</c> (or whatever size
248you want -- 512MB is recommended though). When asked for a name, enter <c>swap</c> 250you want -- 512MB is recommended though). When asked for a name, enter
249(mandatory). 251<c>swap</c> (mandatory).
250</p> 252</p>
251 253
252<p> 254<p>
253To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select 255To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select
254from what block the root partition should start. When asked for the size, enter 256from what block the root partition should start. When asked for the size, enter
275</p> 277</p>
276 278
277</body> 279</body>
278</section> 280</section>
279<section id="parted"> 281<section id="parted">
280<title>Using parted (especially Pegasos) to Partition your Disk</title> 282<title>Using parted (Mostly Pegasos) to Partition your Disk</title>
281<body> 283<body>
282 284
283<p> 285<p>
284<c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by 286<c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by
285Mac OS and Mac OS X. With this tool you can resize your Mac-partitions and 287Mac OS and Mac OS X. With this tool you can resize your Mac-partitions and
294<pre caption="Starting parted"> 296<pre caption="Starting parted">
295# <i>parted /dev/hda</i> 297# <i>parted /dev/hda</i>
296</pre> 298</pre>
297 299
298<p> 300<p>
299If the drive is unpartitioned, run <c>mklabel amiga</c> to create a new 301If the drive isn't partitioned, run <c>mklabel amiga</c> to create a new
300disklabel for the drive. 302disklabel for the drive.
301</p> 303</p>
302 304
303<p> 305<p>
304You can type <c>print</c> at any time in parted to display the current partition 306You can type <c>print</c> at any time in parted to display the current partition
307</p> 309</p>
308 310
309<p> 311<p>
310If you intend to also install MorphOS on your Pegasos create an affs1 filesystem 312If you intend to also install MorphOS on your Pegasos create an affs1 filesystem
311named "BI0" (BI zero) at the start of the drive. 32MB should be more than enough 313named "BI0" (BI zero) at the start of the drive. 32MB should be more than enough
312to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs or 314to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs
313xfs, you will also have to store your Linux kernel on this partition (the 315or xfs, you will also have to store your Linux kernel on this partition (the
314Pegasos II can only boot from ext2/ext3 or affs1 partitions). To create the partition run 316Pegasos II can only boot from ext2/ext3 or affs1 partitions). To create the partition run
315<c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should 317<c>mkpart primary affs1 START END</c> where <c>START</c> and <c>END</c> should
316be replaced with the megabyte range (e.g. <c>0 32</c> creates a 32 MB partition 318be replaced with the megabyte range (e.g. <c>0 32</c> creates a 32 MB partition
317starting at 0MB and ending at 32MB. 319starting at 0MB and ending at 32MB.
318</p> 320</p>
367<subsection> 369<subsection>
368<title>Filesystems?</title> 370<title>Filesystems?</title>
369<body> 371<body>
370 372
371<p> 373<p>
372Several filesystems are available. ext2, ext3 and XFS are found stable on the 374Several filesystems are available. ext2, ext3, ReiserFS and XFS have been found
373PPC architecture. jfs is unsupported, ReiserFS still has some problems on ppc 375stable on the PPC architecture.
374and is not supported.
375</p> 376</p>
376 377
377<p> 378<p>
378<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata 379<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
379journaling, which means that routine ext2 filesystem checks at startup time can 380journaling, which means that routine ext2 filesystem checks at startup time can
387<p> 388<p>
388<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata 389<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
389journaling for fast recovery in addition to other enhanced journaling modes like 390journaling for fast recovery in addition to other enhanced journaling modes like
390full data and ordered data journaling. ext3 is a very good and reliable 391full data and ordered data journaling. ext3 is a very good and reliable
391filesystem. It has an additional hashed b-tree indexing option that enables 392filesystem. It has an additional hashed b-tree indexing option that enables
392high performance in almost all situations. In short, ext3 is an excellent 393high performance in almost all situations. You can enable this indexing by
393filesystem. 394adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an
395excellent filesystem.
394</p> 396</p>
395 397
396<p> 398<p>
397<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall 399<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
398performance and greatly outperforms both ext2 and ext3 when dealing with small 400performance and greatly outperforms both ext2 and ext3 when dealing with small
399files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales 401files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
400extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is 402extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
401solid and usable as both general-purpose filesystem and for extreme cases such 403solid and usable as both general-purpose filesystem and for extreme cases such
402as the creation of large filesystems, the use of many small files, very large 404as the creation of large filesystems, the use of many small files, very large
403files and directories containing tens of thousands of files. Unfortunately we still have some 405files and directories containing tens of thousands of files.
404issues with ReiserFS on ppc. We do not encourage people to use this filesystem.
405</p> 406</p>
406 407
407<p> 408<p>
408<b>XFS</b> is a filesystem with metadata journaling which comes with a robust 409<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
409feature-set and is optimized for scalability. We only recommend using this 410feature-set and is optimized for scalability. We only recommend using this
461Now create the filesystems on your newly created partitions (or logical 462Now create the filesystems on your newly created partitions (or logical
462volumes). 463volumes).
463</p> 464</p>
464 465
465<note> 466<note>
466On OldWorld machines and the PegasosII your partition which holds the kernel must 467On the PegasosII your partition which holds the kernel must be ext2 or ext3.
467be ext2 or ext3. NewWorld machines can boot from any of ext2, ext3, XFS, 468NewWorld machines can boot from any of ext2, ext3, XFS, ReiserFS or even
468ReiserFS or even HFS/HFS+ filesystems. 469HFS/HFS+ filesystems. On OldWorld machines booting with BootX, the kernel must
470be placed on an HFS partition, but this will be completed when you configure
471your bootloader.
469</note> 472</note>
470 473
471</body> 474</body>
472</subsection> 475</subsection>
473<subsection> 476<subsection>
506time to mount those partitions. Use the <c>mount</c> command. Don't forget to 509time to mount those partitions. Use the <c>mount</c> command. Don't forget to
507create the necessary mount directories for every partition you created. As an 510create the necessary mount directories for every partition you created. As an
508example we create a mount-point and mount the root partition: 511example we create a mount-point and mount the root partition:
509</p> 512</p>
510 513
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
516<pre caption="Mounting partitions"> 514<pre caption="Mounting partitions">
517# <i>mkdir /mnt/gentoo</i> 515# <i>mkdir /mnt/gentoo</i>
518# <i>mount /dev/hda4 /mnt/gentoo</i> 516# <i>mount /dev/hda4 /mnt/gentoo</i>
519<comment>(For ext3 partitions:)</comment>
520# <i>mount -t ext3 /dev/hda4 /mnt/gentoo</i>
521</pre> 517</pre>
522 518
523<note> 519<note>
524If you want your <path>/tmp</path> to reside on a separate partition, be sure to 520If you want your <path>/tmp</path> to reside on a separate partition, be sure to
525change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This 521change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
526also holds for <path>/var/tmp</path>. 522also holds for <path>/var/tmp</path>.
527</note> 523</note>
528 524
529
530<p> 525<p>
531We will have to mount the proc filesystem (a virtual interface with the 526We will have to mount the proc filesystem (a virtual interface with the
532kernel) on <path>/proc</path>. But first we will need to place our files on the 527kernel) on <path>/proc</path>. But first we will need to place our files on the
533partitions. 528partitions.
534</p> 529</p>

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

  ViewVC Help
Powered by ViewVC 1.1.20