Automounting


Table of Contents

automount usb-storage..?? 
automount usb-storage..?? 
automounting usb-storage 2 
Automounting card readers and USB keys using autofs 

automount usb-storage..?? 

Newsgroups:  gmane.linux.debian.user
Date:        Wed, 4 Oct 2006 09:49:04 +0200
> I've just upgraded my debian sarge to etch. When I plug usb-storage to my
> computer, it doesn't detect anything. Then after I installed HAL packages
> and autofs package, the auto-detection works but it's not automatically
> mounted and KDE Daemon detect it but I cannot read it instantly from
> Konqueror. Did I miss something?

There might be a slight misunderstanding: KDE does not really automount usb devices in the strict sense of the word. What happens is that an icon pops up on your desktop after you insert a pluggable device or removable media, but it is not mounted. After you click on the icon the device/media will be mounted and opened in konqueror. (You can also configure other actions, e.g. staring a media player if you insert an audio CD.)

As Oguz has already pointed out, you will need udev, dbus and hal. In addition to that it is advisable to install the pmount package and to add your user to the plugdev group. (Then you will not need /etc/fstab entries for the USB sticks.) If these packages are installed you should be able to activate the desktop icons in "K-Menu > Control Center > Desktop > Behavior > Device Icons". The settings for different types of media can be tuned in "Peripherals > Storage Media"; there should also be a dialog if you insert a given type for the first time after activating the icons.

If you still cannot get it to work you should post the output of

dpkg -l udev\* hal\* dbus\* pmount

so that we can check if you have the correct versions of all necessary packages installed.

Florian Kulzer

automount usb-storage..?? 

> > removable media, but it is not mounted. After you click on the icon the
> > device/media will be mounted and opened in konqueror....
>
> USB devices are automounted on my Etch system, but I would prefer the action
> you have described.  Is there a way to get that behavior in my system?

You probably have usbmount or a similar package installed. If you want to use the desktop-integrated handling of the removable devices it is better to uninstall this package (as is recommended in the package description of usbmount). If you do not know which process mounts your devices you can plug one in and check the syslog.

For any desktop environment (DE) that implements the freedesktop.org specifications related to removable media it should be enough to install udev, dbus, hal and pmount, as I have described in my earlier mail for the example of KDE. If you use Gnome you will need the package gnome-volume-manager in addition to that. Then it should should be just a matter of activating the icons in the control center, configuration menu or whatever it is called for the DE that you use.

Here are some troubleshooting tips if it should not work for you:

  1. Check if udev creates the device node after you plug in a usb stick. This should be something like /dev/sda, /dev/sda1, /dev/sdb, /dev/sdb1, etc. I would assume that this is OK for you, since you have some sort of automounting working at the moment.
  2. Remove the usb stick, run "lshal —monitor" and plug it in again. You should see messages about the detection of the medium, its device label, etc.
  3. Still no icons? Make sure they are activated within the DE and check ~/.xsession-errors and the syslog for error messages.

Florian Kulzer