l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
November 4: Social gathering
Next Installfest:
TBD
Latest News:
Oct. 24: LUGOD election season has begun!
Page last updated:
2005 Sep 29 09:41

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] udev - any good howtos? experience?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] udev - any good howtos? experience?



On Tue, Sep 27, 2005 at 11:04:18AM -0700, Bill Kendrick wrote:
> I've got numerous USB-connected devices nowadays:
> 
>   * External hard drive enclosure
>   * Compact Flash memory card reader
>   * USB memory stick thumb pen flash drive key
>   * Sharp Zaurus cradle
>   * Digital Camera
>   * Stelladaptor (connect Atari joystick to PC)
> 
> The top 3 are USB mass storage devices.  Unfortunately, which "/dev/sdX" device
> they get appears to depend on how they're activated.  If I plug in the USB
> memory stick thing before turning on the HDD enclosure, it comes out as
> /dev/sda.  If I turn on the drive before plugging in the USB stick, it gets
> /dev/sdb, instead.
> 
> Briefly Googling around, I discovered something I hadn't heard of before,
> called "udev".  Apparently it allows devices to be assigned to specific
> locations (somewhere in '/udev') based on the device's name.
> (That way, icons on my desktop and/or mount points like /media/card0 and
> /media/keychain0, would always point to the right place.)
> 
> I installed it via 'aptitdue' but didn't have time to get it working,
> and had to reboot at some point.  I got a nice red warning message
> during boot that 'udev' isn't supported with the older 2.6.x kernel I'm
> using.
> 
> Oh well.  In the meantime, while I wait for Debian/etch to upgrade
> (or if I decide to build my own kernel :^) ), is there a good HOWTO on
> using udev that anyone can recommend?  I remember someone here (Jeff?)
> mentioning they use it.  Is it working nicely for you? :)

I use it -- it works great. Debian's default is to mount it over /dev,
so that it does kind of what devfs used to do. In addition to the default rules (which
create all of the usual device nodes) I have the following two
additional rules to name a couple of my devices:

KERNEL="sd?1",SYSFS{model}="ACEMAR          ",SYSFS{vendor}="IDIGAT L",SYMLINK="camera"
BUS="usb" SYSFS{product}="Palm Handheld*" KERNEL="ttyUSB*" SYMLINK="pilot" MODE="666" 

the second one I copied off the internet
the first one I wrote myself, taking advantage of udevinfo to tell me
some of the useful values.

To find information about the device that is currently connected to
/dev/hda1, do the following:

[bloom@little-cat-a ~]$ udevinfo -q path -n /dev/hda1 
/block/hda/hda1
[bloom@little-cat-a ~]$ udevinfo -a -p /block/hda/hda1 

Then you can take values from the output of udevinfo *from only one
level of the device chain* for the SYSFS{} attributes, and with
judicious use of KERNEL= you can choose which level of the device
chain to create the node or symlink for.

Note that jpilot doesn't take too kindly to the pilot symlink only
appearing when I hit the hotsync button, but it wouldn't take too
kindly to it even if the device node was always around. I resolved
this by switching to kpilot with korganizer and kaddressbook, which
are actually a whole lot nicer than jpilot.

--Ken Bloom

-- 
I usually have a GPG digital signature included as an attachment.
See http://www.gnupg.org/ for info about these digital signatures.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!