Valid HTML 4.01 Transitional
Prev: Music Player Won't Play Audio CDs Next: Automatic Volume Mounting Without KDE or Gnome
(Index)
Jim Carter's Bugfixes

Fails to Mount Media with VFAT

James F. Carter
2007-01-22
Symptom:

You've gotten gnome-volume-manager set up and it automatically mounts a data CD when inserted. However, it doesn't mount a USB flash memory stick or a digital camera that behaves as USB mass storage.

What's going on:

Haldaemon, which runs as root, actually mounts the media upon a request from gnome-volume-manager which it receives over dbus. It is very paranoid, to avoid being tricked into doing evil things as root. In particular, its storage mounting script (/usr/lib/hal/scripts/hal-system-storage-mount on my distro, SuSE 10.1) allows only alphanumeric characters, underbar, equal sign and whitespace in the mount options. When a VFAT filesystem is mounted, Hal provides an option of iocharset=iso8859-1 (which appears to be the default, but Hal specifies it anyway). This is sanitized into iso8859_1, and of course the corresponding kernel module does not exist, causing the mount to fail.

How to fix:

Edit the mounting script, or extract and apply the following patch, to allow hyphens in mount options. Note the hyphen added to the character class as the first byte after '^'.

--- /usr/lib/hal/scripts/hal-system-storage-mount.orig	2006-07-19 18:23:41.000000000 -0700
+++ /usr/lib/hal/scripts/hal-system-storage-mount	2007-01-22 22:00:51.000000000 -0800
@@ -82,7 +82,7 @@
 read GIVEN_MOUNTTYPE
 GIVEN_MOUNTTYPE=${GIVEN_MOUNTTYPE//[^a-zA-Z0-9_=]/_}
 read GIVEN_MOUNTOPTIONS
-GIVEN_MOUNTOPTIONS=${GIVEN_MOUNTOPTIONS//[^a-zA-Z0-9_=[:space:]]/_}
+GIVEN_MOUNTOPTIONS=${GIVEN_MOUNTOPTIONS//[^-a-zA-Z0-9_=[:space:]]/_}
 
 # deny to handle devices listed in fstab, unless the "user" option is given
 # allow only use of specified mountpoint and fail for a different one

This bug has been reported to SuSE (https://bugzilla.novell.com) and has been assigned bug number 237670.


Prev: Music Player Won't Play Audio CDs Next: Automatic Volume Mounting Without KDE or Gnome
(Index)