Super User is a question and answer site for computer enthusiasts and power users. 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

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).

share|improve this question

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

share|improve this answer
up vote 1 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).

share|improve this answer
    
that makes much sense!!! I was freaking out that only the first USB disk I plugged was mounted on usb0, and other stuff would be properly handled! thank you a lot! – Yul Otani Jun 8 '14 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .