/[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.24 - (hide annotations) (download) (as text)
Tue Jun 26 07:07:27 2007 UTC (7 years, 4 months ago) by nightmorph
Branch: MAIN
Changes since 1.23: +8 -8 lines
File MIME type: application/xml
fixing tree type confusion. spank whoever told me to add that ext3 stuff in the first place, and me for blindly adding it. all fixed now; also fixed reiserfs, since it's actually B+, not B*

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 nightmorph 1.24 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-mips-disk.xml,v 1.23 2007/05/07 18:11:41 nightmorph Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.7
11 nightmorph 1.24 <version>2.1</version>
12     <date>2007-06-26</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     <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 neysx 1.19 50MB Volume header in conjunction with a 50MB /boot partition. The actual
231     layout of your disk may vary, but this is for illustrative purposes only.
232 swift 1.1 </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 neysx 1.19 instructions for partitioning on Cobalts. The concepts are exactly the same --
263 swift 1.11 just remember to leave the volume header and whole disk partitions alone.
264     </p>
265    
266 rane 1.16 <p>
267 neysx 1.19 Once this is done, you are safe to create the rest of your partitions as you
268     see fit. After all your partitions are laid out, make sure you set the
269     partition ID of your swap partition to <c>82</c>, which is Linux Swap. By
270     default, it will be <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 neysx 1.19 On Cobalt machines, the BOOTROM expects to see a MS-DOS MBR, so partitioning
287     the drive is relatively straightforward -- in fact, it's done the same way as
288     you'd do for an Intel x86 machine. <e>However</e> there are some things you
289     need to bear in mind.
290 swift 1.11 </p>
291    
292     <ul>
293     <li>
294     Cobalt firmware will expect <path>/dev/hda1</path> to be a Linux partition
295 neysx 1.19 formatted <e>EXT2 Revision 0</e>. <e>EXT2 Revision 1 partitions will NOT
296     WORK!</e> (The Cobalt BOOTROM only understands EXT2r0)
297 swift 1.11 </li>
298     <li>
299     The above said partition must contain a gzipped ELF image,
300 neysx 1.19 <path>vmlinux.gz</path> in the root of that partition, which it loads as
301     the kernel
302 swift 1.11 </li>
303     </ul>
304    
305     <p>
306     For that reason, I recommend creating a ~20MB <path>/boot</path> partition
307 neysx 1.19 formatted EXT2r0 upon which you can install CoLo &amp; your kernels. This
308 swift 1.11 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 neysx 1.19 <path>/boot</path> partition. If you wish to make this <path>/</path>, you'll
315 swift 1.11 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 neysx 1.19 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 neysx 1.19 etc... so / can be small. Adjust as per your preference.)</comment>
430 swift 1.11
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 neysx 1.19 <comment>(Last but not least, the swap space. I recommend at least 250MB swap,
443 swift 1.11 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 neysx 1.19 And that's all there is to it. You should now be right to proceed onto the next
512     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 neysx 1.19 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
528     use as default in this handbook, continue with <uri
529     link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. Otherwise
530     read on to learn about the available filesystems...
531 swift 1.1 </p>
532    
533     </body>
534     </subsection>
535     <subsection>
536     <title>Filesystems?</title>
537     <body>
538    
539     <p>
540 neysx 1.19 Several filesystems are available. ReiserFS, EXT2 and EXT3 are found stable on
541     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 nightmorph 1.24 journaling for fast recovery in addition to other enhanced journaling modes like
557     full data and ordered data journaling. It uses an HTree index that enables high
558     performance in almost all situations. In short, ext3 is a very good and reliable
559     filesystem.
560 swift 1.1 </p>
561    
562     <p>
563 nightmorph 1.24 <b>ReiserFS</b> is a B+tree-based filesystem that has very good overall
564 neysx 1.19 performance and greatly outperforms both ext2 and ext3 when dealing with small
565 nightmorph 1.21 files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
566     extremely well and has metadata journaling. ReiserFS is solid and usable as
567     both general-purpose filesystem and for extreme cases such as the creation of
568     large filesystems, very large files and directories containing tens of
569     thousands of small files.
570 swift 1.1 </p>
571    
572     <p>
573 neysx 1.3 <b>XFS</b> is a filesystem with metadata journaling which comes with a robust
574     feature-set and is optimized for scalability. We only recommend using this
575     filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
576 neysx 1.19 an uninterruptible power supply. Because XFS aggressively caches in-transit
577     data in RAM, improperly designed programs (those that don't take proper
578     precautions when writing files to disk and there are quite a few of them) can
579     lose a good deal of data if the system goes down unexpectedly.
580 swift 1.1 </p>
581    
582     <p>
583 neysx 1.19 <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
584     become production-ready and there hasn't been a sufficient track record to
585 swift 1.1 comment positively nor negatively on its general stability at this point.
586     </p>
587    
588     </body>
589     </subsection>
590     <subsection id="filesystems-apply">
591     <title>Applying a Filesystem to a Partition</title>
592     <body>
593    
594     <p>
595 neysx 1.19 To create a filesystem on a partition or volume, there are tools available for
596 swift 1.1 each possible filesystem:
597     </p>
598    
599     <table>
600     <tr>
601     <th>Filesystem</th>
602     <th>Creation Command</th>
603     </tr>
604     <tr>
605     <ti>ext2</ti>
606     <ti><c>mke2fs</c></ti>
607     </tr>
608     <tr>
609     <ti>ext3</ti>
610     <ti><c>mke2fs -j</c></ti>
611     </tr>
612     <tr>
613     <ti>reiserfs</ti>
614     <ti><c>mkreiserfs</c></ti>
615     </tr>
616     <tr>
617     <ti>xfs</ti>
618     <ti><c>mkfs.xfs</c></ti>
619     </tr>
620     <tr>
621     <ti>jfs</ti>
622     <ti><c>mkfs.jfs</c></ti>
623     </tr>
624     </table>
625    
626     <p>
627     For instance, to have the boot partition (<path>/dev/sda1</path> in our
628     example) in ext2 and the root partition (<path>/dev/sda3</path> in our example)
629     in ext3, you would use:
630     </p>
631    
632     <pre caption="Applying a filesystem on a partition">
633     # <i>mke2fs /dev/sda1</i>
634 nightmorph 1.23 # <i>mke2fs -j /dev/sda3</i>
635 swift 1.1 </pre>
636    
637     <p>
638     Now create the filesystems on your newly created partitions (or logical
639     volumes).
640     </p>
641    
642 swift 1.11 <warn>
643 neysx 1.19 If you're installing on a Cobalt server, remember <path>/dev/hda1</path> MUST
644     be of type <e>EXT2 revision 0</e>; Anything else (e.g. EXT2 revision 1, EXT3,
645     ReiserFS, XFS, JFS and others) <e>WILL NOT WORK!</e> You can format the
646     partition using the command: <c>mke2fs -r 0 /dev/hda1</c>.
647 swift 1.11 </warn>
648    
649 swift 1.1 </body>
650     </subsection>
651     <subsection>
652     <title>Activating the Swap Partition</title>
653     <body>
654    
655     <p>
656 neysx 1.19 <c>mkswap</c> is the command that is used to create and initialize swap
657     partitions:
658 swift 1.1 </p>
659    
660     <pre caption="Creating a Swap signature">
661     # <i>mkswap /dev/sda2</i>
662     </pre>
663    
664     <p>
665     To activate the swap partition, use <c>swapon</c>:
666     </p>
667    
668     <pre caption="Activating the swap partition">
669     # <i>swapon /dev/sda2</i>
670     </pre>
671    
672     <p>
673 swift 1.12 Create and activate the swap with the commands mentioned above.
674 swift 1.1 </p>
675    
676     </body>
677     </subsection>
678     </section>
679     <section>
680     <title>Mounting</title>
681     <body>
682    
683     <p>
684     Now that your partitions are initialized and are housing a filesystem, it is
685     time to mount those partitions. Use the <c>mount</c> command. Don't forget to
686     create the necessary mount directories for every partition you created. As an
687     example we mount the root and boot partition:
688     </p>
689    
690     <pre caption="Mounting partitions">
691     # <i>mount /dev/sda3 /mnt/gentoo</i>
692     # <i>mkdir /mnt/gentoo/boot</i>
693     # <i>mount /dev/sda1 /mnt/gentoo/boot</i>
694     </pre>
695    
696     <note>
697 neysx 1.19 If you want your <path>/tmp</path> to reside on a separate partition, be sure
698     to change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>.
699     This also holds for <path>/var/tmp</path>.
700 swift 1.1 </note>
701    
702     <p>
703 neysx 1.19 We will also have to mount the proc filesystem (a virtual interface with the
704     kernel) on <path>/proc</path>. But first we will need to place our files on the
705     partitions.
706 swift 1.1 </p>
707    
708     <p>
709 neysx 1.19 Continue with <uri link="?part=1&amp;chap=5">Installing the Gentoo Installation
710     Files</uri>.
711 swift 1.1 </p>
712    
713     </body>
714     </section>
715     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20