Quote Originally Posted by EReckase
I have a 512 MB Intelligent Stick USB drive that I want to use for my GnuPG keys. I want the USB drive to automatically be mounted at a known location every time it's plugged in, so that the GnuPG paths can stay fixed regardless of whether or not I plug in another device. This HOWTO worked great, except for one little detail...how can I make the USB drive automount now that I've set up a mount point for it? When I remove the drive, re-inserting it does not automount it like it did before I made the changes above. I'll happily install autofs if need be, but I could use some pointers (/me is a n00b).

The one difference I had from your tutorial is that my external drive is formatted ext3 rather than vfat, so my mount line in fstab is
/dev/usbdevices/usb_gnupg  /media/usb_gnupg ext3 defaults,errors=remount-ro  0  0
Regards, and thanks for the tutorial.
Is that correct?
You don't need autofs. If you are using the gnome-volume-manager (default Ubuntu/GNOME installation = yes), it should handle the automounting.

All udev does is set the device node for the attached device, which you have done correctly if you can mount the USB via the new device node.

Getting it to automount should really only be an issue with the /etc/fstab. The fact that it is ext3, should make this easier too. I always had major issues trying to automount FAT16 partitions in Breezy.


When the gnome-volume-manager finds a new device (courtesy of hotplug, hal and udev) it will mount it using its own method. What's special about the gnome-volume-manager is that it can mount a device without needing root privileges. Meaning it doesn't require sudo.

If a line in the /etc/fstab has been specified, then that line takes precedence over the gnome-volume-manager's method. If this is the case, the line must allow for an ordinary user to mount the USB disc, or the gnome-volume-manager can't mount it automatically.

That's the theory though It worked just now on a LiveCD, so I hope it works now for you.


First can you try commenting (adding a # sign) the USB entry in your /etc/fstab. Then try un-plugging/plugging in your USB disc.

If this works, then we know that the gnome-volume-manager is functioning properly. All that is left is to uncomment (remove the #) and change the line in the fstab to inlucde the option user.

This option allows the partition to be mounted by an ordinary user (no need for sudo)
/dev/usbdevices/usb_gnupg /media/usb_gnupg ext3 user,suid,dev,exec,auto, async,errors=remount-ro 0 0
Then try un-plugging/plugging in the USB.

- I replaced the defaults option with suid,dev,exec,auto, async because the user option over-rides the defaults (the options in red). You can read more about these options, by using
man mount
or going here

Mount Man Page

Fingers crossed.