[Dave Thayer] Re: devfs -> udev, user mounting etc
BUS="usb", SYSFS{product}="JUMPDRIVE", NAME="%k", symlink="jumpdrive"
Some progress :-)
1) remove all devfs/compat links from rules.d and replace with a udev
link in rules (so - from devfs style naming to udev style naming)
:-)
2) Create the following to local.rules:
BUS="scsi", SYSFS{model}="Media Inc. SM/xD", NAME{all_partitions}="%k", symlink="LexarSM"
BUS="scsi", SYSFS{model}="Media Inc. CF", NAME{all_partitions}="%k", symlink="LexarCF"
BUS="scsi", SYSFS{model}="Media Inc. SD/MS", NAME{all_partitions}="%k", symlink="LexarSD"
Now - three new symlinks are created, LexarSM, LexarCF and LexarSD -
all pointing to /dev/sg? (in this case sg6, sg7 and sg8).
In addition - /dev/sda[0-15], /dev/sdb[0-15], /dev/sdc[0-15] are
created.
However - I need the Lexar* links to go to /dev/sd?1 where ? is the sd
device for each in turn - in the above example
LexarSM -> /dev/sda1
LexarCF -> /dev/sdb1
LexarSD -> /dev/sdc1
I also have another card reader (Unomas). That has empty vendor and
model strings (note - this example from while I still had devfs style
naming). How to match this one with SYSFS{???} ?
Sep 13 16:17:43 chris kernel: usb 1-2.3: new full speed USB device using address 4
Sep 13 16:17:44 chris kernel: Initializing USB Mass Storage driver...
Sep 13 16:17:44 chris kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Sep 13 16:17:44 chris kernel: Vendor: Model: Rev:
Sep 13 16:17:44 chris kernel: Type: Direct-Access ANSI SCSI revision: 02
Sep 13 16:17:44 chris kernel: Attached scsi removable disk sdb at scsi2, channel 0, id 0, lun 0
Sep 13 16:17:44 chris kernel: Attached scsi generic sg8 at scsi2, channel 0, id 0, lun 0, type 0
Sep 13 16:17:44 chris kernel: Vendor: Model: Rev:
Sep 13 16:17:44 chris kernel: Type: Direct-Access ANSI SCSI revision: 02
Sep 13 16:17:44 chris kernel: Attached scsi removable disk sdc at scsi2, channel 0, id 0, lun 1
Sep 13 16:17:44 chris kernel: Attached scsi generic sg9 at scsi2, channel 0, id 0, lun 1, type 0
Sep 13 16:17:44 chris kernel: Vendor: Model: Rev:
Sep 13 16:17:44 chris kernel: Type: Direct-Access ANSI SCSI revision: 02
Sep 13 16:17:45 chris kernel: Attached scsi removable disk sdd at scsi2, channel 0, id 0, lun 2
Sep 13 16:17:45 chris kernel: Attached scsi generic sg10 at scsi2, channel 0, id 0, lun 2, type 0
Sep 13 16:17:45 chris kernel: Vendor: Model: Rev:
Sep 13 16:17:45 chris kernel: Type: Direct-Access ANSI SCSI revision: 02
Sep 13 16:17:45 chris kernel: Attached scsi removable disk sde at scsi2, channel 0, id 0, lun 3
Sep 13 16:17:45 chris kernel: Attached scsi generic sg11 at scsi2, channel 0, id 0, lun 3, type 0
Sep 13 16:17:45 chris usb.agent[6182]: usb-storage: loaded successfully
Sep 13 16:17:45 chris kernel: usbcore: registered new driver usb-storage
Sep 13 16:17:45 chris kernel: USB Mass Storage support registered.
--
Chris
Reply to: