I want to try to create a very minimized server installation which automatically mounts its internal SATA disks. Thus, I thought of using HAL as the way to go. As far as I read, HAL is just a daemon 'listening' for hardware changes and broadcasts the changes if they match a .fdi config file via dbus to its clients.
Which client can I use on a server install? I read about gnome-volume-manager
as a possibility but as I see, it wants to open a graphical display, which I don't need on a server install (even if it's just a software-display).
Any hints for further direction or are there any alternative dbus clients which are able to execute HAL events?
I got it work, but without hal/devicekit/gnome. I'm using basic udev rules and RUN commands to mount the disks
# /etc/udev/rules.d/local.rules
# /etc/udev/rules.d/89-local.rules
# ADD rule: if we have a valid ID_FS_USAGE, and it's a filesystem with a UUID, mkdir and mount
ENV{ID_FS_USAGE}=="filesystem", ENV{ID_FS_UUID_ENC}=="?*", ACTION=="add", RUN="/bin/mkdir -p /media/$env{ID_FS_UUID_ENC}" RUN+="/bin/mount -t auto /dev/%k /media/$env{ID_FS_UUID_ENC}" RUN+="/media/$env{ID_FS_UUID_ENC}/autostart.sh"
On Ubuntu, put this in the file /lib/udev/rules.d/89-local.rules
.
On Debian it should be in /etc/udev/rules.d
. I also added the possibility to run an autostart.sh
script during boot e.g. to start services only available on specific disks
Automatically mount external drives to /media/LABEL on boot without a user logged in? had the answer