automounting and the usb storage device

From: Barsalou <barjunk@attglobal.net>
Date: Mon Nov 01 2004 - 00:02:16 AKST

Thanks for the answers everyone. Here is how it finally worked out:

I wanted the usb device to be mounted dynamically. The scenario that
you would see this happen is that your significant other (read "wife"
here) wants to take the SD memory from her new camera and put it into
the computer for e-mailing off to her friends.

Of course the subtleties of Linux escape her (and why shouldn't they?
<smile>), so she wants to be able to place the SD memory stick into the
memory reader and have it appear on the desktop.

I like this idea...it is simple, neat and should be able to work.

Interestingly enough, there is a system in place, in most distros I
understand, to do just that. It is called autofs. There are howto's
and what not on the web, so I will give you the quick and dirty version
here. (http://freespace.sourceforge.net/guidod/howto/autofs.html)

There are three files and a directory involved. Here are the players:

auto.master - the master autofs file
auto.misc - the default map file
auto.mike - my newly create map file
/media - My destination directory for automounted items

The files contain:

auto.master:
/media /etc/auto.mike --timeout=60

auto.misc: (we aren't going to use this one, has examples)

auto.mike:
camera -fstype=auto :/dev/sda1

That's it! You must restart autofs..for redhat its:

service autofs restart

The /media directory will become the main mount point for all devices
that end up in the auto.mike file. The key "camera" will become the
actual mountpoint of the USB device in this example.

In gnome, double clicking on the "home" directory icon mounts the USB
device. In about one minute (--timeout=60) it will automatically
unmount itself.

You would access the data, by going to the /media/camera directory, and
off you go!

There is a lot more to this, but I wanted to just give a quick run down
so others can give this a try. Feel free to ask questions and provide
more feedback about this cool feature.

Mike B.

-- 
Barsalou <barjunk@attglobal.net>
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sun Oct 31 23:45:41 2004

This archive was generated by hypermail 2.1.8 : Sun Oct 31 2004 - 23:45:41 AKST