Re: udev woes



On Fri, 16 Mar 2007 01:08:01 GMT, Hactar <ebenZEROONE@xxxxxxxxxxx> wrote:
OK, I'm trying to modify /etc/udev/local.rules so udev puts USB devices
(flash drive, HD, FD, and a catch-all for "other device") in known
locations when I attach them. I found

http://reactivated.net/writing_udev_rules.html

My Fedora Core already assigns permanent names to devices (I am not
saying that other distros do not do it, only that I only know what
Fedora does). See this directory

ls -l /dev/disk/by-id

total 0
lrwxrwxrwx 1 root root 9 Mar 5 21:11 ata-IBM-DTLA-307060_YQDYQF6F654 -> ../../hdb
lrwxrwxrwx 1 root root 10 Mar 5 21:11 ata-IBM-DTLA-307060_YQDYQF6F654-part1 -> ../../hdb1
lrwxrwxrwx 1 root root 10 Mar 5 21:11 ata-IBM-DTLA-307060_YQDYQF6F654-part5 -> ../../hdb5
lrwxrwxrwx 1 root root 10 Mar 5 21:11 ata-IBM-DTLA-307060_YQDYQF6F654-part6 -> ../../hdb6
lrwxrwxrwx 1 root root 9 Mar 5 21:11 ata-WDC_WD1600JB-00EVA0_WD-WMAEK2487800 -> ../../hda
lrwxrwxrwx 1 root root 10 Mar 5 21:11 ata-WDC_WD1600JB-00EVA0_WD-WMAEK2487800-part1 -> ../../hda1
lrwxrwxrwx 1 root root 10 Mar 5 21:11 ata-WDC_WD1600JB-00EVA0_WD-WMAEK2487800-part2 -> ../../hda2
lrwxrwxrwx 1 root root 10 Mar 5 21:11 ata-WDC_WD1600JB-00EVA0_WD-WMAEK2487800-part3 -> ../../hda3
lrwxrwxrwx 1 root root 10 Mar 5 21:11 ata-WDC_WD1600JB-00EVA0_WD-WMAEK2487800-part4 -> ../../hda4
lrwxrwxrwx 1 root root 10 Mar 5 21:11 ata-WDC_WD1600JB-00EVA0_WD-WMAEK2487800-part5 -> ../../hda5
lrwxrwxrwx 1 root root 9 Mar 5 21:11 scsi-SATA_ST3300831AS_5NF1NZ6K -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 5 21:11 scsi-SATA_ST3300831AS_5NF1NZ6K-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 5 21:11 scsi-SATA_ST3300831AS_5NF1NZ6K-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 5 21:11 scsi-SATA_ST3300831AS_5NF1NZ6K-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Mar 5 21:11 scsi-SATA_ST3300831AS_5NF1NZ6K-part6 -> ../../sda6
lrwxrwxrwx 1 root root 10 Mar 5 21:11 scsi-SATA_ST3300831AS_5NF1NZ6K-part7 -> ../../sda7
lrwxrwxrwx 1 root root 10 Mar 5 21:11 scsi-SATA_ST3300831AS_5NF1NZ6K-part8 -> ../../sda8
lrwxrwxrwx 1 root root 9 Mar 10 13:11 usb-Generic_USB_CF_Reader_058F312D81B -> ../../sdc
lrwxrwxrwx 1 root root 9 Mar 10 13:11 usb-Generic_USB_MS_Reader_058F312D81B -> ../../sde
lrwxrwxrwx 1 root root 9 Mar 10 13:11 usb-Generic_USB_SD_Reader_058F312D81B -> ../../sdb
lrwxrwxrwx 1 root root 9 Mar 10 13:11 usb-Generic_USB_SM_Reader_058F312D81B -> ../../sdd
lrwxrwxrwx 1 root root 9 Mar 10 13:22 usb-LEXAR_JUMPDRIVE_K334491627050 -> ../../sdf
lrwxrwxrwx 1 root root 10 Mar 10 13:22 usb-LEXAR_JUMPDRIVE_K334491627050-part1 -> ../../sdf1
lrwxrwxrwx 1 root root 9 Mar 10 13:23 usb-USB_USB_2.0_Flash_13DFA16D -> ../../sdg
lrwxrwxrwx 1 root root 10 Mar 10 13:23 usb-USB_USB_2.0_Flash_13DFA16D-part1 -> ../../sdg1

i

The output of "udevinfo -a -p /sys/block/sde" (to pick a device out of
thin air -- it's my floppy drive) has several sections, and I couldn't
find a good reason to choose one instead of another -- for all I know,
one device may have _all_ those IDs; none are the same form, so they
won't overlap -- so I made a rule from each. The rules are:

SYSFS{model}=="USB FDD", SYMLINK+=usb-floppy
ID=="target15:0:0", SYMLINK+=usb-floppyIDt
ID=="host15", SYMLINK+=usb-floppyIDh
ID=="1-1:1.0", SYMLINK+=usb-floppyID1
ID=="1-1", SYMLINK+=usb-floppyID1short
ID=="usb1", SYMLINK+=usb-floppyIDu
ID=="0000:00:09.0", SYMLINK+=usb-floppyID0
ID=="pci0000:00", SYMLINK+=usb-floppyIDp

The first one is what I had first. The thing is, none of these _do_
anything. I connect the drive, and the system creates "/dev/usbdev1.14"
(the number is going up each time I connect it), and then a few seconds
later, "/dev/sde".

I tried just modifying local.rules, restarting udev, moving
"local.rules" to "00local.rules" AND restarting udev, still nothing.

There are only those rules, blank lines, and comments in local.rules.
There was a stray character, but I fixed that.

So what do I need to do to make udev work?

.