Automount USB drives – Ubuntu Server

If you try to use Ubuntu as a server, sometimes you come a cropper of relying on the facilities provided by the desktop version. I use USB drives to manage some of my data and give them volume labels so that they’re always mounted in the same place – /media/label. This doesn’t work if you’re not logged in to the GUI.

At first, I got tangled up in usbmount, which is recommended. However, it mounts the drives into usb0, usb1 etc. I couldn’t get it to mount by volume name – it even complained “/dev/sdb does not contain a filesystem or disklabel”.

The solution was to install halevt, which provides the hardware abstraction layer and an event handler to deal with plugging in USB drives.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: