source: chapter08/fstab.xml@ 4d938ef

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 4d938ef was 4d938ef, checked in by Archaic <archaic@…>, 19 years ago

Rewrote the usbfs warning.

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

  • Property mode set to 100644
File size: 3.0 KB
Line 
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">
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 type options dump fsck
21# order
22
23/dev/<replaceable>[xxx]</replaceable> / <replaceable>[fff]</replaceable> defaults 1 1
24/dev/<replaceable>[yyy]</replaceable> swap swap pri=1 0 0
25proc /proc proc defaults 0 0
26sysfs /sys sysfs defaults 0 0
27devpts /dev/pts devpts gid=4,mode=620 0 0
28shm /dev/shm tmpfs defaults 0 0
29# End /etc/fstab</literal>
30EOF</userinput></screen>
31
32<para>Replace <replaceable>[xxx]</replaceable>,
33<replaceable>[yyy]</replaceable>, and <replaceable>[fff]</replaceable>
34with the values appropriate for the system, for example, <filename
35class="partition">hda2</filename>, <filename
36class="partition">hda5</filename>, and <systemitem
37class="filesystem">ext2</systemitem>. For details on the six
38fields in this file, see <command>man 5 fstab</command>.</para>
39
40<para>When using a journalling file system, the <parameter>1
411</parameter> at the end of the line should be replaced with
42<parameter>0 0</parameter> because such a partition does not need to
43be dumped or checked.</para>
44
45<para>The <filename class="directory">/dev/shm</filename> mount point
46for <systemitem class="filesystem">tmpfs</systemitem> is included to
47allow enabling POSIX-shared memory. The kernel must have the required
48support built into it for this to work (more about this is in the next
49section). Please note that very little software currently uses
50POSIX-shared memory. Therefore, consider the <filename
51class="directory">/dev/shm</filename> mount point optional. For more
52information, see
53<filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel
54source 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
58devices:</para>
59
60<screen>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0 </screen>
61
62<para>This option will only work if <quote>Support for Host-side USB</quote> and
63<quote>USB device filesystem</quote> are compiled into the kernel or if compiled
64as modules, that the modules are listed in
65<filename>/etc/sysconfig/modules</filename>.</para>
66
67</sect1>
68
Note: See TracBrowser for help on using the repository browser.