Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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

share|improve this answer
add comment
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 at 13:17
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.