[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Udev and storage devices



On Wed, 28 Dec 2005 19:52:39 +0000
"L.V.Gandhi" <lvgandhi@gmail.com> wrote:

> On 12/28/05, Jacob S <stormspotter@6texans.net> wrote:
> > Howdy list,
> >
> > I just installed udev on a Debian Sarge box. Everything's working
> > great, but now I'm trying to write some rules for a digital camera
> > and a usb memory stick. I created a file named 010_local.rules
> > in /etc/udev/rules.d that contains the following:
> >
> > # Olympus D390 digital camera
> > BUS="scsi", SYSFS{vendor}="OLYMPUS ", KERNEL="sd*", NAME="%k",
> > SYMLINK="camera%n"
> >
> > # PNY Attache usb key
> > BUS="usb", SYSFS{product}="USB Flash Memory", KERNEL="sd*",
> > NAME="%k", SYMLINK="usb_key%n"
> 
> > # USB key
> 
> >     SYSFS{model}="USB Flash Memory"
> for usb key line error is you have put SYSFS{product} instead of 
> SYSFS{model}. try for this first. if not remove usb device module
> which makes ub* devices and use the stick as scsi stick. As written in
> kernel doc ub* not good. My rules for two usb keys and external hdd is
> as follows and works.
> lvgdell600m:/etc/udev/rules.d# cat local.rules
> BUS="scsi", SYSFS{model}="TS128MJF2A", KERNEL="sd?1", NAME="%k",
> SYMLINK="flash" BUS="scsi", SYSFS{model}="Cruzer Micro",
> KERNEL="sd?1", NAME="%k", SYMLINK="flash"
> BUS="scsi", SYSFS{model}="External Drive", KERNEL="sd?1", NAME="%k",
> SYMLINK="ehd"

It took a lot of experimentation and playing around, but I finally got
a working combination. My /etc/udev/rules.d/010_local.rules file now
looks like this:

BUS="scsi", SYSFS{vendor}="OLYMPUS ", KERNEL="sd*", NAME="camera%n",
SYMLINK="%k", OWNER="user", GROUP="mygroup"

BUS="scsi", SYSFS{model}="USB Flash Memory", KERNEL="sd*",
NAME="usbkey%n", SYMLINK="%k", OWNER="user", GROUP="mygroup"

Thanks to all for the suggestions and tips.

Jacob



Reply to: