Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was reading a bit about gnome-mount, HAL, udev, etc. It left me with a couple of faint ideas how mounting a hotplug device might work in the latest Ubuntu release.

Could someone give a detailed explanation about what exactly is going on after a hotplug device (i.e. usb-stick) was plugged in?

share|improve this question
up vote 8 down vote accepted

Maybe you should specify which part of the process is interesting to you but let's say a USB stick is added then...

  • kernel detects and initializes the device (see dmesg), then exports all the information it has found via a directory in /sys (see /sys/devices)
  • kernel sends a uevent signal which is picked up by udev daemon
  • udev daemon gathers available info and checks config files in /etc/udev/rules.d/ and /lib/udev/rules.d/ for rules about symlinks to create in /dev, permissions to set, programmes to run and sets some variables concerning the device (see man udev)
  • udisks daemon in cooperation with gvfs-gdu-volume-monitor creates the appropriate directory in /media and mounts the new volume if deemed sensible
  • nautilus checks the contents, creates thumbnails and opens a window if it is configured to do so; it also looks into /media/*/autorun.inf file for executable content
share|improve this answer
that was just what i was interested in. thanks a lot! so is gvfs-gdu-volume-monitor responsible for picking an appropriate driver for the device? i'm asking because i have a problem with an ntfs formatted usb drive that is always mounted using the ntfs kernel module instead of the ntfs-3g driver. – koloman Mar 3 '11 at 9:51
No, it is actually udisks-daemon, but I'm afraid it is not configurable ( But you can use a udev rule to do that for you (haven't tried it myself) - see… – arrange Mar 3 '11 at 21:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.