/[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.15 - (hide annotations) (download) (as text)
Tue Aug 2 08:03:53 2005 UTC (9 years ago) by swift
Branch: MAIN
Changes since 1.14: +6 -5 lines
File MIME type: application/xml
#101034 - Adding "-O dir_index" information to the guide

Leaving it out of the real example mke2fs command to "stage" it. When we know
more about this b-tree stability and architectural support we can follow the
SPARC handbook and use it by default.

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

  ViewVC Help
Powered by ViewVC 1.1.20