Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting USB stick to automount.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Ineluki12
Tux's lil' helper
Tux's lil' helper


Joined: 19 Nov 2004
Posts: 93
Location: Missouri

PostPosted: Fri Dec 10, 2004 9:47 pm    Post subject: Getting USB stick to automount. Reply with quote

I'm having some trouble figuring out how I can get my usb drive to automatically mount and be available to a non-root username as soon as it's plugged in while the system is already running. It shows up as /dev/sda1 and works just fine, I'm just not experienced in Linux. Also, I'm curious why this usb device shows up as a scsi device...doesn't make any sense to me.

Thank you!!!
_________________
"Before insulting a man, walk a mile in his shoes. That way, he's a mile away and without shoes." --unknown
Back to top
View user's profile Send private message
Private_X
n00b
n00b


Joined: 30 May 2003
Posts: 34
Location: Germany

PostPosted: Fri Dec 10, 2004 10:06 pm    Post subject: Reply with quote

For the automount problem I have no idea but you can mount your usb stick as user if you put something like this
Code:
/dev/sda1               /mnt/usb        auto            noatime,user,noauto     0 0

in your /etc/fstab. After this you should be able to mount the usb stick as user.
Code:
$ mount /mnt/usb

That it comes up as a scsi device is only because it is internally dealt as a scsi emulation so they don't have do write extra code for handling read and write stuff on usb devices.

Hope I could help.
Back to top
View user's profile Send private message
Ineluki12
Tux's lil' helper
Tux's lil' helper


Joined: 19 Nov 2004
Posts: 93
Location: Missouri

PostPosted: Sat Dec 11, 2004 1:10 am    Post subject: Reply with quote

Excellent! I was thinking the fstab file was only for booting. But, I put the line in, popped in the usb stick, and there it was. Thanks!
_________________
"Before insulting a man, walk a mile in his shoes. That way, he's a mile away and without shoes." --unknown
Back to top
View user's profile Send private message
venkat
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2003
Posts: 110
Location: USA

PostPosted: Sat Dec 11, 2004 1:41 am    Post subject: Reply with quote

a little problem with the above method is that, if you unplug your stick and replug it, it may be assigned a different dev entry like /dev/sda2 etc. then the fstab entry won't be relevant.

if you use udev for device management, then there are udev rules that can map all these different /dev/sdXX entries generated to a single symlink (/dev/usbstick for e.g.) that ofcourse you may put in your fstab as above.

also, one more note about using auto in the fstab entry. i read somewhere that it might be unsafe, the mount command sniffs a 'magic' entry on the storage device to sense the filesystem. there is a remote chance that i might sense it wrong. that would mess up all data in the device. so if you know what filesystem you have just explicitly state it there, like vfat etc.
_________________
http://venkatu.dotgeek.org/blog/
Back to top
View user's profile Send private message
Ineluki12
Tux's lil' helper
Tux's lil' helper


Joined: 19 Nov 2004
Posts: 93
Location: Missouri

PostPosted: Sat Dec 11, 2004 9:50 pm    Post subject: Reply with quote

Ok, thanks! If I have problems with it showing up on a different device name, I'll give that a whirl. And ya, I already had it set to vfat b/c it won't even accept auto from the command line for my usb stick.....wierd, but vfat works great.

Thanks
_________________
"Before insulting a man, walk a mile in his shoes. That way, he's a mile away and without shoes." --unknown
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum