Unix Technical Forum

Automounting USB memory stick

This is a discussion on Automounting USB memory stick within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> BlackTopBum wrote: > Raymond Baastad said something like a ... > > [...] > >>Sep 17 19:38:53 [fstab-sync] added ...


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 02-21-2008, 11:28 AM
Raymond Baastad
 
Posts: n/a
Default Re: Automounting USB memory stick

BlackTopBum wrote:
> Raymond Baastad said something like a ...
>
> [...]
>
>>Sep 17 19:38:53 [fstab-sync] added mount point /media/usbdisk for
>>/dev/sda1

>
>
> Check permissions for /media/usbdisk - had to adjust mine to drwxr-xrwx .


chmod'ed it and got

drwxr-xrwx 2 root root 6 Sep 19 08:24 usbdisk

Removed and re-inserted the memory stick and got:

drwxr-xr-x 2 root root 6 Sep 19 08:25 usbdisk

The problem is not the permissions. It adds the mount point, but does
not mount the disk for some reason.....


--
/raymond

Thou shalt not meddle in the affairs of dragons
for thou art crunchy and go well with ketchup
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-21-2008, 11:28 AM
Hekaton Keires
 
Posts: n/a
Default Re: Automounting USB memory stick

Sorry I did lost the thread...

### first consideration ###
try setting the right nls support for your usb, my /etc/fstab contains

/dev/sda /mnt/usbstick vfat noauto,users,codepage=850 0 0

where codepage is set to be central european(850) - by the way that
problem shouldn't exist if you're ABLE to mount the usbstick by

mount /mnt/usbstick

if you're not able to mount it so probably you will find something
useful in /var/log/everything/current, where maybe it is set that right
nls or codepage cannot be found or something else

### second consideration ###
you could add a line in /etc/udev/udev.conf regarding log such as

udev_log="no"

or maybe more explicative

udev_log="debug"

and take a look at /var/log/everything/current

### third consideration ###
regarding sleep command the syntax should be:

>>BUS="scsi", KERNEL="sda", ACTION="add", PROGRAM="sleep 3; /sbin/mount /mnt/usbstick"


or maybe it would be better create a script file and then call it with
PROGRAM handler

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-21-2008, 11:29 AM
Ben Measures
 
Posts: n/a
Default Re: Automounting USB memory stick

Raymond Baastad wrote:
> Ben Measures wrote:
>> Hekaton Keires wrote:
>>
>>> Just a supposition, wouldn't it be enough using just udev?
>>>
>>> [...]
>>>
>>> BUS="scsi", KERNEL="sda", ACTION="add", PROGRAM="/sbin/mount
>>> /mnt/usbstick"

>>
>> Theoretically yes, though I suspect an immediate mount on plugin will
>> fail because USB sticks usually need time to settle. That said, if you
>> add a few seconds sleep I wouldn't expect any problems there.

>
> And the syntax would be?


> BUS="scsi", KERNEL="sda", ACTION="add", PROGRAM="/sbin/mount_my_usb_stick_in_10s.sh"


Lol.

--
Ben M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:25 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com