fstab.xml 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. <sect1 id="ch08-fstab">
  2. <title>Creating the /etc/fstab file</title>
  3. <para>In order for certain programs to be able to determine where certain
  4. partitions are supposed to be mounted by default, the /etc/fstab file is
  5. used. A new file <filename>/etc/fstab</filename> is created containing the
  6. following:</para>
  7. <para><screen><userinput>cat &gt; /etc/fstab &lt;&lt; "EOF"</userinput>
  8. # Begin /etc/fstab
  9. # location of filesystem mount point fs-type options
  10. /dev/*LFS-partition device* / *fs-type* defaults 1 1
  11. /dev/*swap-partition device* swap swap defaults 0 0
  12. proc /proc proc defaults 0 0
  13. # End /etc/fstab
  14. <userinput>EOF</userinput></screen></para>
  15. <para><userinput>*LFS-partition device*</userinput>,
  16. <userinput>*swap-partition device*</userinput>
  17. and <userinput>*fs-type*</userinput> have to be replaced with the
  18. appropriate values (/dev/hda2, /dev/hda5 and reiserfs for example).</para>
  19. <para>When adding a reiserfs partition, the <userinput>1 1</userinput> at
  20. the end of the line should be replaced with <userinput>0 0</userinput>.</para>
  21. <para>For more information on the various fields which are in the fstab
  22. file, see <userinput>man 5 fstab</userinput>.</para>
  23. </sect1>