r7152 - in trunk/BOOK: . general/sysutils introduction/welcome

alexander at linuxfromscratch.org alexander at linuxfromscratch.org
Fri Dec 21 09:08:30 PST 2007


Author: alexander
Date: 2007-12-21 10:08:30 -0700 (Fri, 21 Dec 2007)
New Revision: 7152

Modified:
   trunk/BOOK/general.ent
   trunk/BOOK/general/sysutils/hal.xml
   trunk/BOOK/introduction/welcome/changelog.xml
Log:
Updated the text about default mount options.


Modified: trunk/BOOK/general/sysutils/hal.xml
===================================================================
--- trunk/BOOK/general/sysutils/hal.xml	2007-12-20 00:59:23 UTC (rev 7151)
+++ trunk/BOOK/general/sysutils/hal.xml	2007-12-21 17:08:30 UTC (rev 7152)
@@ -309,39 +309,86 @@
       <xref linkend="gnome-volume-manager"/> or <ulink
       url="http://ivman.sourceforge.net/">Ivman</ulink> should be
       installed.</para>
+      <!-- FIXME: is Ivman still alive? -->
 
-      <!-- Following note is only relevant for HAL-0.5.7.x.
-           Fixed upstream. -->
-      <note>
-        <para><application>HAL</application> will ignore any devices listed
-        in <filename>/etc/fstab</filename> for the purpose of automounting.
-        You must remove any listings for devices that you would like
-        automounted such as CD-ROMs or USB keys.</para>
-      </note>
+      <para>In some cases, it is necessary to specify some default mount
+      options for filesystems. E.g., in non-English environments, the
+      <option>iocharset</option> and <option>codepage</option> options
+      are needed for filesystems with Windows origin in order to show
+      national characters correctly. Also, due to a
+      <ulink url="https://launchpad.net/bugs/133567">bug</ulink> in the
+      Linux kernel version in LFS (2.6.22.x), you may want to pass the
+      <option>usefree</option> options to vfat filesystems in order to reduce
+      the time needed to determine the amount of free space on the
+      filesystem.</para>
 
-    <!-- This section commented out for now until it is determined what should
-         be placed in this section
+      <para>Google search results for <quote>hal default mount options</quote>
+      are still full of recommendations to create <filename>*.fdi</filename>
+      files mentioning either
+      <option>volume.policy</option> or <option>storage.ploicy</option> keys.
+      Such recommendations worked for HAL-0.4.x only and are invalid now.
+      For HAL-&hal-version;, mount options are expected to be handled
+      as follows:</para>
 
-         FIXME: I think this information is still relevant with the
-         exception of its interaction with /etc/fstab. Needs investigation.
+      <itemizedlist>
+        <listitem>
+          <para>An event handler from the desktop environment receives an
+          event describing the newly-added storage device.</para>
+        </listitem>
+        <listitem>
+          <para>If the storage device is not already mentioned in
+          <filename>/etc/fstab</filename>, mount options are fetched from
+          a database of user preferences, which is specific to the desktop
+          environment, and passed back to HAL.
+          This process can be influenced by the filesystem type
+          and possibly other volume properties available from HAL.</para>
+        </listitem>
+        <listitem>
+          <para>If the options are in the list of permitted ones, HAL
+          mounts the volume.</para>
+        </listitem>
+      </itemizedlist>
 
-      <para>No configuration is necessary for the majority of installations
-      on systems configured with ISO-8859-1 compatible locales. The defaults
-      should work just fine. For some installations, tweaking of the various
-      policies may be required. One such configuration change necessary in some
-      locales is identifying the <option>iocharset</option> and
-      <option>codepage</option> variables in the
-      <filename>/etc/fstab</filename> entries created by the
-      <command>fstab-sync</command> program. If changes are required to the
-      configuration so that your locale is properly identified in the entries
-      created in <filename>/etc/fstab</filename>, issue the following commands
-      as the <systemitem class="username">root</systemitem> user (you must
-      substitute the proper data for the
-      <replaceable><iocharset></replaceable> and
-      <replaceable><codepage></replaceable> info):</para>
+      <para>The important point above is that the configuration procedure is
+      desktop-specific. However, as of December, 2007, only GNOME allows the
+      user to set default mount options on a per-filesystem basis. To do so,
+      change the
+      <systemitem>/system/storage/default_options/[fs_type]/mount_options</systemitem>
+      GConf key either using <xref linkend="gconf-editor"/>, or from the
+      command line, as demonstrated in the following example:</para>
 
+<screen><userinput>gconftool-2 --type list --list-type=string \
+    --set /system/storage/default_options/vfat/mount_options \
+    "[shortname=mixed,uid=,usefree,iocharset=koi8-r,codepage=866]"</userinput></screen>
+
+      <para>See more details in the gnome-mount(1) manual page.</para>
+      
+      <para>KDE allows the mount options to be set only on a per-volume basis,
+      not per-filesystem, which is a
+      <ulink url="http://bugs.kde.org/show_bug.cgi?id=133456">bug</ulink>,
+      because, as mentioned in the report, <quote>for every new device (let's
+      say your friend USB stick) you have to first not mount it, then change
+      options and then mount</quote>. Xfce, if compiled with HAL support,
+      <ulink url="http://bugzilla.xfce.org/show_bug.cgi?id=2891">hard-codes</ulink>
+      the mount options without any means to override them,
+      which is even worse.
+      <!-- (for BLFS editors only: they mention policy-kit as a future
+           solution, but, from the description, policy-kit looks like
+           an XML-ized sudo-like confguration parser, which has nothing
+           common with the "default mount options" problem. -->
+      In these desktop environments, if the built-in
+      default mount options are not suitable, it is needed to mention every
+      possible removable storage device in <filename>/etc/fstab</filename>
+      with the correct options, thus mostly defeating the point of
+      installing HAL.</para>
+
+      <para>If HAL does not accept new mount options by default,
+      (in the above example, this happens with the <option>usefree</option>
+      option), as <systemitem class="username">root</systemitem> user,
+      create a custom policy file that mentions unknown mount options:</para>
+
 <screen role="root"><userinput>install -v -m755 -d /etc/hal/fdi/policy/30user &&
-cat > /etc/hal/fdi/policy/30user/30user-policy.fdi << "EOF"
+cat > /etc/hal/fdi/policy/30user/30user-options.fdi << "EOF"
 <literal><?xml version="1.0" encoding="UTF-8"?> <!- -*- SGML -*- ->
 
 <!-
@@ -352,53 +399,28 @@
 ->
 
 <deviceinfo version="0.2">
-
   <device>
-    <match key="info.udi"
-        string="/org/freedesktop/Hal/devices/computer">
 
-      <!- Set the iocharset variable in the /etc/fstab file entry ->
-      <merge
-        key="storage.policy.default.mount_option.iocharset=<replaceable><iocharset></replaceable>"
-        type="bool">true</merge>
+    <!-- this is to be able to mount media in drives we cannot poll,
+         e.g. IDE Zip Drives and PC style floppy drives -->
+    <match key="storage.media_check_enabled" bool="false">
+      <match key="storage.no_partitions_hint" bool="true">
+        <append key="volume.mount.valid_options" type="strlist">usefree</append>
+      </match>
+    </match>
 
-      <!- Set the codepage variable in the /etc/fstab file entry ->
-      <merge
-        key="storage.policy.default.mount_option.codepage=<replaceable><codepage></replaceable>"
-        type="bool">true</merge>
+    <match key="volume.fsusage" string="filesystem">
 
+      <!-- allow these mount options for vfat -->
+      <match key="volume.fstype" string="vfat">
+        <append key="volume.mount.valid_options" type="strlist">usefree</append>
+      </match>
     </match>
+
   </device>
-
 </deviceinfo></literal>
-
 EOF</userinput></screen>
 
-      <note>
-        <para>The previous commands created a file named
-        <filename>/etc/hal/fdi/policy/30user/30user-policy.fdi</filename>. To
-        ease readability of the file, put everything between the
-        <angle brackets> and <merge></merge> tags on one
-        line. You must have at least one space character
-        where the ends of the lines were. The file would then look like this
-        (trimmed at the top and bottom for brevity):</para>
-
-<screen><literal>  <device>
-    <match key="<replaceable><text></replaceable>" string="<replaceable><text></replaceable>">
-
-      <!- Set the iocharset variable in the /etc/fstab file entry ->
-      <merge key="<replaceable><iocharset text></replaceable>" type="bool">true</merge>
-
-      <!- Set the codepage variable in the /etc/fstab file entry ->
-      <merge key="<replaceable><codepage text></replaceable>" type="bool">true</merge>
-
-    </match>
-  </device></literal></screen>
-
-      </note>
-
-    -->
-
     </sect3>
 
     <sect3  id="hal-init">

Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent	2007-12-20 00:59:23 UTC (rev 7151)
+++ trunk/BOOK/general.ent	2007-12-21 17:08:30 UTC (rev 7152)
@@ -3,11 +3,11 @@
 $Date$
 -->
 
-<!ENTITY day          "19">                   <!-- Always 2 digits -->
+<!ENTITY day          "21">                   <!-- Always 2 digits -->
 <!ENTITY month        "12">                   <!-- Always 2 digits -->
 <!ENTITY year         "2007">
 <!ENTITY version      "svn-&year;&month;&day;">
-<!ENTITY releasedate  "December &day;th, &year;">
+<!ENTITY releasedate  "December &day;st, &year;">
 <!ENTITY pubdate      "&year;-&month;-&day;"> <!-- metadata req. by TLDP -->
 <!ENTITY blfs-version "svn">                  <!-- svn|[release #] -->
 <!ENTITY lfs-version  "development">          <!-- version|testing|unstable|development] -->

Modified: trunk/BOOK/introduction/welcome/changelog.xml
===================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml	2007-12-20 00:59:23 UTC (rev 7151)
+++ trunk/BOOK/introduction/welcome/changelog.xml	2007-12-21 17:08:30 UTC (rev 7152)
@@ -42,6 +42,16 @@
 -->
 
     <listitem>
+      <para>December 21st, 2007</para>
+      <itemizedlist>
+        <listitem>
+          <para>[alexander] - Updated the text about default mount options
+          on the HAL page.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>December 19th, 2007</para>
       <itemizedlist>
         <listitem>




More information about the blfs-book mailing list