/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-sparc-disk.xml
Gentoo

Contents of /xml/htdocs/doc/en/handbook/hb-install-sparc-disk.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.31 - (show annotations) (download) (as text)
Tue Apr 1 08:53:46 2008 UTC (6 years, 5 months ago) by nightmorph
Branch: MAIN
Changes since 1.30: +9 -65 lines
File MIME type: application/xml
release time. note that since this is beta1, the release dir and stage/media names have been adjusted accordingly. also, the handbooks are marked with a disclaimer=draft, so once the final is out, that will be removed and the release names adjusted. in the mean time, these are live. the beta is officially released. no, it's not april fools, but it is april 1st. :)

1 <?xml version='1.0' encoding='UTF-8'?>
2 <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3
4 <!-- The content of this document is licensed under the CC-BY-SA license -->
5 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6
7 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-sparc-disk.xml,v 1.24 2008/03/31 21:48:59 nightmorph Exp $ -->
8
9 <sections>
10
11 <version>5.0</version>
12 <date>2008-04-01</date>
13
14 <section>
15 <title>Introduction to Block Devices</title>
16
17 <subsection>
18 <include href="hb-install-blockdevices.xml"/>
19 </subsection>
20
21 <subsection>
22 <title>Partitions</title>
23 <body>
24
25 <p>
26 Although it is theoretically possible to use the entire disk to house your Linux
27 system, this is almost never done in practice. Instead, full disk block devices
28 are split up in smaller, more manageable block devices. These are known as
29 <e>partitions</e> or <e>slices</e>.
30 </p>
31
32 <p>
33 The first partition on the first SCSI disk is <path>/dev/sda1</path>, the second
34 <path>/dev/sda2</path> and so on. Similarly, the first two partitions on the
35 first IDE disk are <path>/dev/hda1</path> and <path>/dev/hda2</path>.
36 </p>
37
38 <p>
39 The third partition on Sun systems is set aside as a special "whole disk"
40 slice. This partition must not contain a file system.
41 </p>
42
43 <p>
44 Users who are used to the DOS partitioning scheme should note that Sun
45 disklabels do not have "primary" and "extended" partitions. Instead, up to
46 eight partitions are available per drive, with the third of these being
47 reserved.
48 </p>
49
50 </body>
51 </subsection>
52 </section>
53 <section>
54 <title>Designing a Partitioning Scheme</title>
55 <subsection>
56 <title>Default Partitioning Scheme</title>
57 <body>
58
59 <p>
60 If you are not interested in drawing up a partitioning scheme,
61 the table below suggests a suitable starting point for most systems. For
62 IDE-based systems, substitute <c>hda</c> for <c>sda</c> in the following.
63 </p>
64
65 <p>
66 Note that a separate <path>/boot</path> partition is generally <e>not</e>
67 recommended on SPARC, as it complicates the bootloader configuration.
68 </p>
69
70 <table>
71 <tr>
72 <th>Partition</th>
73 <th>Filesystem</th>
74 <th>Size</th>
75 <th>Mount Point</th>
76 <th>Description</th>
77 </tr>
78 <tr>
79 <ti>/dev/sda1</ti>
80 <ti>ext3</ti>
81 <ti>&lt;2 GByte</ti>
82 <ti>/</ti>
83 <ti>
84 Root partition. For sparc64 systems with older OBP versions, this
85 <e>must</e> be less than 2 GBytes in size, and the first partition on the
86 disk.
87 </ti>
88 </tr>
89 <tr>
90 <ti>/dev/sda2</ti>
91 <ti>swap</ti>
92 <ti>512 MBytes</ti>
93 <ti>none</ti>
94 <ti>
95 Swap partition. For bootstrap and certain larger compiles, at least 512
96 MBytes of RAM (including swap) is required.
97 </ti>
98 </tr>
99 <tr>
100 <ti>/dev/sda3</ti>
101 <ti>none</ti>
102 <ti>Whole disk</ti>
103 <ti>none</ti>
104 <ti>Whole disk partition. This is required on SPARC systems.</ti>
105 </tr>
106 <tr>
107 <ti>/dev/sda4</ti>
108 <ti>ext3</ti>
109 <ti>at least 2 GBytes</ti>
110 <ti>/usr</ti>
111 <ti>
112 /usr partition. Applications are installed here. By default this partition
113 is also used for Portage data (which takes around 500 Mbyte excluding
114 source code).
115 </ti>
116 </tr>
117 <tr>
118 <ti>/dev/sda5</ti>
119 <ti>ext3</ti>
120 <ti>at least 1GByte</ti>
121 <ti>/var</ti>
122 <ti>
123 /var partition. Used for program-generated data. By default Portage uses
124 this partition for temporary space whilst compiling. Certain larger
125 applications such as Mozilla and OpenOffice.org can require over 1 GByte
126 of temporary space here when building.
127 </ti>
128 </tr>
129 <tr>
130 <ti>/dev/sda6</ti>
131 <ti>ext3</ti>
132 <ti>remaining space</ti>
133 <ti>/home</ti>
134 <ti>/home partition. Used for users' home directories.</ti>
135 </tr>
136 </table>
137
138 </body>
139 </subsection>
140 </section>
141
142 <section id="fdisk">
143 <title>Using fdisk to Partition your Disk</title>
144 <subsection>
145 <body>
146
147 <p>
148 The following parts explain how to create the example partition layout described
149 previously, namely:
150 </p>
151
152 <table>
153 <tr>
154 <th>Partition</th>
155 <th>Description</th>
156 </tr>
157 <tr>
158 <ti>/dev/sda1</ti>
159 <ti>/</ti>
160 </tr>
161 <tr>
162 <ti>/dev/sda2</ti>
163 <ti>swap</ti>
164 </tr>
165 <tr>
166 <ti>/dev/sda3</ti>
167 <ti>whole disk slice</ti>
168 </tr>
169 <tr>
170 <ti>/dev/sda4</ti>
171 <ti>/usr</ti>
172 </tr>
173 <tr>
174 <ti>/dev/sda5</ti>
175 <ti>/var</ti>
176 </tr>
177 <tr>
178 <ti>/dev/sda6</ti>
179 <ti>/home</ti>
180 </tr>
181 </table>
182
183 <p>
184 Change the partition layout as required. Remember to keep the root partition
185 entirely within the first 2 GBytes of the disk for older systems. There is also
186 a 15-partition limit for SCSI and SATA.
187 </p>
188
189 </body>
190 </subsection>
191 <subsection>
192 <title>Firing up fdisk</title>
193 <body>
194
195 <p>
196 Start <c>fdisk</c> with your disk as argument:
197 </p>
198
199 <pre caption="Starting fdisk">
200 # <i>fdisk /dev/sda</i>
201 </pre>
202
203 <p>
204 You should be greeted with the fdisk prompt:
205 </p>
206
207 <pre caption="The fdisk prompt">
208 Command (m for help):
209 </pre>
210
211 <p>
212 To view the available partitions, type in <c>p</c>:
213 </p>
214
215 <pre caption="Listing available partitions">
216 Command (m for help): <i>p</i>
217
218 Disk /dev/sda (Sun disk label): 64 heads, 32 sectors, 8635 cylinders
219 Units = cylinders of 2048 * 512 bytes
220
221 Device Flag Start End Blocks Id System
222 /dev/sda1 0 488 499712 83 Linux native
223 /dev/sda2 488 976 499712 82 Linux swap
224 /dev/sda3 0 8635 8842240 5 Whole disk
225 /dev/sda4 976 1953 1000448 83 Linux native
226 /dev/sda5 1953 2144 195584 83 Linux native
227 /dev/sda6 2144 8635 6646784 83 Linux native
228 </pre>
229
230 <p>
231 Note the <c>Sun disk label</c> in the output. If this is missing, the disk is
232 using the DOS-partitioning, not the Sun partitioning. In this case, use <c>s</c>
233 to ensure that the disk has a sun partition table:
234 </p>
235
236 <pre caption="Creating a Sun Disklabel">
237 Command (m for help): s
238 Building a new sun disklabel. Changes will remain in memory only,
239 until you decide to write them. After that, of course, the previous
240 content won't be recoverable.
241
242 Drive type
243 ? auto configure
244 0 custom (with hardware detected defaults)
245 a Quantum ProDrive 80S
246 b Quantum ProDrive 105S
247 c CDC Wren IV 94171-344
248 d IBM DPES-31080
249 e IBM DORS-32160
250 f IBM DNES-318350
251 g SEAGATE ST34371
252 h SUN0104
253 i SUN0207
254 j SUN0327
255 k SUN0340
256 l SUN0424
257 m SUN0535
258 n SUN0669
259 o SUN1.0G
260 p SUN1.05
261 q SUN1.3G
262 r SUN2.1G
263 s IOMEGA Jaz
264 Select type (? for auto, 0 for custom): <i>0</i>
265 Heads (1-1024, default 64):
266 Using default value 64
267 Sectors/track (1-1024, default 32):
268 Using default value 32
269 Cylinders (1-65535, default 8635):
270 Using default value 8635
271 Alternate cylinders (0-65535, default 2):
272 Using default value 2
273 Physical cylinders (0-65535, default 8637):
274 Using default value 8637
275 Rotation speed (rpm) (1-100000, default 5400): <i>10000</i>
276 Interleave factor (1-32, default 1):
277 Using default value 1
278 Extra sectors per cylinder (0-32, default 0):
279 Using default value 0
280 </pre>
281
282 <p>
283 You can find the correct values in your disk's documentation. The
284 'auto configure' option does not usually work.
285 </p>
286
287 </body>
288 </subsection>
289 <subsection>
290 <title>Deleting Existing Partitions</title>
291 <body>
292
293 <p>
294 It's time to delete any existing partitions. To do this, type <c>d</c> and hit
295 Enter. You will then be prompted for the partition number you would like to
296 delete. To delete a pre-existing <path>/dev/sda1</path>, you would type:
297 </p>
298
299 <pre caption="Deleting a partition">
300 Command (m for help): <i>d</i>
301 Partition number (1-4): <i>1</i>
302 </pre>
303
304 <p>
305 <e>You should not delete partition 3 (whole disk).</e> This is required. If
306 this partition does not exist, follow the "Creating a Sun Disklabel"
307 instructions above.
308 </p>
309
310 <p>
311 After deleting all partitions except the Whole disk slice, you should have a
312 partition layout similar to the following:
313 </p>
314
315 <pre caption="View an empty partition scheme">
316 Command (m for help): <i>p</i>
317
318 Disk /dev/sda (Sun disk label): 64 heads, 32 sectors, 8635 cylinders
319 Units = cylinders of 2048 * 512 bytes
320
321 Device Flag Start End Blocks Id System
322 /dev/sda3 0 8635 8842240 5 Whole disk
323 </pre>
324
325
326 </body>
327 </subsection>
328
329 <subsection>
330 <title>Creating the Root Partition</title>
331 <body>
332
333 <p>
334 We're ready to create the root partition. To do this, type <c>n</c> to create a
335 new partition, then type <c>1</c> to create the partition. When prompted for
336 the first cylinder, hit enter. When prompted for the last cylinder, type
337 <c>+512M</c> to create a partition <c>512MBytes</c> in size. Make sure that the
338 entire root partition fits within the first 2GBytes of the disk. You can see
339 output from these steps below:
340 </p>
341
342 <pre caption="Creating a root partition">
343 Command (m for help): <i>n</i>
344 Partition number (1-8): <i>1</i>
345 First cylinder (0-8635): <i>(press Enter)</i>
346 Last cylinder or +size or +sizeM or +sizeK (0-8635, default 8635): <i>+512M</i>
347 </pre>
348
349 <p>
350 Now, when you type <c>p</c>, you should see the following partition printout:
351 </p>
352
353 <pre caption="Listing the partition layout">
354 Command (m for help): <i>p</i>
355
356 Disk /dev/sda (Sun disk label): 64 heads, 32 sectors, 8635 cylinders
357 Units = cylinders of 2048 * 512 bytes
358
359 Device Flag Start End Blocks Id System
360 /dev/sda1 0 488 499712 83 Linux native
361 /dev/sda3 0 8635 8842240 5 Whole disk
362 </pre>
363
364 </body>
365 </subsection>
366 <subsection>
367 <title>Creating a swap partition</title>
368 <body>
369
370 <p>
371 Next, let's create the swap partition. To do this, type <c>n</c> to create a new
372 partition, then <c>2</c> to create the second partition, <path>/dev/sda2</path>
373 in our case. When prompted for the first cylinder, hit enter. When prompted for
374 the last cylinder, type <c>+512M</c> to create a partition 512MB in size. After
375 you've done this, type <c>t</c> to set the partition type, and then type in
376 <c>82</c> to set the partition type to "Linux Swap". After completing these
377 steps, typing <c>p</c> should display a partition table that looks similar to
378 this:
379 </p>
380
381 <pre caption="Listing of available partitions">
382 Command (m for help): <i>p</i>
383
384 Disk /dev/sda (Sun disk label): 64 heads, 32 sectors, 8635 cylinders
385 Units = cylinders of 2048 * 512 bytes
386
387 Device Flag Start End Blocks Id System
388 /dev/sda1 0 488 499712 83 Linux native
389 /dev/sda2 488 976 499712 82 Linux swap
390 /dev/sda3 0 8635 8842240 5 Whole disk
391 </pre>
392
393 </body>
394 </subsection>
395 <subsection>
396 <title>Creating the /usr, /var and /home partitions</title>
397 <body>
398
399 <p>
400 Finally, let's create the /usr, /var and /home partitions. As before,
401 type <c>n</c> to create a new partition, then type <c>4</c> to create the
402 third partition, <path>/dev/sda4</path> in our case. When prompted for the
403 first cylinder, hit enter. When prompted for the last cylinder, enter
404 <c>+2048M</c> to create a partition 2 GBytes in size. Repeat this process
405 for <path>sda5</path> and <path>sda6</path>, using the desired sizes. Once
406 you're done, you should see something like this:
407 </p>
408
409 <pre caption="Listing complete partition table">
410 Command (m for help): <i>p</i>
411
412 Disk /dev/sda (Sun disk label): 64 heads, 32 sectors, 8635 cylinders
413 Units = cylinders of 2048 * 512 bytes
414
415 Device Flag Start End Blocks Id System
416 /dev/sda1 0 488 499712 83 Linux native
417 /dev/sda2 488 976 499712 82 Linux swap
418 /dev/sda3 0 8635 8842240 5 Whole disk
419 /dev/sda4 976 1953 1000448 83 Linux native
420 /dev/sda5 1953 2144 195584 83 Linux native
421 /dev/sda6 2144 8635 6646784 83 Linux native
422 </pre>
423
424 </body>
425 </subsection>
426 <subsection>
427 <title>Save and Exit</title>
428 <body>
429
430 <p>
431 To save your partition layout and exit <c>fdisk</c>, type <c>w</c>:
432 </p>
433
434 <pre caption="Save and exit fdisk">
435 Command (m for help): <i>w</i>
436 </pre>
437
438 <p>
439 Now that your partitions are created, you can now continue with <uri
440 link="#filesystems">Creating Filesystems</uri>.
441 </p>
442
443 </body>
444 </subsection>
445 </section>
446 <section id="filesystems">
447 <title>Creating Filesystems</title>
448 <subsection>
449 <title>Introduction</title>
450 <body>
451
452 <p>
453 Now that your partitions are created, it is time to place a filesystem on them.
454 If you don't care about what filesystem to choose and are happy with what is
455 used as default in this handbook, continue with <uri
456 link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
457 Otherwise, read on to learn about the available filesystems...
458 </p>
459
460 </body>
461 </subsection>
462
463 <subsection>
464 <include href="hb-install-filesystems.xml"/>
465 </subsection>
466
467 <subsection id="filesystems-apply">
468 <title>Applying a Filesystem to a Partition</title>
469 <body>
470
471 <p>
472 To create a filesystem on a partition or volume, tools specific to the chosen
473 filesystem are available:
474 </p>
475
476 <table>
477 <tr>
478 <th>Filesystem</th>
479 <th>Creation Command</th>
480 </tr>
481 <tr>
482 <ti>ext2</ti>
483 <ti><c>mke2fs</c></ti>
484 </tr>
485 <tr>
486 <ti>ext3</ti>
487 <ti><c>mke2fs -j</c></ti>
488 </tr>
489 </table>
490
491 <p>
492 For instance, to create the root partition (<path>/dev/sda1</path> in our
493 example) as ext2, and the <path>/usr</path>, <path>/var</path>, and
494 <path>/home</path> partitions (<path>/dev/sda4</path>, <path>5</path>
495 and <path>6</path> in our example, respectively) as ext3, you would use:
496 </p>
497
498 <pre caption="Applying a filesystem on a partition">
499 # <i>mke2fs /dev/sda1</i>
500 # <i>mke2fs -j /dev/sda4</i>
501 # <i>mke2fs -j /dev/sda5</i>
502 # <i>mke2fs -j /dev/sda6</i>
503 </pre>
504
505 </body>
506 </subsection>
507 <subsection>
508 <title>Activating the Swap Partition</title>
509 <body>
510
511 <p>
512 <c>mkswap</c> is the command used to initialize swap partitions:
513 </p>
514
515 <pre caption="Creating a Swap signature">
516 # <i>mkswap /dev/sda2</i>
517 </pre>
518
519 <p>
520 To activate the swap partition, use <c>swapon</c>:
521 </p>
522
523 <pre caption="Activating the swap partition">
524 # <i>swapon /dev/sda2</i>
525 </pre>
526
527 <p>
528 Create and activate the swap with the commands mentioned above.
529 </p>
530
531 </body>
532 </subsection>
533 </section>
534 <section>
535 <title>Mounting</title>
536 <body>
537
538 <p>
539 Now that your partitions are initialized and are housing a filesystem, it is
540 time to mount them using the <c>mount</c> command. Don't forget to first
541 create the necessary mount directories for every partition you created. For
542 example:
543 </p>
544
545 <pre caption="Mounting partitions">
546 # <i>mount /dev/sda1 /mnt/gentoo</i>
547 # <i>mkdir /mnt/gentoo/usr</i>
548 # <i>mount /dev/sda4 /mnt/gentoo/usr</i>
549 # <i>mkdir /mnt/gentoo/var</i>
550 # <i>mount /dev/sda5 /mnt/gentoo/var</i>
551 # <i>mkdir /mnt/gentoo/home</i>
552 # <i>mount /dev/sda6 /mnt/gentoo/home</i>
553 </pre>
554
555 <note>
556 If you want your <path>/tmp</path> to reside on a separate partition, be sure
557 to change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>.
558 This also holds for <path>/var/tmp</path>.
559 </note>
560
561 <p>
562 We will also have to mount the proc filesystem (a virtual interface with the
563 kernel) on <path>/proc</path>. But first we will need to place our files on the partitions.
564 </p>
565
566 <p>
567 Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo
568 Installation Files</uri>.
569 </p>
570
571 </body>
572 </section>
573 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20