[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[1770019] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[673b0d8] | 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 4 | %general-entities;
|
---|
| 5 | ]>
|
---|
[3be4d97] | 6 | <sect1 id="ch-bootable-fstab">
|
---|
[bce08ef] | 7 | <title>Creating the /etc/fstab File</title>
|
---|
[673b0d8] | 8 | <?dbhtml filename="fstab.html"?>
|
---|
| 9 |
|
---|
[81fd230] | 10 | <indexterm zone="ch-bootable-fstab"><primary sortas="e-/etc/fstab">/etc/fstab</primary></indexterm>
|
---|
| 11 |
|
---|
[68b786c] | 12 | <para>The <filename>/etc/fstab</filename> file is used by some programs to
|
---|
| 13 | determine where file systems are to be mounted by default, in which order, and
|
---|
| 14 | which must be checked (for integrity errors) prior to mounting. Create a new
|
---|
| 15 | file systems table like this:</para>
|
---|
[81fd230] | 16 |
|
---|
[0719866] | 17 | <screen><userinput>cat > /etc/fstab << "EOF"
|
---|
[d72e04a] | 18 | <literal># Begin /etc/fstab
|
---|
[6370fa6] | 19 |
|
---|
[d72e04a] | 20 | # file system mount-point type options dump fsck
|
---|
| 21 | # order
|
---|
[d5062b8] | 22 |
|
---|
[d72e04a] | 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
|
---|
[e2c85b1] | 27 | devpts /dev/pts devpts gid=4,mode=620 0 0
|
---|
[d72e04a] | 28 | shm /dev/shm tmpfs defaults 0 0
|
---|
| 29 | # End /etc/fstab</literal>
|
---|
[0719866] | 30 | EOF</userinput></screen>
|
---|
[6370fa6] | 31 |
|
---|
[81fd230] | 32 | <para>Replace <replaceable>[xxx]</replaceable>,
|
---|
| 33 | <replaceable>[yyy]</replaceable>, and <replaceable>[fff]</replaceable>
|
---|
| 34 | with the values appropriate for the system, for example, <filename
|
---|
| 35 | class="partition">hda2</filename>, <filename
|
---|
| 36 | class="partition">hda5</filename>, and <systemitem
|
---|
| 37 | class="filesystem">ext2</systemitem>. For details on the six
|
---|
| 38 | fields in this file, see <command>man 5 fstab</command>.</para>
|
---|
| 39 |
|
---|
| 40 | <para>When using a journalling file system, the <parameter>1
|
---|
| 41 | 1</parameter> at the end of the line should be replaced with
|
---|
| 42 | <parameter>0 0</parameter> because such a partition does not need to
|
---|
| 43 | be dumped or checked.</para>
|
---|
| 44 |
|
---|
| 45 | <para>The <filename class="directory">/dev/shm</filename> mount point
|
---|
| 46 | for <systemitem class="filesystem">tmpfs</systemitem> is included to
|
---|
| 47 | allow enabling POSIX-shared memory. The kernel must have the required
|
---|
| 48 | support built into it for this to work (more about this is in the next
|
---|
| 49 | section). Please note that very little software currently uses
|
---|
| 50 | POSIX-shared memory. Therefore, consider the <filename
|
---|
| 51 | class="directory">/dev/shm</filename> mount point optional. For more
|
---|
| 52 | information, see
|
---|
| 53 | <filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel
|
---|
| 54 | source tree.</para>
|
---|
| 55 |
|
---|
| 56 | <para>There are other lines which may be added to the
|
---|
| 57 | <filename>/etc/fstab</filename> file. One example is a line for USB
|
---|
| 58 | devices:</para>
|
---|
| 59 |
|
---|
| 60 | <screen>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0 </screen>
|
---|
| 61 |
|
---|
[808f5af] | 62 | <para>This option will only work if <quote>Support for Host-side USB</quote> and
|
---|
[ad1443d] | 63 | <quote>USB device filesystem</quote> are configured in the kernel. If
|
---|
| 64 | <quote>Support for Host-side USB</quote> is compiled as a module, then
|
---|
| 65 | <filename>usbcore</filename> must be listed in
|
---|
[808f5af] | 66 | <filename>/etc/sysconfig/modules</filename>.</para>
|
---|
[81fd230] | 67 |
|
---|
[6370fa6] | 68 | </sect1>
|
---|
[81fd230] | 69 |
|
---|