[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6be8f06] | 2 | <!DOCTYPE section [
|
---|
[673b0d8] | 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 4 | %general-entities;
|
---|
| 5 | ]>
|
---|
[6be8f06] | 6 | <section xmlns="http://docbook.org/docbook-ng"
|
---|
| 7 | xml:id="ch-bootable-fstab">
|
---|
[6a0e6f3] | 8 | <title>Creating the /etc/fstab file</title>
|
---|
[673b0d8] | 9 | <?dbhtml filename="fstab.html"?>
|
---|
| 10 |
|
---|
| 11 | <indexterm zone="ch-bootable-fstab"><primary sortas="e-/etc/fstab">/etc/fstab</primary></indexterm>
|
---|
[6370fa6] | 12 |
|
---|
[548d65f] | 13 | <para>The <filename>/etc/fstab</filename> file is used by some programs to
|
---|
[673b0d8] | 14 | determine where file systems are to be mounted by default, which
|
---|
[548d65f] | 15 | must be checked and in which order. Create a new file systems table like
|
---|
| 16 | this:</para>
|
---|
[6370fa6] | 17 |
|
---|
[0719866] | 18 | <screen><userinput>cat > /etc/fstab << "EOF"
|
---|
[6370fa6] | 19 | # Begin /etc/fstab
|
---|
| 20 |
|
---|
[ab3b93b] | 21 | # file system mount-point fs-type options dump fsck-order
|
---|
[d5062b8] | 22 |
|
---|
[0c012ac] | 23 | /dev/<replaceable>[xxx]</replaceable> / <replaceable>[fff]</replaceable> defaults 1 1
|
---|
| 24 | /dev/<replaceable>[yyy]</replaceable> swap swap pri=1 0 0
|
---|
| 25 | proc /proc proc defaults 0 0
|
---|
| 26 | sysfs /sys sysfs defaults 0 0
|
---|
| 27 | devpts /dev/pts devpts gid=4,mode=620 0 0
|
---|
| 28 | shm /dev/shm tmpfs defaults 0 0
|
---|
[6370fa6] | 29 | # End /etc/fstab
|
---|
[0719866] | 30 | EOF</userinput></screen>
|
---|
[6370fa6] | 31 |
|
---|
[0719866] | 32 | <para>Of course, replace <replaceable>[xxx]</replaceable>, <replaceable>[yyy]</replaceable>
|
---|
| 33 | and <replaceable>[fff]</replaceable> with the values appropriate for your system --
|
---|
| 34 | for example <filename class="partition">hda2</filename>, <filename class="partition">hda5</filename> and
|
---|
| 35 | <systemitem class="filesystem">reiserfs</systemitem>. For all the details on the six fields in this
|
---|
[a56c4bb] | 36 | table, see <command>man 5 fstab</command>.</para>
|
---|
[d5062b8] | 37 |
|
---|
[0719866] | 38 | <para>When using a reiserfs partition, the <parameter>1 1</parameter> at the
|
---|
| 39 | end of the line should be replaced with <parameter>0 0</parameter>, as such a
|
---|
[548d65f] | 40 | partition does not need to be dumped or checked</para>
|
---|
[d5062b8] | 41 |
|
---|
[0719866] | 42 | <para>The <filename class="directory">/dev/shm</filename> mount point for
|
---|
| 43 | <systemitem class="filesystem">tmpfs</systemitem> is included to
|
---|
[360e2c4] | 44 | allow enabling POSIX shared memory. Your kernel must have the required support
|
---|
| 45 | built into it for this to work -- more about this in the next section. Please
|
---|
| 46 | note that currently very little software actually uses POSIX shared memory.
|
---|
[0719866] | 47 | Therefore you can consider the <filename class="directory">/dev/shm</filename> mount point
|
---|
[360e2c4] | 48 | optional. For more information, see
|
---|
| 49 | <filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel source
|
---|
| 50 | tree.</para>
|
---|
[cfdcaef7] | 51 |
|
---|
[548d65f] | 52 | <para>There are other lines which you may consider adding to your
|
---|
[e683065] | 53 | <filename>fstab</filename> file. One example is a line to use if you intend to
|
---|
| 54 | use USB devices:</para>
|
---|
[6370fa6] | 55 |
|
---|
[a56c4bb] | 56 | <screen> usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0 </screen>
|
---|
[987aa00] | 57 |
|
---|
[a56c4bb] | 58 | <para>This option will of course only work if you have the
|
---|
| 59 | "Support for Host-side USB" and "USB device filesystem"
|
---|
| 60 | compiled into your kernel (not as a module).</para>
|
---|
[987aa00] | 61 |
|
---|
[6be8f06] | 62 | </section>
|
---|