| 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.8 2004/05/03 07:53:45 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 | |
|
|
11 | <version>2.5</version> |
|
|
12 | <date>2006-02-27</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> |
| … | |
… | |
| 20 | you'll be guided through the process of setting up partitions and filesystems |
24 | you'll be guided through the process of setting up partitions and filesystems |
| 21 | for your Gentoo Linux installation. |
25 | for your Gentoo Linux installation. |
| 22 | </p> |
26 | </p> |
| 23 | |
27 | |
| 24 | <p> |
28 | <p> |
| 25 | To begin, we'll introduce <e>block devices</e>. The most famous block device is |
29 | To begin, we'll introduce <e>block devices</e>. The most common block device is |
| 26 | probably the one that represents the first IDE drive in a Linux system, namely |
30 | the one that represents the first IDE drive in a Linux system, namely |
| 27 | <path>/dev/hda</path>. If your system uses SCSI drives, then your first hard |
31 | <path>/dev/hda</path>. If you are installing onto SCSI, FireWire, USB or SATA |
| 28 | drive would be <path>/dev/sda</path>. |
32 | drives, then your first hard drive would be <path>/dev/sda</path>. |
| 29 | </p> |
33 | </p> |
| 30 | |
34 | |
| 31 | <p> |
35 | <p> |
| 32 | The block devices above represent an abstract interface to the disk. User |
36 | The block devices above represent an abstract interface to the disk. User |
| 33 | programs can use these block devices to interact with your disk without worrying |
37 | programs can use these block devices to interact with your disk without worrying |
| … | |
… | |
| 37 | </p> |
41 | </p> |
| 38 | |
42 | |
| 39 | </body> |
43 | </body> |
| 40 | </subsection> |
44 | </subsection> |
| 41 | <subsection> |
45 | <subsection> |
| 42 | <title>Partitions and Slices</title> |
46 | <title>Partitions</title> |
| 43 | <body> |
47 | <body> |
| 44 | |
48 | |
| 45 | <p> |
49 | <p> |
| 46 | Although it is theoretically possible to use a full disk to house your Linux |
50 | Although it is theoretically possible to use a full disk to house your Linux |
| 47 | system, this is almost never done in practice. Instead, full disk block devices |
51 | system, this is almost never done in practice. Instead, full disk block devices |
| 48 | are split up in smaller, more manageable block devices. On most systems, |
52 | are split up in smaller, more manageable block devices. On most systems, |
| 49 | these are called <e>partitions</e>. Other architectures use a similar technique, |
53 | these are called <e>partitions</e>. |
| 50 | called <e>slices</e>. |
|
|
| 51 | </p> |
54 | </p> |
| 52 | |
55 | |
| 53 | </body> |
56 | </body> |
| 54 | </subsection> |
57 | </subsection> |
| 55 | </section> |
58 | </section> |
| … | |
… | |
| 67 | <table> |
70 | <table> |
| 68 | <tr> |
71 | <tr> |
| 69 | <th>Partition NewWorld</th> |
72 | <th>Partition NewWorld</th> |
| 70 | <th>Partition OldWorld</th> |
73 | <th>Partition OldWorld</th> |
| 71 | <th>Partition Pegasos</th> |
74 | <th>Partition Pegasos</th> |
|
|
75 | <th>Partition RS/6000</th> |
| 72 | <th>Filesystem</th> |
76 | <th>Filesystem</th> |
| 73 | <th>Size</th> |
77 | <th>Size</th> |
| 74 | <th>Description</th> |
78 | <th>Description</th> |
| 75 | </tr> |
79 | </tr> |
| 76 | <tr> |
80 | <tr> |
| 77 | <ti><path>/dev/hda1</path></ti> |
81 | <ti><path>/dev/hda1</path></ti> |
| 78 | <ti>(Not needed)</ti> |
82 | <ti><path>/dev/hda1</path></ti> |
|
|
83 | <ti>(Not applicable)</ti> |
|
|
84 | <ti>(Not applicable)</ti> |
|
|
85 | <ti>(Partition Map)</ti> |
|
|
86 | <ti>32k</ti> |
|
|
87 | <ti>Apple_partition_map</ti> |
|
|
88 | </tr> |
|
|
89 | <tr> |
|
|
90 | <ti><path>/dev/hda2</path></ti> |
|
|
91 | <ti>(Not applicable)</ti> |
|
|
92 | <ti>(Not applicable)</ti> |
| 79 | <ti>(Not applicable)</ti> |
93 | <ti>(Not applicable)</ti> |
| 80 | <ti>(bootstrap)</ti> |
94 | <ti>(bootstrap)</ti> |
| 81 | <ti>800k</ti> |
95 | <ti>800k</ti> |
| 82 | <ti>Apple_Bootstrap</ti> |
96 | <ti>Apple_Bootstrap</ti> |
| 83 | </tr> |
97 | </tr> |
| 84 | <tr> |
98 | <tr> |
|
|
99 | <ti>(Not applicable)</ti> |
|
|
100 | <ti>(Not applicable)</ti> |
|
|
101 | <ti>(Not applicable)</ti> |
|
|
102 | <ti><path>/dev/sda1</path></ti> |
|
|
103 | <ti>(PReP Boot)</ti> |
|
|
104 | <ti>800k</ti> |
|
|
105 | <ti>Type 0x41</ti> |
|
|
106 | </tr> |
|
|
107 | <tr> |
|
|
108 | <ti>(Not applicable)</ti> |
|
|
109 | <ti><path>/dev/hda2</path> (If using quik)</ti> |
|
|
110 | <ti><path>/dev/hda1</path></ti> |
|
|
111 | <ti>(Not applicable)</ti> |
|
|
112 | <ti>ext2</ti> |
|
|
113 | <ti>32MB</ti> |
|
|
114 | <ti>Boot partition</ti> |
|
|
115 | </tr> |
|
|
116 | <tr> |
|
|
117 | <ti><path>/dev/hda3</path></ti> |
|
|
118 | <ti><path>/dev/hda2</path>(<path>/dev/hda3</path> if using quik)</ti> |
| 85 | <ti><path>/dev/hda2</path></ti> |
119 | <ti><path>/dev/hda2</path></ti> |
| 86 | <ti><path>/dev/hda1</path></ti> |
120 | <ti><path>/dev/sda2</path></ti> |
| 87 | <ti><path>/dev/hda1</path></ti> |
|
|
| 88 | <ti>(swap)</ti> |
121 | <ti>(swap)</ti> |
| 89 | <ti>512M</ti> |
122 | <ti>512M</ti> |
| 90 | <ti>Swap partition</ti> |
123 | <ti>Swap partition, Type 0x82</ti> |
| 91 | </tr> |
|
|
| 92 | <tr> |
124 | </tr> |
|
|
125 | <tr> |
|
|
126 | <ti><path>/dev/hda4</path></ti> |
|
|
127 | <ti><path>/dev/hda3</path> (<path>/dev/hda4</path> if using quik)</ti> |
| 93 | <ti><path>/dev/hda3</path></ti> |
128 | <ti><path>/dev/hda3</path></ti> |
| 94 | <ti><path>/dev/hda2</path></ti> |
129 | <ti><path>/dev/sda3</path></ti> |
| 95 | <ti><path>/dev/hda2</path></ti> |
|
|
| 96 | <ti>ext3</ti> |
130 | <ti>ext3, xfs</ti> |
| 97 | <ti>Rest of the disk</ti> |
131 | <ti>Rest of the disk</ti> |
| 98 | <ti>Root partition</ti> |
132 | <ti>Root partition, Type 0x83</ti> |
| 99 | </tr> |
133 | </tr> |
| 100 | </table> |
134 | </table> |
| 101 | |
135 | |
|
|
136 | <note> |
|
|
137 | There are some partitions named: <path>Apple_Driver43, Apple_Driver_ATA, |
|
|
138 | Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches</path>. If you are not |
|
|
139 | planning to use MacOS 9 you can delete them, because MacOS X and Linux don't |
|
|
140 | need them. To delete them, either use parted or erase the whole disk by |
|
|
141 | initializing the partition map. |
|
|
142 | </note> |
|
|
143 | |
|
|
144 | <warn> |
|
|
145 | <c>parted</c> is able to resize partitions including HFS+. Unfortunately it is |
|
|
146 | not possible to resize HFS+ journaled filesystems, so switch off journaling in |
|
|
147 | Mac OS X before resizing. Remeber that any resizing operation is dangerous, |
|
|
148 | so attempt at your own risk! Be sure to always have a backup of your data |
|
|
149 | before resizing! |
|
|
150 | </warn> |
|
|
151 | |
| 102 | <p> |
152 | <p> |
| 103 | If you are interested in knowing how big a partition should be, or even how |
153 | If you are interested in knowing how big a partition should be, or even how many |
| 104 | many partitions you need, read on. Otherwise continue now with |
154 | partitions you need, read on. Otherwise continue now with |
| 105 | <uri link="#fdisk">Default: Using mac-fdisk (Apple/IBM) to Partition your |
155 | <uri link="#mac-fdisk"> Default: Using mac-fdisk (Apple) to Partition your Disk |
| 106 | Disk</uri> or <uri link="#parted">Alternative: Using parted (Pegasos) to |
156 | </uri> or <uri link="#parted">Alternative: Using parted (IBM/Pegasos) to |
| 107 | Partition your Disk</uri>. |
157 | Partition your Disk</uri>. |
| 108 | </p> |
158 | </p> |
| 109 | |
159 | |
| 110 | </body> |
160 | </body> |
| 111 | </subsection> |
161 | </subsection> |
| … | |
… | |
| 115 | |
165 | |
| 116 | <p> |
166 | <p> |
| 117 | The number of partitions is highly dependent on your environment. For instance, |
167 | The number of partitions is highly dependent on your environment. For instance, |
| 118 | if you have lots of users, you will most likely want to have your |
168 | if you have lots of users, you will most likely want to have your |
| 119 | <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. |
| 120 | If you are installing Gentoo to perform as a mailserver, your |
170 | If you are installing Gentoo to perform as a mailserver, your <path>/var</path> |
| 121 | <path>/var</path> should be separate as all mails are stored inside |
171 | should be separate as all mails are stored inside <path>/var</path>. A good |
| 122 | <path>/var</path>. A good choice of filesystem will then maximise your |
172 | choice of filesystem will then maximize your performance. Gameservers will have |
| 123 | performance. Gameservers will have a separate <path>/opt</path> as most gaming |
173 | a separate <path>/opt</path> as most gaming servers are installed there. The |
| 124 | servers are installed there. The reason is similar for <path>/home</path>: |
174 | reason is similar for <path>/home</path>: security and backups. You will |
| 125 | security and backups. |
175 | definitely want to keep <path>/usr</path> big: not only will it contain the |
|
|
176 | majority of applications, the Portage tree alone takes around 500 MB |
|
|
177 | excluding the various sources that are stored in it. |
| 126 | </p> |
178 | </p> |
| 127 | |
179 | |
| 128 | <p> |
180 | <p> |
| 129 | As you can see, it very much depends on what you want to achieve. Separate |
181 | As you can see, it very much depends on what you want to achieve. Separate |
| 130 | partitions or volumes have the following advantages: |
182 | partitions or volumes have the following advantages: |
| 131 | </p> |
183 | </p> |
| 132 | |
184 | |
| 133 | <ul> |
185 | <ul> |
| 134 | <li> |
186 | <li> |
| 135 | You can choose the most performant filesystem for each partition or volume |
187 | You can choose the best performing filesystem for each partition or volume |
| 136 | </li> |
188 | </li> |
| 137 | <li> |
189 | <li> |
| 138 | Your entire system cannot run out of free space if one defunct tool is |
190 | Your entire system cannot run out of free space if one defunct tool is |
| 139 | continuously writing files to a partition or volume |
191 | continuously writing files to a partition or volume |
| 140 | </li> |
192 | </li> |
| … | |
… | |
| 142 | If necessary, file system checks are reduced in time, as multiple checks can |
194 | If necessary, file system checks are reduced in time, as multiple checks can |
| 143 | be done in parallel (although this advantage is more with multiple disks than |
195 | be done in parallel (although this advantage is more with multiple disks than |
| 144 | it is with multiple partitions) |
196 | it is with multiple partitions) |
| 145 | </li> |
197 | </li> |
| 146 | <li> |
198 | <li> |
| 147 | Security can be enhanced by mounting some partitions or volumes read-only, |
199 | Security can be enhanced by mounting some partitions or volumes read-only, |
| 148 | nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. |
200 | nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. |
| 149 | </li> |
201 | </li> |
| 150 | </ul> |
202 | </ul> |
| 151 | |
203 | |
| 152 | <p> |
204 | <p> |
| 153 | However, multiple partitions have one big disadvantage: if not configured |
205 | However, multiple partitions have one big disadvantage: if not configured |
| 154 | properly, you might result in having a system with lots |
206 | properly, you might result in having a system with lots of free space on one |
| 155 | of free space on one partition and none on another. |
207 | partition and none on another. There is also a 15-partition limit for SCSI and |
|
|
208 | SATA. |
| 156 | </p> |
209 | </p> |
| 157 | |
210 | |
| 158 | </body> |
211 | </body> |
| 159 | </subsection> |
212 | </subsection> |
| 160 | </section> |
213 | </section> |
| 161 | <section id="fdisk"> |
214 | <section id="mac-fdisk"> |
| 162 | <title>Default: Using mac-fdisk (Apple/IBM) Partition your Disk</title> |
215 | <title>Default: Using mac-fdisk (Apple) Partition your Disk</title> |
| 163 | <body> |
216 | <body> |
| 164 | |
217 | |
| 165 | <p> |
218 | <p> |
| 166 | At this point, create your partitions using <c>mac-fdisk</c>: |
219 | At this point, create your partitions using <c>mac-fdisk</c>: |
| 167 | </p> |
220 | </p> |
| … | |
… | |
| 171 | </pre> |
224 | </pre> |
| 172 | |
225 | |
| 173 | <p> |
226 | <p> |
| 174 | First delete the partitions you have cleared previously to make room for your |
227 | First delete the partitions you have cleared previously to make room for your |
| 175 | Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). |
228 | Linux partitions. Use <c>d</c> in <c>mac-fdisk</c> to delete those partition(s). |
| 176 | It will ask for the partition number to delete. |
229 | It will ask for the partition number to delete. The first partition on Apple |
| 177 | </p> |
230 | machines (Apple_partition_map) can not be deleted. |
| 178 | |
|
|
| 179 | <p> |
231 | </p> |
|
|
232 | |
|
|
233 | <p> |
| 180 | Second, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. It will |
234 | On NewWorld Macs, create an <e>Apple_Bootstrap</e> partition by using <c>b</c>. |
| 181 | ask for what block you want to start. Enter the number of your first free |
235 | It will ask for what block you want to start. Enter the number of your first |
| 182 | partition, followed by a <c>p</c>. For instance this is <c>1p</c>. |
236 | free partition, followed by a <c>p</c>. For instance this is <c>2p</c>. |
| 183 | </p> |
237 | </p> |
| 184 | |
238 | |
| 185 | <note> |
239 | <note> |
| 186 | This partition is <e>not</e> a "boot" partition. It is not used by Linux at all; |
240 | This partition is <e>not</e> a <path>/boot</path> partition. It is not used by |
| 187 | you don't have to place any filesystem on it and you should never mount it. PPC |
241 | Linux at all; you don't have to place any filesystem on it and you should never |
| 188 | users don't need a an extra partition for <path>/boot</path>. |
242 | mount it. Apple users don't need an extra partition for <path>/boot</path>. |
| 189 | </note> |
243 | </note> |
| 190 | |
244 | |
| 191 | <p> |
245 | <p> |
| 192 | Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will |
246 | Now create a swap partition by pressing <c>c</c>. Again <c>mac-fdisk</c> will |
| 193 | ask for what block you want to start this partition from. As we used <c>1</c> |
247 | ask for what block you want to start this partition from. As we used <c>2</c> |
| 194 | before to create the Apple_Bootstrap partition, you now have to enter |
248 | before to create the Apple_Bootstrap partition, you now have to enter |
| 195 | <c>2p</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 |
| 196 | you want -- 512MB is recommended though). When asked for a name, enter <c>swap</c> |
250 | you want -- 512MB is recommended though). When asked for a name, enter |
| 197 | (mandatory). |
251 | <c>swap</c> (mandatory). |
| 198 | </p> |
|
|
| 199 | |
|
|
| 200 | <p> |
252 | </p> |
|
|
253 | |
|
|
254 | <p> |
| 201 | To create the root partition, enter <c>c</c>, followed by <c>3p</c> to select |
255 | To create the root partition, enter <c>c</c>, followed by <c>4p</c> to select |
| 202 | from what block the root partition should start. When asked for the size, enter |
256 | from what block the root partition should start. When asked for the size, enter |
| 203 | <c>3p</c> again. <c>mac-fdisk</c> will interpret this as "Use all available |
257 | <c>4p</c> again. <c>mac-fdisk</c> will interpret this as "Use all available |
| 204 | space". When asked for the name, enter <c>root</c> (mandatory). |
258 | space". When asked for the name, enter <c>root</c> (mandatory). |
| 205 | </p> |
259 | </p> |
| 206 | |
260 | |
| 207 | <p> |
261 | <p> |
| 208 | To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to |
262 | To finish up, write the partition to the disk using <c>w</c> and <c>q</c> to |
| 209 | quit <c>mac-fdisk</c>. |
263 | quit <c>mac-fdisk</c>. |
| 210 | </p> |
264 | </p> |
| 211 | |
265 | |
|
|
266 | <note> |
|
|
267 | To make sure everything is ok, you should run mac-fdisk once more and check |
|
|
268 | whether all the partitions are there. If you don't see any of the partitions |
|
|
269 | you created, or the changes you made, you should reinitialize your partitions |
|
|
270 | by pressing "i" in mac-fdisk. Note that this will recreate the partition map |
|
|
271 | and thus remove all your partitions. |
|
|
272 | </note> |
|
|
273 | |
| 212 | <p> |
274 | <p> |
| 213 | Now that your partitions are created, you can now continue with <uri |
275 | Now that your partitions are created, you can continue with <uri |
| 214 | link="#filesystems">Creating Filesystems</uri>. |
276 | link="#filesystems">Creating Filesystems</uri>. |
| 215 | </p> |
277 | </p> |
| 216 | |
278 | |
| 217 | </body> |
279 | </body> |
| 218 | </section> |
280 | </section> |
| 219 | <section id="parted"> |
281 | <section id="parted"> |
| 220 | <title>Using parted (Pegasos) to Partition your Disk</title> |
282 | <title>Using parted (Mostly Pegasos) to Partition your Disk</title> |
| 221 | <body> |
283 | <body> |
|
|
284 | |
|
|
285 | <p> |
|
|
286 | <c>parted</c>, the Partition Editor, can now handle HFS+ partitions used by |
|
|
287 | Mac OS and Mac OS X. With this tool you can resize your Mac-partitions and |
|
|
288 | create space for your Linux partitions. Nevertheless, the example below |
|
|
289 | describes partitioning for Pegasos machines only. |
|
|
290 | </p> |
| 222 | |
291 | |
| 223 | <p> |
292 | <p> |
| 224 | To begin let's fire up <c>parted</c>: |
293 | To begin let's fire up <c>parted</c>: |
| 225 | </p> |
294 | </p> |
| 226 | |
295 | |
| 227 | <pre caption="Starting parted"> |
296 | <pre caption="Starting parted"> |
| 228 | # <i>parted /dev/hda</i> |
297 | # <i>parted /dev/hda</i> |
| 229 | </pre> |
298 | </pre> |
| 230 | |
299 | |
| 231 | <p> |
300 | <p> |
| 232 | If the drive is unpartitioned, run <c>mklabel amiga</c> to create a new |
301 | If the drive isn't partitioned, run <c>mklabel amiga</c> to create a new |
| 233 | disklabel for the drive. |
302 | disklabel for the drive. |
| 234 | </p> |
303 | </p> |
| 235 | |
304 | |
| 236 | <p> |
305 | <p> |
| 237 | You can type <c>print</c> at any time in parted to display the current partition |
306 | You can type <c>print</c> at any time in parted to display the current partition |
| 238 | table. Your changes aren't saved until you quit the application; if at any time |
307 | table. If at any time you change your mind or made a mistake you can press |
| 239 | you change your mind or made a mistake you can press <c>Ctrl-c</c> to abort |
308 | <c>Ctrl-c</c> to abort parted. |
| 240 | parted. |
|
|
| 241 | </p> |
309 | </p> |
| 242 | |
310 | |
| 243 | <p> |
311 | <p> |
| 244 | If you intend to also install MorphOS on your Pegasos create an affs1 filesystem |
312 | If you intend to also install MorphOS on your Pegasos create an affs1 filesystem |
| 245 | named "BI0" (BI zero) at the start of the drive. 50MB should be more than enough |
313 | named "BI0" (BI zero) at the start of the drive. 32MB should be more than enough |
| 246 | to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs, |
314 | to store the MorphOS kernel. If you have a Pegasos I or intend to use reiserfs |
| 247 | xfs or jfs you will also have to store your Linux kernel on this partition (the |
315 | or xfs, you will also have to store your Linux kernel on this partition (the |
| 248 | Pegasos II can boot from ext2/ext3 drives). To create the partition run |
316 | Pegasos II can only boot from ext2/ext3 or affs1 partitions). To create the partition run |
| 249 | <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 |
| 250 | be replaced with the megabyte range (f.i. <c>5 55</c> creates a 50 MB partition |
318 | be replaced with the megabyte range (e.g. <c>0 32</c> creates a 32 MB partition |
| 251 | starting at 5MB and ending at 55MB. |
319 | starting at 0MB and ending at 32MB. |
| 252 | </p> |
320 | </p> |
| 253 | |
321 | |
| 254 | <p> |
322 | <p> |
| 255 | You need to create two partitions for Linux, one root filesystem for all your |
323 | You need to create two partitions for Linux, one root filesystem for all your |
| 256 | program files etc, and one swap partition. To create the root filesystem you |
324 | program files etc, and one swap partition. To create the root filesystem you |
| 257 | must first decide which filesystem to use. Possible options are ext2, ext3, |
325 | must first decide which filesystem to use. Possible options are ext2, ext3, |
| 258 | reiserfs, jfs and xfs. Unless you know what you are doing, use ext3. Run |
326 | reiserfs and xfs. Unless you know what you are doing, use ext3. Run |
| 259 | <c>mkpart primary ext3 START END</c> to create an ext3 partition. Again, replace |
327 | <c>mkpart primary ext3 START END</c> to create an ext3 partition. Again, replace |
| 260 | <c>START</c> and <c>END</c> with the megabyte start and stop marks for the |
328 | <c>START</c> and <c>END</c> with the megabyte start and stop marks for the |
| 261 | partition. |
329 | partition. |
| 262 | </p> |
330 | </p> |
| 263 | |
331 | |
| … | |
… | |
| 269 | partition, run <c>mkpart primary linux-swap START END</c>. |
337 | partition, run <c>mkpart primary linux-swap START END</c>. |
| 270 | </p> |
338 | </p> |
| 271 | |
339 | |
| 272 | <p> |
340 | <p> |
| 273 | Write down the partition minor numbers as they are required during the |
341 | Write down the partition minor numbers as they are required during the |
| 274 | installation process. To dislay the minor numbers run <c>print</c>. Your drives |
342 | installation process. To display the minor numbers run <c>print</c>. Your drives |
| 275 | are accessed as <path>/dev/hdaX</path> where X is replaced with the minor number |
343 | are accessed as <path>/dev/hdaX</path> where X is replaced with the minor number |
| 276 | of the partition. |
344 | of the partition. |
| 277 | </p> |
345 | </p> |
| 278 | |
346 | |
| 279 | <p> |
347 | <p> |
| … | |
… | |
| 287 | <subsection> |
355 | <subsection> |
| 288 | <title>Introduction</title> |
356 | <title>Introduction</title> |
| 289 | <body> |
357 | <body> |
| 290 | |
358 | |
| 291 | <p> |
359 | <p> |
| 292 | Now that your partitions are created, it is time to place a filesystem on them. |
360 | Now that your partitions are created, it is time to place a filesystem on them. |
| 293 | If you don't care about what filesystem to choose and are happy with what we use |
361 | If you don't care about what filesystem to choose and are happy with what we use |
| 294 | as default in this handbook, continue with <uri |
362 | as default in this handbook, continue with <uri |
| 295 | link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. |
363 | link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. |
| 296 | Otherwise read on to learn about the available filesystems... |
364 | Otherwise read on to learn about the available filesystems... |
| 297 | </p> |
365 | </p> |
| 298 | |
366 | |
| 299 | </body> |
367 | </body> |
| 300 | </subsection> |
368 | </subsection> |
| 301 | <subsection> |
369 | <subsection> |
| 302 | <title>Filesystems?</title> |
370 | <title>Filesystems?</title> |
| 303 | <body> |
371 | <body> |
| 304 | |
372 | |
| 305 | <p> |
373 | <p> |
| 306 | Several filesystems are available. Ext2 and ext3 are found stable on the |
374 | Several filesystems are available. ext2, ext3, ReiserFS and XFS have been found |
| 307 | PPC architecture, reiserfs and xfs are in experimental stage. jfs is |
375 | stable on the PPC architecture. |
| 308 | unsupported. |
|
|
| 309 | </p> |
376 | </p> |
| 310 | |
377 | |
| 311 | <p> |
378 | <p> |
| 312 | <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 |
| 313 | journaling, which means that routine ext2 filesystem checks at startup time can |
380 | journaling, which means that routine ext2 filesystem checks at startup time can |
| … | |
… | |
| 321 | <p> |
388 | <p> |
| 322 | <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 |
| 323 | journaling for fast recovery in addition to other enhanced journaling modes like |
390 | journaling for fast recovery in addition to other enhanced journaling modes like |
| 324 | full data and ordered data journaling. ext3 is a very good and reliable |
391 | full data and ordered data journaling. ext3 is a very good and reliable |
| 325 | filesystem. It has an additional hashed b-tree indexing option that enables |
392 | filesystem. It has an additional hashed b-tree indexing option that enables |
| 326 | high performance in almost all situations. In short, ext3 is an excellent |
393 | high performance in almost all situations. You can enable this indexing by |
| 327 | filesystem. |
394 | adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an |
|
|
395 | excellent filesystem. |
| 328 | </p> |
396 | </p> |
| 329 | |
397 | |
| 330 | <p> |
398 | <p> |
| 331 | <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 |
| 332 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
400 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
| … | |
… | |
| 336 | as the creation of large filesystems, the use of many small files, very large |
404 | as the creation of large filesystems, the use of many small files, very large |
| 337 | files and directories containing tens of thousands of files. |
405 | files and directories containing tens of thousands of files. |
| 338 | </p> |
406 | </p> |
| 339 | |
407 | |
| 340 | <p> |
408 | <p> |
| 341 | <b>XFS</b> is a filesystem with metadata journaling that is fully supported |
409 | <b>XFS</b> is a filesystem with metadata journaling which comes with a robust |
| 342 | under Gentoo Linux's xfs-sources kernel. It comes with a robust feature-set and |
|
|
| 343 | is optimized for scalability. We only recommend using this filesystem on Linux |
410 | feature-set and is optimized for scalability. We only recommend using this |
| 344 | systems with high-end SCSI and/or fibre channel storage and a uninterruptible |
411 | filesystem on Linux systems with high-end SCSI and/or fibre channel storage and |
| 345 | power supply. Because XFS aggressively caches in-transit data in RAM, improperly |
412 | an uninterruptible power supply. Because XFS aggressively caches in-transit data |
| 346 | designed programs (those that don't take proper precautions when writing files |
413 | in RAM, improperly designed programs (those that don't take proper precautions |
| 347 | to disk and there are quite a few of them) can lose a good deal of data if the |
414 | when writing files to disk and there are quite a few of them) can lose a good |
| 348 | system goes down unexpectedly. |
415 | deal of data if the system goes down unexpectedly. |
| 349 | </p> |
|
|
| 350 | |
|
|
| 351 | <p> |
|
|
| 352 | <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently |
|
|
| 353 | become production-ready and there hasn't been a sufficient track record to |
|
|
| 354 | comment positively nor negatively on its general stability at this point. |
|
|
| 355 | </p> |
416 | </p> |
| 356 | |
417 | |
| 357 | </body> |
418 | </body> |
| 358 | </subsection> |
419 | </subsection> |
| 359 | <subsection id="filesystems-apply"> |
420 | <subsection id="filesystems-apply"> |
| … | |
… | |
| 370 | <th>Filesystem</th> |
431 | <th>Filesystem</th> |
| 371 | <th>Creation Command</th> |
432 | <th>Creation Command</th> |
| 372 | </tr> |
433 | </tr> |
| 373 | <tr> |
434 | <tr> |
| 374 | <ti>ext2</ti> |
435 | <ti>ext2</ti> |
| 375 | <ti><c>mke2fs</c></ti> |
436 | <ti><c>mkfs.ext2</c></ti> |
| 376 | </tr> |
437 | </tr> |
| 377 | <tr> |
438 | <tr> |
| 378 | <ti>ext3</ti> |
439 | <ti>ext3</ti> |
| 379 | <ti><c>mke2fs -j</c></ti> |
440 | <ti><c>mkfs.ext3</c></ti> |
| 380 | </tr> |
441 | </tr> |
| 381 | <tr> |
442 | <tr> |
| 382 | <ti>reiserfs</ti> |
443 | <ti>reiserfs</ti> |
| 383 | <ti><c>mkreiserfs</c></ti> |
444 | <ti><c>mkfs.reiserfs</c></ti> |
| 384 | </tr> |
445 | </tr> |
| 385 | <tr> |
446 | <tr> |
| 386 | <ti>xfs</ti> |
447 | <ti>xfs</ti> |
| 387 | <ti><c>mkfs.xfs</c></ti> |
448 | <ti><c>mkfs.xfs</c></ti> |
| 388 | </tr> |
449 | </tr> |
| 389 | <tr> |
|
|
| 390 | <ti>jfs</ti> |
|
|
| 391 | <ti><c>mkfs.jfs</c></ti> |
|
|
| 392 | </tr> |
|
|
| 393 | </table> |
450 | </table> |
| 394 | |
451 | |
| 395 | <p> |
452 | <p> |
| 396 | For instance, to have the root partition (<path>/dev/hda3</path> in our example) |
453 | For instance, to have the root partition (<path>/dev/hda4</path> in our example) |
| 397 | in ext3 (as in our example), you would use: |
454 | in ext3 (as in our example), you would use: |
| 398 | </p> |
455 | </p> |
| 399 | |
456 | |
| 400 | <pre caption="Applying a filesystem on a partition"> |
457 | <pre caption="Applying a filesystem on a partition"> |
| 401 | # <i>mke2fs -j /dev/hda3</i> |
458 | # <i>mkfs.ext3 /dev/hda4</i> |
| 402 | </pre> |
459 | </pre> |
| 403 | |
460 | |
| 404 | <p> |
461 | <p> |
| 405 | Now create the filesystems on your newly created partitions (or logical |
462 | Now create the filesystems on your newly created partitions (or logical |
| 406 | volumes). |
463 | volumes). |
| 407 | </p> |
464 | </p> |
| 408 | |
465 | |
|
|
466 | <note> |
|
|
467 | On the PegasosII your partition which holds the kernel must be ext2 or ext3. |
|
|
468 | NewWorld machines can boot from any of ext2, ext3, XFS, ReiserFS or even |
|
|
469 | HFS/HFS+ filesystems. On OldWorld machines booting with BootX, the kernel must |
|
|
470 | be placed on an HFS partition, but this will be completed when you configure |
|
|
471 | your bootloader. |
|
|
472 | </note> |
|
|
473 | |
| 409 | </body> |
474 | </body> |
| 410 | </subsection> |
475 | </subsection> |
| 411 | <subsection> |
476 | <subsection> |
| 412 | <title>Activating the Swap Partition</title> |
477 | <title>Activating the Swap Partition</title> |
| 413 | <body> |
478 | <body> |
| … | |
… | |
| 415 | <p> |
480 | <p> |
| 416 | <c>mkswap</c> is the command that is used to initialize swap partitions: |
481 | <c>mkswap</c> is the command that is used to initialize swap partitions: |
| 417 | </p> |
482 | </p> |
| 418 | |
483 | |
| 419 | <pre caption="Creating a Swap signature"> |
484 | <pre caption="Creating a Swap signature"> |
| 420 | # <i>mkswap /dev/hda2</i> |
485 | # <i>mkswap /dev/hda3</i> |
| 421 | </pre> |
486 | </pre> |
| 422 | |
487 | |
| 423 | <p> |
488 | <p> |
| 424 | To activate the swap partition, use <c>swapon</c>: |
489 | To activate the swap partition, use <c>swapon</c>: |
| 425 | </p> |
490 | </p> |
| 426 | |
491 | |
| 427 | <pre caption="Activating the swap partition"> |
492 | <pre caption="Activating the swap partition"> |
| 428 | # <i>swapon /dev/hda2</i> |
493 | # <i>swapon /dev/hda3</i> |
| 429 | </pre> |
494 | </pre> |
| 430 | |
495 | |
| 431 | <p> |
496 | <p> |
| 432 | Create and activate the swap now. |
497 | Create and activate the swap now. |
| 433 | </p> |
498 | </p> |
| … | |
… | |
| 441 | |
506 | |
| 442 | <p> |
507 | <p> |
| 443 | Now that your partitions are initialized and are housing a filesystem, it is |
508 | Now that your partitions are initialized and are housing a filesystem, it is |
| 444 | time to mount those partitions. Use the <c>mount</c> command. Don't forget to |
509 | time to mount those partitions. Use the <c>mount</c> command. Don't forget to |
| 445 | create the necessary mount directories for every partition you created. As an |
510 | create the necessary mount directories for every partition you created. As an |
| 446 | example we create a mount-point and mount the root and boot partition: |
511 | example we create a mount-point and mount the root partition: |
| 447 | </p> |
512 | </p> |
| 448 | |
513 | |
| 449 | <pre caption="Mounting partitions"> |
514 | <pre caption="Mounting partitions"> |
| 450 | # <i>mkdir /mnt/gentoo</i> |
515 | # <i>mkdir /mnt/gentoo</i> |
| 451 | # <i>mount /dev/hda3 /mnt/gentoo</i> |
516 | # <i>mount /dev/hda4 /mnt/gentoo</i> |
| 452 | </pre> |
517 | </pre> |
| 453 | |
518 | |
| 454 | <note> |
519 | <note> |
| 455 | If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
520 | If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
| 456 | change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This |
521 | change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This |
| 457 | also holds for <path>/var/tmp</path>. |
522 | also holds for <path>/var/tmp</path>. |
| 458 | </note> |
523 | </note> |
| 459 | |
524 | |
| 460 | <p> |
525 | <p> |
| 461 | We also need to mount the proc filesystem (a virtual interface with the kernel) |
526 | We will have to mount the proc filesystem (a virtual interface with the |
| 462 | on <path>/proc</path>. We first create the <path>/mnt/gentoo/proc</path> |
527 | kernel) on <path>/proc</path>. But first we will need to place our files on the |
| 463 | mountpoint and then mount the filesystem: |
528 | partitions. |
| 464 | </p> |
|
|
| 465 | |
|
|
| 466 | <pre caption="Creating the /mnt/gentoo/proc mountpoint"> |
|
|
| 467 | # <i>mkdir /mnt/gentoo/proc</i> |
|
|
| 468 | # <i>mount -t proc none /mnt/gentoo/proc</i> |
|
|
| 469 | </pre> |
|
|
| 470 | |
|
|
| 471 | <p> |
529 | </p> |
| 472 | Finally we have to create the <path>/dev</path> files in our new home, which is |
530 | |
| 473 | needed during the bootloader installation. This could be done by "bind"-mapping |
|
|
| 474 | the <path>/dev</path>-filesystem from the LiveCD: |
|
|
| 475 | </p> |
531 | <p> |
| 476 | |
|
|
| 477 | <pre caption="Bind-mounting the /dev-filesystem"> |
|
|
| 478 | # <i>mkdir /mnt/gentoo/dev</i> |
|
|
| 479 | # <i>mount -o bind /dev /mnt/gentoo/dev</i> |
|
|
| 480 | </pre> |
|
|
| 481 | |
|
|
| 482 | <p> |
|
|
| 483 | Now continue with <uri link="?part=1&chap=5">Installing the Gentoo |
532 | Continue with <uri link="?part=1&chap=5">Installing the Gentoo |
| 484 | Installation Files</uri>. |
533 | Installation Files</uri>. |
| 485 | </p> |
534 | </p> |
| 486 | |
535 | |
| 487 | </body> |
536 | </body> |
| 488 | </section> |
537 | </section> |