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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.22 - (hide annotations) (download) (as text)
Fri Feb 16 13:45:39 2007 UTC (7 years, 7 months ago) by neysx
Branch: MAIN
Changes since 1.21: +4 -4 lines
File MIME type: application/xml
Removing -O dir_index was not clever.
It'll have to be removed for 2007.0 though.

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.13 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 swift 1.1
7 neysx 1.22 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-mips-disk.xml,v 1.21 2006/11/02 20:49:38 nightmorph Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.7
11 neysx 1.22 <version>1.16</version>
12     <date>2007-02-16</date>
13 swift 1.7
14 swift 1.1 <section>
15     <title>Introduction to Block Devices</title>
16     <subsection>
17     <title>Block Devices</title>
18     <body>
19    
20     <p>
21 neysx 1.19 We'll take a good look at disk-oriented aspects of Gentoo Linux and Linux in
22     general, including Linux filesystems, partitions and block devices. Then, once
23     you're familiar with the ins and outs of disks and filesystems, you'll be
24     guided through the process of setting up partitions and filesystems for your
25     Gentoo Linux installation.
26 swift 1.1 </p>
27    
28     <p>
29     To begin, we'll introduce <e>block devices</e>. The most famous block device is
30     probably the one that represents the first SCSI HD in a Linux system, namely
31     <path>/dev/sda</path>.
32     </p>
33    
34     <p>
35     The block devices above represent an abstract interface to the disk. User
36 neysx 1.19 programs can use these block devices to interact with your disk without
37     worrying about whether your drives are IDE, SCSI or something else. The program
38     can simply address the storage on the disk as a bunch of contiguous,
39 swift 1.1 randomly-accessible 512-byte blocks.
40     </p>
41    
42     </body>
43     </subsection>
44     <subsection>
45     <title>Partitions</title>
46     <body>
47    
48     <p>
49     Although it is theoretically possible to use a full disk to house your Linux
50     system, this is almost never done in practice. Instead, full disk block devices
51 neysx 1.19 are split up in smaller, more manageable block devices. These are called
52 swift 1.1 <e>partitions</e>.
53     </p>
54    
55     </body>
56     </subsection>
57     </section>
58     <section>
59     <title>Designing a Partitioning Scheme</title>
60     <subsection>
61     <title>How Many and How Big?</title>
62     <body>
63    
64     <p>
65     The number of partitions is highly dependent on your environment. For instance,
66     if you have lots of users, you will most likely want to have your
67     <path>/home</path> separate as it increases security and makes backups easier.
68 neysx 1.19 If you are installing Gentoo to perform as a mailserver, your <path>/var</path>
69     should be separate as all mails are stored inside <path>/var</path>. A good
70     choice of filesystem will then maximise your performance. Gameservers will have
71     a separate <path>/opt</path> as most gaming servers are installed there. The
72     reason is similar for <path>/home</path>: security and backups. You will
73     definitely want to keep <path>/usr</path> big: not only will it contain the
74     majority of applications, the Portage tree alone takes around 500 Mbyte
75     excluding the various sources that are stored in it.
76 swift 1.1 </p>
77    
78     <p>
79     As you can see, it very much depends on what you want to achieve. Separate
80     partitions or volumes have the following advantages:
81     </p>
82    
83     <ul>
84     <li>
85 neysx 1.2 You can choose the best performing filesystem for each partition or volume
86 swift 1.1 </li>
87     <li>
88     Your entire system cannot run out of free space if one defunct tool is
89     continuously writing files to a partition or volume
90     </li>
91     <li>
92     If necessary, file system checks are reduced in time, as multiple checks can
93     be done in parallel (although this advantage is more with multiple disks than
94     it is with multiple partitions)
95     </li>
96     <li>
97     Security can be enhanced by mounting some partitions or volumes read-only,
98     nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
99     </li>
100     </ul>
101    
102     <p>
103 neysx 1.19 However, multiple partitions have one big disadvantage: if not configured
104     properly, you might result in having a system with lots of free space on one
105     partition and none on another. There is also a 15-partition limit for SCSI and
106     SATA.
107 swift 1.1 </p>
108    
109     </body>
110     </subsection>
111     </section>
112     <section>
113     <title>Using fdisk on MIPS to Partition your Disk</title>
114     <subsection>
115 swift 1.11 <title>SGI Machines: Creating an SGI Disk Label</title>
116 swift 1.1 <body>
117    
118     <p>
119 neysx 1.19 All disks in an SGI System require an <e>SGI Disk Label</e>, which serves a
120     similar function as Sun &amp; MS-DOS disklabels -- It stores information about
121     the disk partitions. Creating a new SGI Disk Label will create two special
122 swift 1.1 partitions on the disk:
123     </p>
124    
125     <ul>
126     <li>
127 swift 1.11 <e>SGI Volume Header</e> (9th partition): This partition is important. It
128 neysx 1.19 is where the bootloader will reside, and in some cases, it will also
129     contain the kernel images.
130 swift 1.1 </li>
131     <li>
132     <e>SGI Volume</e> (11th partition): This partition is similar in purpose to
133     the Sun Disklabel's third partition of "Whole Disk". This partition spans
134     the entire disk, and should be left untouched. It serves no special purpose
135 neysx 1.19 other than to assist the PROM in some undocumented fashion (or it is used
136     by IRIX in some way).
137 swift 1.1 </li>
138     </ul>
139    
140     <warn>
141     The SGI Volume Header <e>must</e> begin at cylinder 0. Failure to do so means
142     you won't be able to boot from the disk.
143     </warn>
144    
145     <p>
146     The following is an example excerpt from an <c>fdisk</c> session. Read and
147     tailor it to your needs...
148     </p>
149    
150     <pre caption="Creating an SGI Disklabel">
151     # <i>fdisk /dev/sda</i>
152    
153     Command (m for help): <i>x</i>
154    
155     Expert command (m for help): <i>m</i>
156     Command action
157     b move beginning of data in a partition
158     c change number of cylinders
159     d print the raw data in the partition table
160     e list extended partitions
161     f fix partition order
162     g create an IRIX (SGI) partition table
163     h change number of heads
164     m print this menu
165     p print the partition table
166     q quit without saving changes
167     r return to main menu
168     s change number of sectors/track
169     v verify the partition table
170     w write table to disk and exit
171    
172     Expert command (m for help): <i>g</i>
173     Building a new SGI disklabel. Changes will remain in memory only,
174     until you decide to write them. After that, of course, the previous
175 vanquirius 1.17 content will be irrecoverably lost.
176 swift 1.1
177     Expert command (m for help): <i>r</i>
178    
179     Command (m for help): <i>p</i>
180    
181     Disk /dev/sda (SGI disk label): 64 heads, 32 sectors, 17482 cylinders
182     Units = cylinders of 2048 * 512 bytes
183    
184     ----- partitions -----
185     Pt# Device Info Start End Sectors Id System
186     9: /dev/sda1 0 4 10240 0 SGI volhdr
187     11: /dev/sda2 0 17481 35803136 6 SGI volume
188     ----- Bootinfo -----
189     Bootfile: /unix
190     ----- Directory Entries -----
191    
192     Command (m for help):
193     </pre>
194    
195     <note>
196     If your disk already has an existing SGI Disklabel, then fdisk will not allow
197     the creation of a new label. There are two ways around this. One is to create a
198     Sun or MS-DOS disklabel, write the changes to disk, and restart fdisk. The
199     second is to overwrite the partition table with null data via the following
200     command: <c>dd if=/dev/zero of=/dev/sda bs=512 count=1</c>.
201     </note>
202 rane 1.16 </body>
203     </subsection>
204    
205     <subsection>
206     <title>Getting the SGI Volume Header to just the right size</title>
207     <body>
208 swift 1.1
209 rane 1.16 <impo>
210 neysx 1.19 This step is often needed, due to a bug in <c>fdisk</c>. For some reason, the
211 rane 1.16 volume header isn't created correctly, the end result being it starts and ends
212 neysx 1.19 on cylinder 0. This prevents multiple partitions from being created. To get
213 rane 1.16 around this issue... read on.
214     </impo>
215 swift 1.1
216     <p>
217     Now that an SGI Disklabel is created, partitions may now be defined. In the
218     above example, there are already two partitions defined for you. These are the
219     special partitions mentioned above and should not normally be altered. However,
220 rane 1.16 for installing Gentoo, we'll need to load a bootloader, and possibly multiple
221 neysx 1.19 kernel images (depending on system type) directly into the volume header. The
222     volume header itself can hold up to <e>eight</e> images of any size, with each
223     image allowed eight-character names.
224 swift 1.1 </p>
225    
226 fox2mike 1.18 <note>
227     On SGI systems, there are two bootloaders available: <c>arcboot</c> and
228 neysx 1.19 <c>arcload</c>. Currently, only the Indy, Indigo2 (R4k variety), Challenge S
229 fox2mike 1.18 and O2 are capable of using <c>arcboot</c> as a bootloader, whereas
230 neysx 1.19 <c>arcload</c> runs on all the Linux-supported SGI machines. Unlike
231 fox2mike 1.18 <c>arcboot</c> however, <c>arcload</c> cannot presently read EXT2/3 partitions,
232     and thus, loads its kernels from the volume header.
233     </note>
234    
235 swift 1.1 <p>
236 rane 1.16 The process of making the volume header larger isn't exactly straight-forward;
237 swift 1.1 there's a bit of a trick to it. One cannot simply delete and re-add the volume
238     header due to odd fdisk behavior. In the example provided below, we'll create a
239 neysx 1.19 50MB Volume header in conjunction with a 50MB /boot partition. The actual
240     layout of your disk may vary, but this is for illustrative purposes only.
241 swift 1.1 </p>
242    
243     <pre caption="Resizing the SGI Volume Header correctly">
244     Command (m for help): <i>n</i>
245     Partition number (1-16): <i>1</i>
246     First cylinder (5-8682, default 5): <i>51</i>
247     Last cylinder (51-8682, default 8682): <i>101</i>
248 swift 1.11
249 rane 1.16 <comment>(Notice how fdisk only allows Partition #1 to be re-created starting at a )
250     (minimum of cylinder 5? Had you attempted to delete &amp; re-create the SGI )
251     (Volume Header this way, this is the same issue you would have encountered. )
252     (In our example, we want /boot to be 50MB, so we start it at cylinder 51 (the )
253     (Volume Header needs to start at cylinder 0, remember?), and set its ending )
254     (cylinder to 101, which will roughly be 50MB (+/- 1-5MB). )</comment>
255 swift 1.1
256     Command (m for help): <i>d</i>
257     Partition number (1-16): <i>9</i>
258 swift 1.11
259 swift 1.1 <comment>(Delete Partition #9 (SGI Volume Header))</comment>
260    
261     Command (m for help): <i>n</i>
262     Partition number (1-16): <i>9</i>
263     First cylinder (0-50, default 0): <i>0</i>
264     Last cylinder (0-50, default 50): <i>50</i>
265 swift 1.11
266 swift 1.1 <comment>(Re-Create Partition #9, ending just before Partition #1)</comment>
267     </pre>
268 rane 1.16
269 swift 1.11 <p>
270     If you're unsure how to use <c>fdisk</c> have a look down further at the
271 neysx 1.19 instructions for partitioning on Cobalts. The concepts are exactly the same --
272 swift 1.11 just remember to leave the volume header and whole disk partitions alone.
273     </p>
274    
275 rane 1.16 <p>
276 neysx 1.19 Once this is done, you are safe to create the rest of your partitions as you
277     see fit. After all your partitions are laid out, make sure you set the
278     partition ID of your swap partition to <c>82</c>, which is Linux Swap. By
279     default, it will be <c>83</c>, Linux Native.
280 rane 1.16 </p>
281 swift 1.11
282     <p>
283     Now that your partitions are created, you can now continue with <uri
284     link="#filesystems">Creating Filesystems</uri>.
285     </p>
286 swift 1.1
287     </body>
288     </subsection>
289 swift 1.11
290 swift 1.1 <subsection>
291 swift 1.11 <title>Cobalt Machines: Partitioning your drive</title>
292 swift 1.1 <body>
293    
294     <p>
295 neysx 1.19 On Cobalt machines, the BOOTROM expects to see a MS-DOS MBR, so partitioning
296     the drive is relatively straightforward -- in fact, it's done the same way as
297     you'd do for an Intel x86 machine. <e>However</e> there are some things you
298     need to bear in mind.
299 swift 1.11 </p>
300    
301     <ul>
302     <li>
303     Cobalt firmware will expect <path>/dev/hda1</path> to be a Linux partition
304 neysx 1.19 formatted <e>EXT2 Revision 0</e>. <e>EXT2 Revision 1 partitions will NOT
305     WORK!</e> (The Cobalt BOOTROM only understands EXT2r0)
306 swift 1.11 </li>
307     <li>
308     The above said partition must contain a gzipped ELF image,
309 neysx 1.19 <path>vmlinux.gz</path> in the root of that partition, which it loads as
310     the kernel
311 swift 1.11 </li>
312     </ul>
313    
314     <p>
315     For that reason, I recommend creating a ~20MB <path>/boot</path> partition
316 neysx 1.19 formatted EXT2r0 upon which you can install CoLo &amp; your kernels. This
317 swift 1.11 allows you to run a modern filesystem (EXT3 or ReiserFS) for your root
318     filesystem.
319     </p>
320    
321     <p>
322     I will assume you have created <path>/dev/hda1</path> to mount later as a
323 neysx 1.19 <path>/boot</path> partition. If you wish to make this <path>/</path>, you'll
324 swift 1.11 need to keep the PROM's expectations in mind.
325     </p>
326    
327     <p>
328     So, continuing on... To create the partitions you type <c>fdisk /dev/hda</c> at
329 neysx 1.19 the prompt. The main commands you need to know are these:
330 swift 1.1 </p>
331    
332 swift 1.11 <ul>
333     <li>
334     <c>o</c>: Wipe out old partition table, starting with an empty MS-DOS
335     partition table
336     </li>
337     <li>
338     <c>n</c>: New Partition
339     </li>
340     <li>
341     <c>t</c>: Change Partition Type
342     <ul>
343     <li>Use type <c>82</c> for Linux Swap, <c>83</c> for Linux FS</li>
344     </ul>
345     </li>
346     <li>
347     <c>d</c>: Delete a partition
348     </li>
349     <li>
350     <c>p</c>: Display (print) Partition Table
351     </li>
352     <li>
353     <c>q</c>: Quit -- leaving old partition table as is.
354     </li>
355     <li>
356     <c>w</c>: Quit -- writing partition table in the process.
357     </li>
358     </ul>
359    
360     <pre caption="Partitioning the disk">
361     # <i>fdisk /dev/hda</i>
362    
363     The number of cylinders for this disk is set to 19870.
364     There is nothing wrong with that, but this is larger than 1024,
365     and could in certain setups cause problems with:
366     1) software that runs at boot time (e.g., old versions of LILO)
367     2) booting and partitioning software from other OSs
368     (e.g., DOS FDISK, OS/2 FDISK)
369    
370     <comment>(Start by clearing out any existing partitions)</comment>
371     Command (m for help): <i>o</i>
372     Building a new DOS disklabel. Changes will remain in memory only,
373     until you decide to write them. After that, of course, the previous
374     content won't be recoverable.
375    
376    
377     The number of cylinders for this disk is set to 19870.
378     There is nothing wrong with that, but this is larger than 1024,
379     and could in certain setups cause problems with:
380     1) software that runs at boot time (e.g., old versions of LILO)
381     2) booting and partitioning software from other OSs
382     (e.g., DOS FDISK, OS/2 FDISK)
383     Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
384    
385     <comment>(You can now verify the partition table is empty using the 'p' command)</comment>
386    
387     Command (m for help): <i>p</i>
388    
389     Disk /dev/hda: 10.2 GB, 10254827520 bytes
390     16 heads, 63 sectors/track, 19870 cylinders
391     Units = cylinders of 1008 * 512 = 516096 bytes
392    
393     Device Boot Start End Blocks Id System
394    
395     <comment>(Create the /boot partition)</comment>
396    
397     Command (m for help): <i>n</i>
398     Command action
399     e extended
400     p primary partition (1-4)
401     <i>p</i>
402     Partition number (1-4): <i>1</i>
403    
404     <comment>(Just press ENTER here to accept the default)</comment>
405    
406     First cylinder (1-19870, default 1):
407     Last cylinder or +size or +sizeM or +sizeK (1-19870, default 19870): <i>+20M</i>
408    
409     <comment>(and now if we type 'p' again, we should see the new partition)</comment>
410     Command (m for help): <i>p</i>
411    
412     Disk /dev/hda: 10.2 GB, 10254827520 bytes
413     16 heads, 63 sectors/track, 19870 cylinders
414     Units = cylinders of 1008 * 512 = 516096 bytes
415    
416     Device Boot Start End Blocks Id System
417     /dev/hda1 1 40 20128+ 83 Linux
418    
419     <comment>(The rest, I prefer to put in an extended partition, so I'll create that)</comment>
420    
421     Command (m for help): <i>n</i>
422     Command action
423     e extended
424     p primary partition (1-4)
425     <i>e</i>
426     Partition number (1-4): <i>2</i>
427    
428     <comment>(Again, the default is fine, just press ENTER.)</comment>
429    
430     First cylinder (41-19870, default 41):
431     Using default value 41
432    
433     <comment>(We want to use the whole disk here, so just press ENTER again)</comment>
434     Last cylinder or +size or +sizeM or +sizeK (41-19870, default 19870):
435     Using default value 19870
436    
437     <comment>(Now, the / partition -- I use separate partitions for /usr, /var,
438 neysx 1.19 etc... so / can be small. Adjust as per your preference.)</comment>
439 swift 1.11
440     Command (m for help): <i>n</i>
441     Command action
442     l logical (5 or over)
443     p primary partition (1-4)
444     <i>l</i>
445     First cylinder (41-19870, default 41):<i>&lt;Press ENTER&gt;</i>
446     Using default value 41
447     Last cylinder or +size or +sizeM or +sizeK (41-19870, default 19870): <i>+500M</i>
448    
449     <comment>(... and similar for any other partitions ...)</comment>
450    
451 neysx 1.19 <comment>(Last but not least, the swap space. I recommend at least 250MB swap,
452 swift 1.11 preferrably 1GB)</comment>
453    
454     Command (m for help): <i>n</i>
455     Command action
456     l logical (5 or over)
457     p primary partition (1-4)
458     <i>l</i>
459     First cylinder (17294-19870, default 17294): <i>&lt;Press ENTER&gt;</i>
460     Using default value 17294
461     Last cylinder or +size or +sizeM or +sizeK (1011-19870, default 19870): <i>&lt;Press ENTER&gt;</i>
462     Using default value 19870
463    
464     <comment>(Now, if we check our partition table, everything should mostly be ship
465     shape except for one thing...)</comment>
466    
467     Command (m for help): <i>p</i>
468    
469     Disk /dev/hda: 10.2 GB, 10254827520 bytes
470     16 heads, 63 sectors/track, 19870 cylinders
471     Units = cylinders of 1008 * 512 = 516096 bytes
472    
473     Device Boot Start End Blocks ID System
474     /dev/hda1 1 21 10552+ 83 Linux
475     /dev/hda2 22 19870 10003896 5 Extended
476     /dev/hda5 22 1037 512032+ 83 Linux
477     /dev/hda6 1038 5101 2048224+ 83 Linux
478     /dev/hda7 5102 9165 2048224+ 83 Linux
479     /dev/hda8 9166 13229 2048224+ 83 Linux
480     /dev/hda9 13230 17293 2048224+ 83 Linux
481     /dev/hda10 17294 19870 1298776+ 83 Linux
482    
483     <comment>(Notice how #10, our swap partition is still type 83?)</comment>
484    
485     Command (m for help): <i>t</i>
486     Partition number (1-10): <i>10</i>
487     Hex code (type L to list codes): <i>82</i>
488     Changed system type of partition 10 to 82 (Linux swap)
489    
490     <comment>(That should fix it... just to verify...)</comment>
491    
492     Command (m for help): <i>p</i>
493    
494     Disk /dev/hda: 10.2 GB, 10254827520 bytes
495     16 heads, 63 sectors/track, 19870 cylinders
496     Units = cylinders of 1008 * 512 = 516096 bytes
497    
498     Device Boot Start End Blocks ID System
499     /dev/hda1 1 21 10552+ 83 Linux
500     /dev/hda2 22 19870 10003896 5 Extended
501     /dev/hda5 22 1037 512032+ 83 Linux
502     /dev/hda6 1038 5101 2048224+ 83 Linux
503     /dev/hda7 5102 9165 2048224+ 83 Linux
504     /dev/hda8 9166 13229 2048224+ 83 Linux
505     /dev/hda9 13230 17293 2048224+ 83 Linux
506     /dev/hda10 17294 19870 1298776+ 82 Linux Swap
507    
508     <comment>(Now, we write out the new partition table.)</comment>
509    
510     Command (m for help): <i>w</i>
511     The partition table has been altered!
512    
513     Calling ioctl() to re-read partition table.
514     Syncing disks.
515    
516     #
517     </pre>
518    
519 swift 1.1 <p>
520 neysx 1.19 And that's all there is to it. You should now be right to proceed onto the next
521     stage: <uri link="#filesystems">Creating Filesystems</uri>.
522 swift 1.1 </p>
523    
524     </body>
525     </subsection>
526     </section>
527 swift 1.11
528 swift 1.1 <section id="filesystems">
529     <title>Creating Filesystems</title>
530     <subsection>
531     <title>Introduction</title>
532     <body>
533    
534     <p>
535 neysx 1.19 Now that your partitions are created, it is time to place a filesystem on them.
536     If you don't care about what filesystem to choose and are happy with what we
537     use as default in this handbook, continue with <uri
538     link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. Otherwise
539     read on to learn about the available filesystems...
540 swift 1.1 </p>
541    
542     </body>
543     </subsection>
544     <subsection>
545     <title>Filesystems?</title>
546     <body>
547    
548     <p>
549 neysx 1.19 Several filesystems are available. ReiserFS, EXT2 and EXT3 are found stable on
550     the MIPS architectures, others are experimental.
551 swift 1.1 </p>
552    
553     <p>
554     <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
555     journaling, which means that routine ext2 filesystem checks at startup time can
556     be quite time-consuming. There is now quite a selection of newer-generation
557     journaled filesystems that can be checked for consistency very quickly and are
558     thus generally preferred over their non-journaled counterparts. Journaled
559     filesystems prevent long delays when you boot your system and your filesystem
560     happens to be in an inconsistent state.
561     </p>
562    
563     <p>
564     <b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
565 neysx 1.19 journaling for fast recovery in addition to other enhanced journaling modes
566 nightmorph 1.21 like full data and ordered data journaling. It uses a hashed B*-tree index that
567     enables high performance in almost all situations. In short, ext3 is a very
568     good and reliable filesystem.
569 swift 1.1 </p>
570    
571     <p>
572 neysx 1.19 <b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
573     performance and greatly outperforms both ext2 and ext3 when dealing with small
574 nightmorph 1.21 files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
575     extremely well and has metadata journaling. ReiserFS is solid and usable as
576     both general-purpose filesystem and for extreme cases such as the creation of
577     large filesystems, very large files and directories containing tens of
578     thousands of small files.
579 swift 1.1 </p>
580    
581     <p>
582 neysx 1.3 <b>XFS</b> is a filesystem with metadata journaling which comes with a robust
583     feature-set and is optimized for scalability. We only recommend using this
584     filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
585 neysx 1.19 an uninterruptible power supply. Because XFS aggressively caches in-transit
586     data in RAM, improperly designed programs (those that don't take proper
587     precautions when writing files to disk and there are quite a few of them) can
588     lose a good deal of data if the system goes down unexpectedly.
589 swift 1.1 </p>
590    
591     <p>
592 neysx 1.19 <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
593     become production-ready and there hasn't been a sufficient track record to
594 swift 1.1 comment positively nor negatively on its general stability at this point.
595     </p>
596    
597     </body>
598     </subsection>
599     <subsection id="filesystems-apply">
600     <title>Applying a Filesystem to a Partition</title>
601     <body>
602    
603     <p>
604 neysx 1.19 To create a filesystem on a partition or volume, there are tools available for
605 swift 1.1 each possible filesystem:
606     </p>
607    
608     <table>
609     <tr>
610     <th>Filesystem</th>
611     <th>Creation Command</th>
612     </tr>
613     <tr>
614     <ti>ext2</ti>
615     <ti><c>mke2fs</c></ti>
616     </tr>
617     <tr>
618     <ti>ext3</ti>
619     <ti><c>mke2fs -j</c></ti>
620     </tr>
621     <tr>
622     <ti>reiserfs</ti>
623     <ti><c>mkreiserfs</c></ti>
624     </tr>
625     <tr>
626     <ti>xfs</ti>
627     <ti><c>mkfs.xfs</c></ti>
628     </tr>
629     <tr>
630     <ti>jfs</ti>
631     <ti><c>mkfs.jfs</c></ti>
632     </tr>
633     </table>
634    
635     <p>
636     For instance, to have the boot partition (<path>/dev/sda1</path> in our
637     example) in ext2 and the root partition (<path>/dev/sda3</path> in our example)
638     in ext3, you would use:
639     </p>
640    
641     <pre caption="Applying a filesystem on a partition">
642     # <i>mke2fs /dev/sda1</i>
643 neysx 1.22 # <i>mke2fs -j -O dir_index /dev/sda3</i>
644 swift 1.1 </pre>
645    
646     <p>
647     Now create the filesystems on your newly created partitions (or logical
648     volumes).
649     </p>
650    
651 swift 1.11 <warn>
652 neysx 1.19 If you're installing on a Cobalt server, remember <path>/dev/hda1</path> MUST
653     be of type <e>EXT2 revision 0</e>; Anything else (e.g. EXT2 revision 1, EXT3,
654     ReiserFS, XFS, JFS and others) <e>WILL NOT WORK!</e> You can format the
655     partition using the command: <c>mke2fs -r 0 /dev/hda1</c>.
656 swift 1.11 </warn>
657    
658     <warn>
659     Also, be aware that arcboot currently is not able to read any filesystem other
660 neysx 1.19 than EXT2, EXT3 and ISO9660 (recent versions). For that reason,
661     <path>/boot</path> on SGI machines must also reside on an EXT2 or EXT3
662     partition.
663 swift 1.11 </warn>
664    
665 swift 1.1 </body>
666     </subsection>
667     <subsection>
668     <title>Activating the Swap Partition</title>
669     <body>
670    
671     <p>
672 neysx 1.19 <c>mkswap</c> is the command that is used to create and initialize swap
673     partitions:
674 swift 1.1 </p>
675    
676     <pre caption="Creating a Swap signature">
677     # <i>mkswap /dev/sda2</i>
678     </pre>
679    
680     <p>
681     To activate the swap partition, use <c>swapon</c>:
682     </p>
683    
684     <pre caption="Activating the swap partition">
685     # <i>swapon /dev/sda2</i>
686     </pre>
687    
688     <p>
689 swift 1.12 Create and activate the swap with the commands mentioned above.
690 swift 1.1 </p>
691    
692     </body>
693     </subsection>
694     </section>
695     <section>
696     <title>Mounting</title>
697     <body>
698    
699     <p>
700     Now that your partitions are initialized and are housing a filesystem, it is
701     time to mount those partitions. Use the <c>mount</c> command. Don't forget to
702     create the necessary mount directories for every partition you created. As an
703     example we mount the root and boot partition:
704     </p>
705    
706     <pre caption="Mounting partitions">
707     # <i>mount /dev/sda3 /mnt/gentoo</i>
708     # <i>mkdir /mnt/gentoo/boot</i>
709     # <i>mount /dev/sda1 /mnt/gentoo/boot</i>
710     </pre>
711    
712     <note>
713 neysx 1.19 If you want your <path>/tmp</path> to reside on a separate partition, be sure
714     to change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>.
715     This also holds for <path>/var/tmp</path>.
716 swift 1.1 </note>
717    
718     <p>
719 neysx 1.19 We will also have to mount the proc filesystem (a virtual interface with the
720     kernel) on <path>/proc</path>. But first we will need to place our files on the
721     partitions.
722 swift 1.1 </p>
723    
724     <p>
725 neysx 1.19 Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo Installation
726     Files</uri>.
727 swift 1.1 </p>
728    
729     </body>
730     </section>
731     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20