LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-29-2003, 11:28 AM   #1
bestmehr
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Rep: Reputation: 0
How to automount device...


I need to be able to auto-mount a device only after it's been detected (plugged-in). Where would be the starting point for such script, and where should it reside?


Thanks much.
 
Old 11-29-2003, 02:12 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Have a look at
http://www.dotaster.com/~shuu/linux/usbmgr/


Cheers,
Tink
 
Old 11-29-2003, 03:12 PM   #3
bestmehr
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks Tinkster for the reply,

I took a look at the link you recommended. This was way over my head and I don't want to update my kernel, yet. All I want to be able to do is to mount a directory upon detection of a device. I am doing this now manually but I thought I can just have a simple script that can do this. You know how when a CD is inserted into the CD drive it gets mounted? Pretty simple I think, I just dunno where to start.

Thanks.
 
Old 11-29-2003, 04:25 PM   #4
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Hi,

Well you could write a script but since you just want to mount it during bootup then just edit /etc/fstab. For example, lets say you plugged in a new hdd and you want to mount a partition labeled hdb1. Then add this line to your /etc/fstab:

/dev/hdb1 /home/whatever ext2 defaults 0 1

NOTE: Make sure you make that directory first! However, if you have that partition as ext3, then if I recall correctly, the last field is 2 instead of 1. If you want to know the definition of those fields, just do a google search. Google is your best friend

-twantrd
 
Old 11-29-2003, 09:17 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by bestmehr
Thanks Tinkster for the reply,

I took a look at the link you recommended. This was way over my head and I don't want to update my kernel, yet. All I want to be able to do is to mount a directory upon detection of a device. I am doing this now manually but I thought I can just have a simple script that can do this. You know how when a CD is inserted into the CD drive it gets mounted? Pretty simple I think, I just dunno where to start.

Thanks.
Is that device USB in the first place? :)

Depending on what distro you're using chances
are you won't have to re-compile your kernel, they
are pretty common defaults in most distros.

Usbmgr isn't that difficult to install, either.


Cheers,
Tink
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Block device /dev/sda3 is not a valid root device.. rincewind Linux - Hardware 7 06-09-2006 05:47 AM
eth0 device cannot be located, nVidia onboard device Dunedain Linux - Networking 1 04-16-2005 01:20 AM
Failed to open device /dev/usb/ttyUSB0: No such device efm Linux - Newbie 2 04-04-2005 09:46 PM
Assign one USB-storage device to one device file Misel Linux - Hardware 1 08-28-2004 04:52 AM
loop: can't open device /dev/loop0: No such device or address miaviator278 Linux - Security 3 06-09-2004 10:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:55 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration