USB flash auto-mounting

Jon Povey Jon.Povey at racelogic.co.uk
Tue Sep 2 02:49:06 CDT 2008


udev will create the device files but not mount the device (at least not
in our configuration.. I haven't got much into udev and suspect it of
taking a lot of processing power on boot so plan to remove it).
 
We have custom hotplug scripts to mount the device,
/etc/hotplug/block.agent
you get a load of environment variables and some command line arguments
to determine what to do.
 
hope that helps

--
Jon Povey, Design Engineer
jon.povey at racelogic.co.uk | +44(0)1280 825983 

 


________________________________

	From: davinci-linux-open-source-bounces at linux.davincidsp.com
[mailto:davinci-linux-open-source-bounces at linux.davincidsp.com] On
Behalf Of Gabriele Filosofi
	Sent: 02 September 2008 08:25
	To: davinci-linux-open-source at linux.davincidsp.com
	Subject: USB flash auto-mounting
	
	
	
	Hi,
	I'm wondering if anyone has definitively solved the issue of
having a USB flash
	drive automatically mount to the file system when it is
inserted?
	To do this manually is quite simple: 
	 
	mkdir /media/usbflash
	mount -t vfat /dev/uba1 /media/usbflash 
	 
	I wish to make this mount occur automatically every time the
stick is plugged in.
	I did check .config to see if "CONFIG_HOTPLUG=y": it is.
	In /etc/fstab I put the following line:
	 
	none /proc/bus/usb usbfs defaults 0 0
	 
	but it is not sufficient. 
	 
	Tanks a lot
	 
	Gabriele
	 
	 
	 
	 
	 
	 
	An update on the situation, I?ve gotten the usb flash drive
	automounting, but only if I have it plugged in to the unit
during
	bootup.  I can?t get it to automount using hotplug or anything
else.
	The way I have my fstab and udev mounting happening is the
following:
	 
	udev/rules.d/99-mount.rules :
	BUS=="usb", SYSFS{product}=="JD FIREFLY", KERNEL=="sd?1",
NAME="lexar",
	SYMLINK="usbdevices/lexar", RUN+="/usr/local/bin/mountlexar.sh"
	 
	fstab:
	/dev/sda1       /media/LEXAR vfat
	rw,nodiratime,sync,nosuid,nodev,noexec,fmask=0033,dmask=0033 0 0
	 
	I think I may have moved around the initialization scripts
	within /etc/rc.d/rcS.d to make the mountall script run after all
the
	udev stuff but I can't quite remember.  I tried lots of things
before
	this one finally worked. Good luck, and if i manage to figure
out the
	hotplug mounting I'll be sure to post it.
	 
	 
	 
	 
	 
	 
	I did check .config to see if "CONFIG_HOTPLUG=y": it is.
	 
	Checking /proc/sys/kernel/hotplug is a good idea: it contains
	"/sbin/udevsend", which is what I would expect to see.
	 
	And also, the udevd daemon is indeed running.
	 
	~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
	  Ing. Gabriele Filosofi
	  GabrieleF at cosmed.it <mailto:GabrieleF at cosmed.it>  
	  COSMED srl, R&D Department
	  P.O. Box 3
	  Via dei Piani di Monte Savello, 37
	  00040 - Pavona di Albano, Rome - ITALY
	  Voice: +39-06 931 5492, Fax: +39-06 931 4580
	  http://www.cosmed.it <http://www.cosmed.it/> 
	 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
	 
	 
	 


 
Racelogic is a limited company registered in England. Registered number 2743719 . 
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB .
The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://linux.omap.com/pipermail/davinci-linux-open-source/attachments/20080902/f8efe5af/attachment.htm


More information about the Davinci-linux-open-source mailing list