source: chapter08/fstab.xml@ 00cc7ce

6.0
Last change on this file since 00cc7ce was 00cc7ce, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Line wrap in screen blocks to fit the line length in PDF output.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@4104 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 2.9 KB
Line 
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
13programs to determine where file systems are to be mounted by default,
14which must be checked, and in which order. Create a new file systems
15table like this:</para>
16
17<screen><userinput>cat &gt; /etc/fstab &lt;&lt; "EOF"
18<literal># 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
24proc /proc proc defaults 0 0
25sysfs /sys sysfs defaults 0 0
26devpts /dev/pts devpts gid=4,mode=620 0 0
27shm /dev/shm tmpfs defaults 0 0
28# End /etc/fstab</literal>
29EOF</userinput></screen>
30
31<para>Replace <replaceable>[xxx]</replaceable>,
32<replaceable>[yyy]</replaceable>, and <replaceable>[fff]</replaceable>
33with the values appropriate for the system, for example, <filename
34class="partition">hda2</filename>, <filename
35class="partition">hda5</filename>, and <systemitem
36class="filesystem">reiserfs</systemitem>. For details on the six
37fields in this file, see <command>man 5 fstab</command>.</para>
38
39<para>When using a reiserfs partition, the <parameter>1 1</parameter>
40at the end of the line should be replaced with <parameter>0
410</parameter> because such a partition does not need to be dumped or
42checked.</para>
43
44<para>The <filename class="directory">/dev/shm</filename> mount point
45for <systemitem class="filesystem">tmpfs</systemitem> is included to
46allow enabling POSIX-shared memory. The kernel must have the required
47support built into it for this to work (more about this is in the next
48section). Please note that very little software currently uses
49POSIX-shared memory. Therefore, consider the <filename
50class="directory">/dev/shm</filename> mount point optional. For more
51information, see
52<filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel
53source 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
57devices:</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 <quote>Support for Host-side
62USB</quote> and <quote>USB device filesystem</quote> are compiled into
63the kernel (not as a module).</para>
64
65</sect1>
66
Note: See TracBrowser for help on using the repository browser.