Ignore:
Timestamp:
01/06/2006 02:59:05 AM (19 years ago)
Author:
Jeremy Huntwork <jhuntwork@…>
Children:
e1ca33a
Parents:
1714f1a
Message:

Merged recent changes from trunk to lfs-alpha. Fixed typo.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/fstab.xml

    r1714f1a r46a2e9c  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
     3  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
    34  <!ENTITY % general-entities SYSTEM "../general.ent">
    45  %general-entities;
    56]>
     7
    68<sect1 id="ch-bootable-fstab">
    7 <title>Creating the /etc/fstab File</title>
    8 <?dbhtml filename="fstab.html"?>
     9  <?dbhtml filename="fstab.html"?>
    910
    10 <indexterm zone="ch-bootable-fstab"><primary sortas="e-/etc/fstab">/etc/fstab</primary></indexterm>
     11  <title>Creating the /etc/fstab File</title>
    1112
    12 <para>The <filename>/etc/fstab</filename> file is used by some programs to
    13 determine where file systems are to be mounted by default, in which order, and
    14 which must be checked (for integrity errors) prior to mounting. Create a new
    15 file systems table like this:</para>
     13  <indexterm zone="ch-bootable-fstab">
     14    <primary sortas="e-/etc/fstab">/etc/fstab</primary>
     15  </indexterm>
     16
     17  <para>The <filename>/etc/fstab</filename> file is used by some programs to
     18  determine where file systems are to be mounted by default, in which order, and
     19  which must be checked (for integrity errors) prior to mounting. Create a new
     20  file systems table like this:</para>
    1621
    1722<screen><userinput>cat &gt; /etc/fstab &lt;&lt; "EOF"
     
    3035EOF</userinput></screen>
    3136
    32 <para>Replace <replaceable>[xxx]</replaceable>,
    33 <replaceable>[yyy]</replaceable>, and <replaceable>[fff]</replaceable>
    34 with the values appropriate for the system, for example, <filename
    35 class="partition">hda2</filename>, <filename
    36 class="partition">hda5</filename>, and <systemitem
    37 class="filesystem">ext2</systemitem>. For details on the six
    38 fields in this file, see <command>man 5 fstab</command>.</para>
     37  <para>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>
    3944
    40 <para>The <filename class="directory">/dev/shm</filename> mount point
    41 for <systemitem class="filesystem">tmpfs</systemitem> is included to
    42 allow enabling POSIX-shared memory. The kernel must have the required
    43 support built into it for this to work (more about this is in the next
    44 section). Please note that very little software currently uses
    45 POSIX-shared memory.  Therefore, consider the <filename
    46 class="directory">/dev/shm</filename> mount point optional. For more
    47 information, see
    48 <filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel
    49 source tree.</para>
     45  <para>The <filename class="directory">/dev/shm</filename> mount point
     46  for <systemitem class="filesystem">tmpfs</systemitem> is included to
     47  allow enabling POSIX-shared memory. The kernel must have the required
     48  support built into it for this to work (more about this is in the next
     49  section). Please note that very little software currently uses
     50  POSIX-shared memory.  Therefore, consider the <filename
     51  class="directory">/dev/shm</filename> mount point optional. For more
     52  information, see
     53  <filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel
     54  source tree.</para>
    5055
    51 <para>There are other lines which may be added to the
    52 <filename>/etc/fstab</filename> file. One example is a line for USB
    53 devices:</para>
     56  <para>There are other lines which may be added to the
     57  <filename>/etc/fstab</filename> file. One example is a line for USB
     58  devices:</para>
    5459
    5560<screen>usbfs        /proc/bus/usb usbfs   devgid=14,devmode=0660 0 0 </screen>
    5661
    57 <para>This option will only work if <quote>Support for Host-side USB</quote> and
    58 <quote>USB device filesystem</quote> are configured in the kernel. If
    59 <quote>Support for Host-side USB</quote> is compiled as a module, then
    60 <filename>usbcore</filename> must be listed in
    61 <filename>/etc/sysconfig/modules</filename>.</para>
     62  <para>This option will only work if <quote>Support for Host-side USB</quote>
     63  and <quote>USB device filesystem</quote> are configured in the kernel. If
     64  <quote>Support for Host-side USB</quote> is compiled as a module, then
     65  <filename>usbcore</filename> must be listed in
     66  <filename>/etc/sysconfig/modules</filename>.</para>
     67
     68  <para>Filesystems with MS-DOS or Windows origin (i.e.: vfat, ntfs, smbfs, cifs,
     69  iso9660, udf) need the <quote>iocharset</quote> mount option in order for
     70  non-ASCII characters in file names to be interpreted properly. The value
     71  of this option should be the same as the character set of your locale,
     72  adjusted in such a way that the kernel understands it. This works if the
     73  relevant character set definition (found under File systems -&gt;
     74  Native Language Support) has been compiled into the kernel
     75  or built as a module. The <quote>codepage</quote> option is also needed for
     76  vfat and smbfs filesystems. It
     77  should be set to the codepage number used under MS-DOS in your country. E.g.,
     78  in order to mount USB flash drives, a ru_RU.KOI8-R user would need the
     79  following line in <filename>/etc/fstab</filename>:</para>
     80
     81<screen>/dev/sda1    /media/flash vfat noauto,user,quiet,showexec,iocharset=koi8r,codepage=866 0 0</screen>
     82
     83  <para>The corresponding line for ru_RU.UTF-8 users is:</para>
     84
     85<screen>/dev/sda1    /media/flash vfat noauto,user,quiet,showexec,iocharset=utf8,codepage=866 0 0</screen>
     86
     87  <note><para>In the latter case, the kernel emits the following message:</para>
     88
     89<screen><computeroutput>FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!</computeroutput></screen>
     90
     91  <para>This negative recommendation should be ignored, since all other values
     92  of the <quote>iocharset</quote> option result in wrong display of filenames in
     93  UTF-8 locales.</para></note>
     94
     95  <para>It is also possible to specify default codepage and iocharset values for
     96  some filesystems during kernel configuration. The relevant parameters
     97  are named
     98  <quote>Default NLS Option</quote> (CONFIG_NLS_DEFAULT),
     99  <quote>Default Remote NLS Option</quote> (CONFIG_SMB_NLS_DEFAULT),
     100  <quote>Default codepage for FAT</quote> (CONFIG_FAT_DEFAULT_CODEPAGE), and
     101  <quote>Default iocharset for FAT</quote> (CONFIG_FAT_DEFAULT_IOCHARSET).
     102  There is no way to specify these settings for the
     103  ntfs filesystem at kernel compilation time.</para>
     104  <!-- Personally, I find it more foolproof to always specify the iocharset and
     105  codepage in /etc/fstab for MS-based filesystems - Alexander E. Patrakov -->
    62106
    63107</sect1>
    64 
Note: See TracChangeset for help on using the changeset viewer.