/[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.29 Revision 1.34
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/2.5 --> 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.29 2005/06/10 18:15:33 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.1</version> 11<version>2.5</version>
12<date>2005-06-10</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. You will 174reason 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 175definitely want to keep <path>/usr</path> big: not only will it contain the
177majority of applications, the Portage tree alone takes around 500 Mbyte 176majority of applications, the Portage tree alone takes around 500 MB
178excluding the various sources that are stored in it. 177excluding the various sources that are stored in it.
179</p> 178</p>
180 179
181<p> 180<p>
182As 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
210</p> 209</p>
211 210
212</body> 211</body>
213</subsection> 212</subsection>
214</section> 213</section>
215<section id="fdisk"> 214<section id="mac-fdisk">
216<title>Default: Using mac-fdisk (Apple) Partition your Disk</title> 215<title>Default: Using mac-fdisk (Apple) Partition your Disk</title>
217<body> 216<body>
218 217
219<p> 218<p>
220At this point, create your partitions using <c>mac-fdisk</c>: 219At this point, create your partitions using <c>mac-fdisk</c>:
225</pre> 224</pre>
226 225
227<p> 226<p>
228First 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
229Linux 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).
230It 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
231NewWorld machines (Apple_partition_map) could not be deleted. 230machines (Apple_partition_map) can not be deleted.
232</p>
233
234<p> 231</p>
232
233<p>
235Second, 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>.
236ask 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
237partition, 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>.
238</p> 237</p>
239 238
240<note> 239<note>
241This 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
242Linux 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
246<p> 245<p>
247Now 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
248ask 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>
249before to create the Apple_Bootstrap partition, you now have to enter 248before to create the Apple_Bootstrap partition, you now have to enter
250<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
251you 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
252(mandatory). 251<c>swap</c> (mandatory).
253</p> 252</p>
254 253
255<p> 254<p>
256To 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
257from 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
278</p> 277</p>
279 278
280</body> 279</body>
281</section> 280</section>
282<section id="parted"> 281<section id="parted">
283<title>Using parted (especially Pegasos) to Partition your Disk</title> 282<title>Using parted (Mostly Pegasos) to Partition your Disk</title>
284<body> 283<body>
285 284
286<p> 285<p>
287<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
288Mac 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
297<pre caption="Starting parted"> 296<pre caption="Starting parted">
298# <i>parted /dev/hda</i> 297# <i>parted /dev/hda</i>
299</pre> 298</pre>
300 299
301<p> 300<p>
302If 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
303disklabel for the drive. 302disklabel for the drive.
304</p> 303</p>
305 304
306<p> 305<p>
307You 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
310</p> 309</p>
311 310
312<p> 311<p>
313If 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
314named "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
315to 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
316xfs, 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
317Pegasos 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
318<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
319be 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
320starting at 0MB and ending at 32MB. 319starting at 0MB and ending at 32MB.
321</p> 320</p>
370<subsection> 369<subsection>
371<title>Filesystems?</title> 370<title>Filesystems?</title>
372<body> 371<body>
373 372
374<p> 373<p>
375Several filesystems are available. ext2, ext3 and XFS are found stable on the 374Several filesystems are available. ext2, ext3, ReiserFS and XFS have been found
376PPC architecture. jfs is unsupported, ReiserFS still has some problems on ppc 375stable on the PPC architecture.
377and is not supported.
378</p> 376</p>
379 377
380<p> 378<p>
381<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
382journaling, which means that routine ext2 filesystem checks at startup time can 380journaling, which means that routine ext2 filesystem checks at startup time can
390<p> 388<p>
391<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
392journaling for fast recovery in addition to other enhanced journaling modes like 390journaling for fast recovery in addition to other enhanced journaling modes like
393full 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
394filesystem. It has an additional hashed b-tree indexing option that enables 392filesystem. It has an additional hashed b-tree indexing option that enables
395high performance in almost all situations. In short, ext3 is an excellent 393high performance in almost all situations. You can enable this indexing by
396filesystem. 394adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an
395excellent filesystem.
397</p> 396</p>
398 397
399<p> 398<p>
400<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
401performance and greatly outperforms both ext2 and ext3 when dealing with small 400performance and greatly outperforms both ext2 and ext3 when dealing with small
402files (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
403extremely 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
404solid 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
405as 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
406files and directories containing tens of thousands of files. Unfortunately we still have some 405files and directories containing tens of thousands of files.
407issues with ReiserFS on ppc. We do not encourage people to use this filesystem.
408</p> 406</p>
409 407
410<p> 408<p>
411<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
412feature-set and is optimized for scalability. We only recommend using this 410feature-set and is optimized for scalability. We only recommend using this
464Now create the filesystems on your newly created partitions (or logical 462Now create the filesystems on your newly created partitions (or logical
465volumes). 463volumes).
466</p> 464</p>
467 465
468<note> 466<note>
469On 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.
470be 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
471ReiserFS 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.
472</note> 472</note>
473 473
474</body> 474</body>
475</subsection> 475</subsection>
476<subsection> 476<subsection>
509time 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
510create the necessary mount directories for every partition you created. As an 510create the necessary mount directories for every partition you created. As an
511example we create a mount-point and mount the root partition: 511example we create a mount-point and mount the root partition:
512</p> 512</p>
513 513
514<warn>
515Due to a bug in the e2fsprogs package, you need to explicitly use
516the <c>mount -t ext3</c> option if you are using an ext3 filesystem.
517</warn>
518
519<pre caption="Mounting partitions"> 514<pre caption="Mounting partitions">
520# <i>mkdir /mnt/gentoo</i> 515# <i>mkdir /mnt/gentoo</i>
521# <i>mount /dev/hda4 /mnt/gentoo</i> 516# <i>mount /dev/hda4 /mnt/gentoo</i>
522<comment>(For ext3 partitions:)</comment>
523# <i>mount -t ext3 /dev/hda4 /mnt/gentoo</i>
524</pre> 517</pre>
525 518
526<note> 519<note>
527If 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
528change 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
529also holds for <path>/var/tmp</path>. 522also holds for <path>/var/tmp</path>.
530</note> 523</note>
531 524
532
533<p> 525<p>
534We 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
535kernel) 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
536partitions. 528partitions.
537</p> 529</p>

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

  ViewVC Help
Powered by ViewVC 1.1.20