Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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 (web.archiveorange.com/archive/v/7azSg34QulEtgOvRXE08) But you can use a udev rule to do that for you (haven't tried it myself) - see wiki.archlinux.org/index.php/… –  arrange Mar 3 '11 at 21:54
add comment

Your Answer

 
discard

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.