1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
6 <sect1 id="ch-bootable-fstab">
7 <title>Creating the /etc/fstab File</title>
8 <?dbhtml filename="fstab.html"?>
10 <indexterm zone="ch-bootable-fstab"><primary sortas="e-/etc/fstab">/etc/fstab</primary></indexterm>
12 <para>The <filename>/etc/fstab</filename> file is used by some
13 programs to determine where file systems are to be mounted by default,
14 which must be checked, and in which order. Create a new file systems
15 table like this:</para>
17 <screen><userinput>cat > /etc/fstab << "EOF"
18 <literal># Begin /etc/fstab
20 # file system mount-point type options dump fsck
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
29 # End /etc/fstab</literal>
30 EOF</userinput></screen>
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>
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>
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
53 <filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel
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
60 <screen>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0 </screen>
62 <para>This option will only work if <quote>Support for Host-side
63 USB</quote> and <quote>USB device filesystem</quote> are compiled into
64 the kernel (not as a module).</para>