Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
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?


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

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

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.
Old 07-12-2006, 06:47 PM   #2
Senior Member
Registered: Sep 2004
Distribution: slackware
Posts: 2,023

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
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:
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.


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 / openSUSE 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 > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:31 PM.

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