/[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.17 - (hide annotations) (download) (as text)
Wed Dec 14 00:22:34 2005 UTC (9 years ago) by vanquirius
Branch: MAIN
Changes since 1.16: +4 -4 lines
File MIME type: application/xml
minor grammar and spellcheck, no content change

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

  ViewVC Help
Powered by ViewVC 1.1.20