HAL wiki faq: how to automount hotpluggable devices
Remco Treffkorn
remco at rvt.com
Tue Apr 24 12:23:17 PDT 2007
The FAQ asks the question:
"How to mount a specific storage device to a specific mountpoint using fdi
files Answer welcome ;)"
There is no answer.
My general problem is: I would like to plug in a USB stick (with or without
partition table) and have the filesystems mounted under /media.
I spent about 5 days looking and playing. I found many wrong approaches using
UDEV rules, ivman, pmount, and gnome-volume-manager. The documentation I
found seems all a bit outdated.
Here is my current understanding of how it works:
Hal learns from udev that a device showed up. Hal does all the magic, finding
out about partions, filesystems and such. It then tells anybody listening,
that volumes are available for mounting.
Here it gets a bit murky. It seems that in the past it was the applications
responsibility to do the actual mounting, but I have the feeling that has
changed, or at least is not the only way it can be done. (Does anybody even
remember fstab-sync ?)
The existence of .hal-mtab in /media seems to suggest that hal itself can do
the mounting if asked to (via the Mount() method?).
Could somebody in the know please summarize how an application listening on
dbus can cause hal to mount/unmount volumes?
Is there a way to have a policy .fdi that does the mounting/unmounting without
third party involvement?
This is for an embedded application without any desktop managers involved.
Cheers,
Remco
--
Remco Treffkorn (RT445)
HAM DC2XT
remco at rvt.com (831) 685-1201
More information about the hal
mailing list