LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 07-12-2006, 03:01 PM   #1
krmane
Member
 
Registered: May 2006
Posts: 49

Rep: Reputation: 15
confusion on automount of USB pen drive with hotplug


hello,
I have a generic hotplug problem which mostly a newbee to this concept might ask.
I want to do the following.
1. let hotplug (udev) detect which USB pen drive has been connected and create a device entry for the same.
2. create a script for the hotplug event to mount that pen drive on /mnt/usb and fire the ls command.
so is this possible and any hints how?
I have all settings made in the /etc/fstab to load the /dev/sda1 to /mnt/usb as I am sure that my pen drive is being detected as /dev/sda1 and I have used the noauto parameter as well.
umask is 022 so all the settings are there.
only I want to mount any device that is detected as /dev/sda1 and list its contents.
Please help and I will appreciate an example that does exactly what I mentioned.
thanks,
Krishnakant.
 
Old 07-12-2006, 06:47 PM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,754

Rep: Reputation: 169Reputation: 169
First and foremost, you need a 2.6 series kernel.

Second, udev must be installed and running. If you don't see the appropriate entry appearing under /dev, then you have mis-configured something. Your kernel must support SCSI in order for USB storage devices to work properly.

Now, with those two items correctly configured, you can automate the mounting of attached USB storage devices with a package called usb-mount:
http://usbmount.alioth.debian.org/
This is basically a set of scripts which are installed under /etc. I was able to get it working under Slackware pretty easily. It enables you to run whatever command you wish upon insertion or removal of a USB storage device. Using this package, you don't need entries in /etc/fstab for any USB storage devices.
 
  


Reply

Tags
automount, drive, udev, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't mount usb pen drive with hotplug dori Slackware 8 03-02-2007 02:22 AM
USB Pen Drive no automount in Suse 10.0 litlmary Suse/Novell 1 05-25-2006 09:29 AM
hotplug script for usb-pen aspartat Linux - Software 2 02-20-2005 07:21 AM
Fedora Core 3 / USB Pen Drive Automount clickster Fedora 2 12-31-2004 06:16 AM
Usb pen and hotplug, after Kernel 2.6.9 gatsu81 Linux - Hardware 0 12-23-2004 09:08 AM


All times are GMT -5. The time now is 03:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration