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