source: chapter08/fstab.xml@ c5538b3

Last change on this file since c5538b3 was 6be8f06, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • (chapter08/*.xml) RELAX NG validation fixes

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/LFS-RNG/BOOK@4352 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 section [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<section xmlns="http://docbook.org/docbook-ng"
7 xml:id="ch-bootable-fstab">
8<info><title>Creating the /etc/fstab file</title></info>
9<?dbhtml filename="fstab.html"?>
10
11<indexterm zone="ch-bootable-fstab"><primary sortas="e-/etc/fstab">/etc/fstab</primary></indexterm>
12
13<para>The <filename>/etc/fstab</filename> file is used by some programs to
14determine where file systems are to be mounted by default, which
15must be checked and in which order. Create a new file systems table like
16this:</para>
17
18<screen><userinput>cat &gt; /etc/fstab &lt;&lt; "EOF"
19# Begin /etc/fstab
20
21# file system mount-point fs-type options dump fsck-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
30EOF</userinput></screen>
31
32<para>Of course, replace <replaceable>[xxx]</replaceable>, <replaceable>[yyy]</replaceable>
33and <replaceable>[fff]</replaceable> with the values appropriate for your system --
34for example <filename class="partition">hda2</filename>, <filename class="partition">hda5</filename> and
35<systemitem class="filesystem">reiserfs</systemitem>. For all the details on the six fields in this
36table, see <command>man 5 fstab</command>.</para>
37
38<para>When using a reiserfs partition, the <parameter>1 1</parameter> at the
39end of the line should be replaced with <parameter>0 0</parameter>, as such a
40partition does not need to be dumped or checked</para>
41
42<para>The <filename class="directory">/dev/shm</filename> mount point for
43<systemitem class="filesystem">tmpfs</systemitem> is included to
44allow enabling POSIX shared memory. Your kernel must have the required support
45built into it for this to work -- more about this in the next section. Please
46note that currently very little software actually uses POSIX shared memory.
47Therefore you can consider the <filename class="directory">/dev/shm</filename> mount point
48optional. For more information, see
49<filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel source
50tree.</para>
51
52<para>There are other lines which you may consider adding to your
53<filename>fstab</filename> file. One example is a line to use if you intend to
54use USB devices:</para>
55
56<screen> usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0 </screen>
57
58<para>This option will of course only work if you have the
59"Support for Host-side USB" and "USB device filesystem"
60compiled into your kernel (not as a module).</para>
61
62</section>
Note: See TracBrowser for help on using the repository browser.