Automatically mounting USB flash disks/ USB thumb drives

Didier Casse didierbe at sps.nus.edu.sg
Wed Aug 11 02:06:10 UTC 2004


On 10/08/04, at 14:11 +0100, Andy Green <fedora at warmcat.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tuesday 10 August 2004 13:35, Daniel Stonier wrote:
> > Another way to do it is use the automounter. For example, to automount at
> > /mnt/usb/flash
> >
> > - Create a mount point (directory): /mnt/usb
> > - Edit auto.master to include the line
> >   		/mnt/usb 	/etc/auto.usb  --timeout 5
> > - Copy auto.misc to auto.usb
> > - Comment/delete everything out in auto.usb and include the line
> > 		flash		-fstype=ext3		:/dev/sda1
> >    (Change fstype to whatever you have, I typically format my usb drives as
> > soon as I get them)
> > - Then run, service autofs start (might want to start this up at bootup,
> > easy to run redhat-config-services)
>
> Usbautocam should set up automount for you.
>
> Didier, what is in your /etc/auto.misc and /etc/auto.master?

/etc/auto.misc
--------------------------------------------------------------------------
# $Id: auto.misc,v 1.2 1997/10/06 21:52:04 hpa Exp $
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

cd              -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom

# the following entries are samples to pique your imagination
#linux          -ro,soft,intr           ftp.example.org:/pub/linux
#boot           -fstype=ext2            :/dev/hda1
#floppy         -fstype=auto            :/dev/fd0
#floppy         -fstype=ext2            :/dev/fd0
#e2floppy       -fstype=ext2            :/dev/fd0
#jaz            -fstype=ext2            :/dev/sdc1
#removable      -fstype=ext2            :/dev/hdd

# added by usbautocam script
# uid/gid=99=nobody
usbautocam -fstype=vfat,nosuid,nodev,sync,dirsync,uid=99,gid=99,umask=000
:/dev/sda1
--------------------------------------------------------------------------


/etc/auto.master
--------------------------------------------------------------------------
# /etc/auto.master
# mountpoint            map     options # see also: man 8 autofs
/mnt/auto/autofs        /etc/auto.tero  --timeout=4


# added by usbautocam script
/misc   /etc/auto.misc -t2
--------------------------------------------------------------------------


>
> Is
>
> rpm -q hotplug

(didier at microtronyx:didier)$ rpm -q hotplug

hotplug-2003_08_05-1


> > showing hotplug installed?
>
> What does uname -r show?
>

(didier at microtronyx:didier)$ uname -r

2.4.22-1.2115.nptl

Thanks for the reply Andy.



With kind regards,

Didier.

---
PhD student.

Singapore Synchrotron Light Source (SSLS)
5 Research Link,
Singapore 117603

Email: didierbe at sps dot nus dot edu dot sg

Web: http://ssls.nus.edu.sg







More information about the fedora-list mailing list