[673b0d8] | 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 | ]>
|
---|
[3be4d97] | 6 | <sect1 id="ch-bootable-fstab">
|
---|
[69993f4] | 7 | <title>Creating the /etc/fstab File</title>
|
---|
[673b0d8] | 8 | <?dbhtml filename="fstab.html"?>
|
---|
| 9 |
|
---|
| 10 | <indexterm zone="ch-bootable-fstab"><primary sortas="e-/etc/fstab">/etc/fstab</primary></indexterm>
|
---|
[6370fa6] | 11 |
|
---|
[1dc34de7] | 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>
|
---|
[6370fa6] | 16 |
|
---|
[0719866] | 17 | <screen><userinput>cat > /etc/fstab << "EOF"
|
---|
[6370fa6] | 18 | # Begin /etc/fstab
|
---|
| 19 |
|
---|
[ab3b93b] | 20 | # file system mount-point fs-type options dump fsck-order
|
---|
[d5062b8] | 21 |
|
---|
[0c012ac] | 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
|
---|
[6370fa6] | 28 | # End /etc/fstab
|
---|
[0719866] | 29 | EOF</userinput></screen>
|
---|
[6370fa6] | 30 |
|
---|
[1dc34de7] | 31 | <para>Replace <replaceable>[xxx]</replaceable>,
|
---|
[69993f4] | 32 | <replaceable>[yyy]</replaceable>, and <replaceable>[fff]</replaceable>
|
---|
| 33 | with the values appropriate for the system, for example, <filename
|
---|
[1dc34de7] | 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
|
---|
[69993f4] | 46 | allow enabling POSIX-shared memory. The kernel must have the required
|
---|
| 47 | support built into it for this to work (more about this is in the next
|
---|
| 48 | section). Please note that very little software currently uses
|
---|
| 49 | POSIX-shared memory. Therefore, consider the <filename
|
---|
[1dc34de7] | 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>
|
---|
[6370fa6] | 58 |
|
---|
[a56c4bb] | 59 | <screen> usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0 </screen>
|
---|
[987aa00] | 60 |
|
---|
[69993f4] | 61 | <para>This option will only work if <quote>Support for Host-side
|
---|
[1dc34de7] | 62 | USB</quote> and <quote>USB device filesystem</quote> are compiled into
|
---|
| 63 | the kernel (not as a module).</para>
|
---|
[987aa00] | 64 |
|
---|
[6370fa6] | 65 | </sect1>
|
---|
[1dc34de7] | 66 |
|
---|