/[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.40 - (show annotations) (download) (as text)
Tue Dec 17 10:08:59 2013 UTC (9 months ago) by swift
Branch: MAIN
CVS Tags: HEAD
Changes since 1.39: +4 -4 lines
File MIME type: application/xml
Bug #489782 - LibreOffice, not OpenOffice (anymore)

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

  ViewVC Help
Powered by ViewVC 1.1.20