source: BOOK/bootable/common/fstab.xml@ 5548691

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 5548691 was 3f8be484, checked in by Jim Gifford <clfs@…>, 19 years ago

r627@server (orig r625): jim | 2005-10-31 12:59:34 -0800
Import of Cross-LFS Book

  • Property mode set to 100644
File size: 2.7 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-bootable-fstab">
9 <?dbhtml filename="fstab.html"?>
10
11 <title>Creating the /etc/fstab File</title>
12
13 <indexterm zone="ch-bootable-fstab">
14 <primary sortas="e-/etc/fstab">/etc/fstab</primary>
15 </indexterm>
16
17 <para os="a">The <filename>/etc/fstab</filename> file is used by some
18 programs to determine where file systems are to be mounted by default,
19 in which order, and which must be checked (for integrity errors) prior
20 to mounting. Create a new file systems table like this:</para>
21
22<screen><userinput>cat &gt; /etc/fstab &lt;&lt; "EOF"
23<literal># Begin /etc/fstab
24
25# file system mount-point type options dump fsck
26# order
27
28/dev/<replaceable>[xxx]</replaceable> / <replaceable>[fff]</replaceable> defaults 1 1
29/dev/<replaceable>[yyy]</replaceable> swap swap pri=1 0 0
30proc /proc proc defaults 0 0
31sysfs /sys sysfs defaults 0 0
32devpts /dev/pts devpts gid=10,mode=620 0 0
33shm /dev/shm tmpfs defaults 0 0
34# End /etc/fstab</literal>
35EOF</userinput></screen>
36
37 <para os="b">Replace <replaceable>[xxx]</replaceable>,
38 <replaceable>[yyy]</replaceable>, and <replaceable>[fff]</replaceable>
39 with the values appropriate for the system, for example, <filename
40 class="partition">hda2</filename>, <filename
41 class="partition">hda5</filename>, and <systemitem
42 class="filesystem">ext2</systemitem>. For details on the six
43 fields in this file, see <command>man 5 fstab</command>.</para>
44
45 <para os="c">When using a journalling file system, the <parameter>1
46 1</parameter> at the end of the line should be replaced with
47 <parameter>0 0</parameter> because such a partition does not need to
48 be dumped or checked.</para>
49
50 <para os="d">The <filename class="directory">/dev/shm</filename> mount point
51 for <systemitem class="filesystem">tmpfs</systemitem> is included to
52 allow enabling POSIX-shared memory. The kernel must have the required
53 support built into it for this to work (more about this is in the next
54 section). Please note that very little software currently uses
55 POSIX-shared memory. Therefore, consider the <filename
56 class="directory">/dev/shm</filename> mount point optional. For more
57 information, see <filename>Documentation/filesystems/tmpfs.txt</filename>
58 in the kernel source tree.</para>
59
60</sect1>
Note: See TracBrowser for help on using the repository browser.