source: chapter08/fstab.xml@ 1fd5d19

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.0 6.1 6.1.1 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 1fd5d19 was 0c012ac, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Fixed the identation of /etc/fstab and some tagins regresions.

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

  • Property mode set to 100644
File size: 2.9 KB
RevLine 
[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">
[6370fa6]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
[548d65f]12<para>The <filename>/etc/fstab</filename> file is used by some programs to
[673b0d8]13determine where file systems are to be mounted by default, which
[548d65f]14must be checked and in which order. Create a new file systems table like
15this:</para>
[6370fa6]16
[0719866]17<screen><userinput>cat &gt; /etc/fstab &lt;&lt; "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
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
[6370fa6]28# End /etc/fstab
[0719866]29EOF</userinput></screen>
[6370fa6]30
[0719866]31<para>Of course, replace <replaceable>[xxx]</replaceable>, <replaceable>[yyy]</replaceable>
32and <replaceable>[fff]</replaceable> with the values appropriate for your system --
33for example <filename class="partition">hda2</filename>, <filename class="partition">hda5</filename> and
34<systemitem class="filesystem">reiserfs</systemitem>. For all the details on the six fields in this
[a56c4bb]35table, see <command>man 5 fstab</command>.</para>
[d5062b8]36
[0719866]37<para>When using a reiserfs partition, the <parameter>1 1</parameter> at the
38end of the line should be replaced with <parameter>0 0</parameter>, as such a
[548d65f]39partition does not need to be dumped or checked</para>
[d5062b8]40
[0719866]41<para>The <filename class="directory">/dev/shm</filename> mount point for
42<systemitem class="filesystem">tmpfs</systemitem> is included to
[360e2c4]43allow enabling POSIX shared memory. Your kernel must have the required support
44built into it for this to work -- more about this in the next section. Please
45note that currently very little software actually uses POSIX shared memory.
[0719866]46Therefore you can consider the <filename class="directory">/dev/shm</filename> mount point
[360e2c4]47optional. For more information, see
48<filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel source
49tree.</para>
[cfdcaef7]50
[548d65f]51<para>There are other lines which you may consider adding to your
[e683065]52<filename>fstab</filename> file. One example is a line to use if you intend to
53use USB devices:</para>
[6370fa6]54
[a56c4bb]55<screen> usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0 </screen>
[987aa00]56
[a56c4bb]57<para>This option will of course only work if you have the
58"Support for Host-side USB" and "USB device filesystem"
59compiled into your kernel (not as a module).</para>
[987aa00]60
[6370fa6]61</sect1>
Note: See TracBrowser for help on using the repository browser.