Normally, when I attach an external USB drive to my Ubuntu system, the filesystem on it are automounted to /media/label. However, I'd like the filesystem to be mounted at a mount point of my choosing. I've added a line like this to my /etc/fstab:

UUID=2BE905C238C1F724   /p   ntfs-3g   defaults   0   0   # Passport 320GB

This allows me to manually mount the volume at /p by running sudo mount /p, however the filesystem is no longer automounted when the drive is attached to the PC. What do I need to do to get automount to this mount point to work, if at all possible?

link|improve this question
1  
This is not a real answer, more like a workaround: If the label is unique among your media, you could make /p a symlink to /media/label. – balpha Aug 1 '09 at 16:14
I've always had terrible luck with external USB drives and Ubuntu. They never seem to mount in the right place - so I did the same thing as balpha. – The How-To Geek Aug 1 '09 at 17:50
It seems like it should be possible to override this, at least for compliant volume managers, by arranging for the volume.mount_point HAL property to be set. I have not, however, figured out how to accomplish this or make it work with Thunar's volume manager. – Michael Ekstrand Aug 2 '09 at 0:58
feedback

2 Answers

up vote 10 down vote accepted

GeorgeM is close, but not close enough.

On Ubuntu, gnome-mount is reponsible for mounting media and also for maintaining the needed configuration. The man page of gnome-mount should tell you much more and with a little trial and error you should be able to achieve what you want.

After I played with this for a little while, I found the following:

  1. It seems you can not specifiy a mount point outside of /media
  2. You can set the mount points name by hal udi

The following command will change the settings used to mount a USB drive on my system:

gnome-mount --write-settings \
            --hal-udi /org/freedesktop/Hal/devices/volume_uuid_00AD_15D0 
            --mount-point p

When inserted, the USB drive will be mounted in /media/p

link|improve this answer
Thanks, I'll mark this as the accepted answer, unless someone comes up with a way to achieve mounts outside /media. – Lars Haugseth Aug 1 '09 at 22:56
feedback

The mount point is determined by HAL and its complicated and arcane rules. No need to hack your fstab file.

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.