[wplug] USB drives and dev questions
Gentgeen
gentgeen at linuxmail.org
Sat Dec 3 16:29:44 EST 2005
This sounds perfect... but I don't have udev -- I am using hotplug.
I was going to do what you said, and look at the man/docs for udev,
and found that I don't have it. Then doing an
'aptitude -s install udev'
showed me that it would want to uninstall hotplug. apparently the
two do not work nicely together? Anyway, not wanting to mess
with the current set-up, I thought I would come back to the group
first....
Another way to do this, but with hotplug? During some reseach I see
that hotplug does allow some rules, but it seemed to me only as part
of the "coldbooting" (i.e. device plugged in when turning computer
on)
On Sat, 3 Dec 2005 14:07:28 -0500
Eric Cooper <ecc at cmu.edu> wrote:
> On Sat, Dec 03, 2005 at 12:58:03PM -0500, Gentgeen wrote:
> > Currently, I have a Debian Testing box with 2 USB ports. One has a
> > printer, and the other I swap between my media card reader (SanDisk
5 in
> > 1) and my thumbdrive. Right now, no matter which one I plug in, it
> > always maps to /dev/sda1
> >
> > I am wondering if there is a way to get one to map to /dev/sda and
the
> > other to /dev/sdb, no matter when they are plugged in.
>
> Create your own rules in /etc/udev/rules.d/local.rules, so you can
> cause entries like /dev/cardreader and /dev/thumbdrive to be created
> when the devices are plugged in. For example, I use:
>
> BUS="scsi", SYSFS{model}="iPod", KERNEL="sd[a-z]2", SYMLINK="ipod"
>
> to get a /dev/ipod node, and
>
> # Flash drives
>
> BUS="scsi", SYSFS{vendor}="DATACE", KERNEL="sd[a-z]1",
SYMLINK="flash"
> BUS="scsi", SYSFS{vendor}="Kingston", KERNEL="sd[a-z]1",
SYMLINK="flash"
> BUS="scsi", SYSFS{vendor}="LEXAR", KERNEL="sd[a-z]1",
SYMLINK="flash"
> BUS="scsi", SYSFS{vendor}="SanDisk ", KERNEL="sd[a-z]1",
SYMLINK="flash"
> BUS="scsi", SYSFS{vendor}="SMSC", KERNEL="sd[a-z]1",
SYMLINK="flash"
>
> to get /dev/flash for a variety of thumb drives. (This won't work if
> you want to use more than one thumb drive at a time, but you can get
> fancier and add sequence numbers etc.)
>
> See the man pages for udev, and
/usr/share/doc/udev/writing_udev_rules/.
>
> --
> Eric Cooper e c c @ c m u . e d u
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
--
*****************************************************************
Associate yourself with men of good quality if you esteem
your own reputation; for 'tis better to be alone then in bad
company. - George Washington, Rules of Civility
More information about the wplug
mailing list