How do I configure my Debian installation to mount external USB drives to mount points based on the volume names of the drives? For instance, if I have a thumb drive with the volume name of "SWORDFISH," how do I have Linux mount it at /media/SWORDFISH?

I'm aware that this can be setup in FSTAB, but that requires that I know the UUID of the device beforehand and that I take the time to set each external device up in FSTAB first. That does nothing for me when I have a thumb drive that has never been plugged into my computer before.

This seems to be setup by default in Ubuntu/Kubuntu, but is not working for me with a fresh installation of Debian Squeeze and KDE4. I've spent the past 2 hours Googling for a solution and have turned up nothing.

UPDATE: My results are inconsistent. Sometimes Debian mounts devices to mount points based on the volume names, and other times it gives them generic mount points (e.g. /media/usb1).

link|improve this question
feedback

2 Answers

The functionality was implemented by Hal in the past (Lenny):

# cat /etc/debian_version 
5.0.8
# mount|tail -1
/dev/sdb1 on /media/Transcend type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=1000)
# grep /dev/sdb1 /var/log/syslog
May  9 13:14:24 sn-e0692 hald: mounted /dev/sdb1 on behalf of uid 1000

Hal is depreciated in Squeeze: http://lists.freedesktop.org/archives/hal/2008-May/011560.html

But you can install it: apt-get install hal

link|improve this answer
feedback
up vote 0 down vote accepted

Always check FSTAB first. If you had to use a USB thumb drive to install proprietary device drivers during installation, Squeeze will create an FSTAB entry for that device, which may cause it to always mount to a generic location, such as /media/usb0. To resolve this problem, just remove the FSTAB entry for that device(s).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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