2001-08-08 22:19:15 +01:00
|
|
|
<sect1 id="ch08-fstab">
|
2001-01-24 00:31:17 +00:00
|
|
|
<title>Creating the /etc/fstab file</title>
|
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>In order for certain programs to be able to determine where certain
|
2001-01-24 00:31:17 +00:00
|
|
|
partitions are supposed to be mounted by default, the /etc/fstab file is
|
2001-08-29 21:01:45 +01:00
|
|
|
used. Create a new file <filename>/etc/fstab</filename> containing the
|
2001-07-22 20:45:10 +01:00
|
|
|
following:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><screen><userinput>cat > /etc/fstab << "EOF"</userinput>
|
2001-01-24 00:31:17 +00:00
|
|
|
# Begin /etc/fstab
|
|
|
|
|
2001-08-08 22:19:15 +01:00
|
|
|
# location of filesystem mount point fs-type options
|
|
|
|
|
|
|
|
/dev/*LFS-partition device* / *fs-type* defaults 1 1
|
|
|
|
/dev/*swap-partition device* swap swap defaults 0 0
|
|
|
|
proc /proc proc defaults 0 0
|
2001-01-24 00:31:17 +00:00
|
|
|
|
|
|
|
# End /etc/fstab
|
2001-07-22 20:45:10 +01:00
|
|
|
<userinput>EOF</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-08-08 22:19:15 +01:00
|
|
|
<para><userinput>*LFS-partition device*</userinput>,
|
|
|
|
<userinput>*swap-partition device*</userinput>
|
|
|
|
and <userinput>*fs-type*</userinput> have to be replaced with the
|
|
|
|
appropriate values (/dev/hda2, /dev/hda5 and reiserfs for example).</para>
|
|
|
|
|
|
|
|
<para>When adding a reiserfs partition, the <userinput>1 1</userinput> at
|
|
|
|
the end of the line should be replaced with <userinput>0 0</userinput>.</para>
|
|
|
|
|
|
|
|
<para>For more information on the various fields which are in the fstab
|
|
|
|
file, see <userinput>man 5 fstab</userinput>.</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-08-16 23:26:29 +01:00
|
|
|
<para>There are other lines which you may consider adding to your fstab
|
|
|
|
file. One example is the line which you must have if you are using
|
2001-08-17 14:51:35 +01:00
|
|
|
devpts:</para>
|
2001-09-08 01:46:34 +01:00
|
|
|
<para><screen>devpts /dev/pts devpts gid=4,mode=620 0 0</screen></para>
|
2001-08-16 23:26:29 +01:00
|
|
|
|
|
|
|
<para>Another example is a line to use if you intend to use USB
|
2001-08-17 14:51:35 +01:00
|
|
|
devices:</para>
|
2001-09-11 17:45:42 +01:00
|
|
|
<para><screen>usbdevfs /proc/bus/usb usbdevfs defaults 0 0</screen></para>
|
2001-08-16 23:26:29 +01:00
|
|
|
|
|
|
|
<para>Both of these options will only work if you have the relevant
|
|
|
|
support compiled into your kernel.</para>
|
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
</sect1>
|
|
|
|
|