/[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.32 - (hide annotations) (download) (as text)
Fri May 2 08:04:23 2008 UTC (6 years, 5 months ago) by nightmorph
Branch: MAIN
Changes since 1.31: +6 -8 lines
File MIME type: application/xml
As announced on the list (http://archives.gentoo.org/gentoo-doc/msg_e721be404c6a5ae8ce5c5bf02f45381c.xml), assume all arches are using the libata framework, so sd* everywhere. includes updating block device and partition descriptions. also added a new included file for boot config (starting sshd, hdparm, etc). synced up several wayward files, including sparc. also changed/dropped usage of some now useless keys, since everyone's using sd*. lots of intensive, invasive changes. and i never even used sed once.

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

  ViewVC Help
Powered by ViewVC 1.1.20