Ok I've got a heartbeat but it's still not quite making sense to me.
So the first problem I had originally was in my initial post I didn't have commas separating the match and assignment keys. (DUR!! only took me 10 re-reads of several of the guides online before I noticed that LOL)
Second I was trying to use KERNEL and KERNELS from two different devices entries of the attribute-walk, narrowing it down to the KERNELS=="1-8" device has gotten me some actual rules processing finally.
So here's my /etc/udev/rules.d/10-local.rules:
Code:
# Boot Drive - PNY USB 2.0 Flash Disk connected on motherboard internal header
KERNELS=="1-8", SUBSYSTEMS=="usb", ATTR{serial}=="AA00000000002914", NAME:="sdz"
I know this is matching because I see it in my log:
Code:
Feb 1 17:52:56 iSCSI-SAN udevd[480]: NAME 'sdz' /etc/udev/rules.d/10-local.rules:4
Feb 1 17:52:56 iSCSI-SAN udevd[480]: MODE 0664 /lib/udev/rules.d/50-udev-default.rules:55
Feb 1 17:52:56 iSCSI-SAN udevd[480]: IMPORT builtin 'usb_id' /lib/udev/rules.d/50-udev-default.rules:56
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_VENDOR=PNY_Technologies
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_VENDOR_ENC=PNY\x20Technologies
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_VENDOR_ID=154b
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_MODEL=USB_2.0_FD
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_MODEL_ENC=USB\x202.0\x20FD
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_MODEL_ID=007a
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_REVISION=1100
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_SERIAL=PNY_Technologies_USB_2.0_FD_AA00000000002914
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_SERIAL_SHORT=AA00000000002914
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_BUS=usb
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_USB_INTERFACES=:080650:
Feb 1 17:52:56 iSCSI-SAN udevd[480]: kernel-provided name 'bus/usb/001/003' and NAME= 'sdz' disagree, please use SYMLINK+= or change the kernel to provide the proper name
Feb 1 17:52:56 iSCSI-SAN udevd[480]: creating device node '/dev/sdz', devnum=189:2, mode=0664, uid=0, gid=0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: mknod '/dev/sdz' 189:2 020664
Feb 1 17:52:56 iSCSI-SAN udevd[480]: set permissions '/dev/sdz' 020664 uid=0 gid=0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: atomically replace '/dev/char/189:2'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: created db file '/run/udev/data/c189:2' for '/devices/pci0000:00/0000:00:0b.1/usb1/1-8'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: passed -1 bytes to netlink monitor 0x7fee552e3cd0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1556 processed with 0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1557 running
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552a1720 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: no db file to read /run/udev/data/+usb:1-8:1.0: No such file or directory
Feb 1 17:52:56 iSCSI-SAN udevd[480]: passed -1 bytes to netlink monitor 0x7fee552e3cd0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1557 processed with 0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1558 running
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552a31a0 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: no db file to read /run/udev/data/+scsi:host0: No such file or directory
Feb 1 17:52:56 iSCSI-SAN udevd[480]: passed -1 bytes to netlink monitor 0x7fee552e3cd0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1558 processed with 0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1559 running
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552a12d0 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/scsi_host/host0'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: no db file to read /run/udev/data/+scsi_host:host0: No such file or directory
Feb 1 17:52:56 iSCSI-SAN udevd[480]: passed -1 bytes to netlink monitor 0x7fee552e3cd0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1559 processed with 0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1560 running
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552ae930 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: no db file to read /run/udev/data/+scsi:target0:0:0: No such file or directory
Feb 1 17:52:56 iSCSI-SAN udevd[480]: passed -1 bytes to netlink monitor 0x7fee552e3cd0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1560 processed with 0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1561 running
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552ae930 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0/0:0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: no db file to read /run/udev/data/+scsi:0:0:0:0: No such file or directory
Feb 1 17:52:56 iSCSI-SAN udevd[480]: passed -1 bytes to netlink monitor 0x7fee552e3cd0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1561 processed with 0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: seq 1562 running
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552ae930 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0/0:0:0:0/block/sdb'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552ae930 filled with db file data
Feb 1 17:52:56 iSCSI-SAN udevd[480]: removing watch on '/dev/sdb'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: GROUP 6 /lib/udev/rules.d/50-udev-default.rules:67
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552a2430 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0/0:0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552a29f0 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552af030 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552af5a0 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552afb20 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552b0130 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552b0730 has devpath '/devices/pci0000:00/0000:00:0b.1'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: device 0x7fee552b0d10 has devpath '/devices/pci0000:00'
Feb 1 17:52:56 iSCSI-SAN udevd[480]: IMPORT builtin 'usb_id' /lib/udev/rules.d/60-persistent-storage.rules:39
Feb 1 17:52:56 iSCSI-SAN udevd[480]: /sys/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0: if_class 8 protocol 6
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_VENDOR=PNY
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_VENDOR_ENC=PNY\x20\x20\x20\x20\x20
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_VENDOR_ID=154b
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_MODEL=USB_2.0_FD
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_MODEL_ENC=USB\x202.0\x20FD\x20\x20\x20\x20\x20\x20
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_MODEL_ID=007a
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_REVISION=1100
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_SERIAL=PNY_USB_2.0_FD_AA00000000002914-0:0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_SERIAL_SHORT=AA00000000002914
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_TYPE=disk
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_INSTANCE=0:0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_BUS=usb
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_USB_INTERFACES=:080650:
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_USB_INTERFACE_NUM=00
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_USB_DRIVER=usb-storage
Feb 1 17:52:56 iSCSI-SAN udevd[480]: LINK 'disk/by-id/usb-PNY_USB_2.0_FD_AA00000000002914-0:0' /lib/udev/rules.d/60-persistent-storage.rules:44
Feb 1 17:52:56 iSCSI-SAN udevd[480]: IMPORT builtin 'path_id' /lib/udev/rules.d/60-persistent-storage.rules:61
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_PATH=pci-0000:00:0b.1-usb-0:8:1.0-scsi-0:0:0:0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: ID_PATH_TAG=pci-0000_00_0b_1-usb-0_8_1_0-scsi-0_0_0_0
Feb 1 17:52:56 iSCSI-SAN udevd[480]: LINK 'disk/by-path/pci-0000:00:0b.1-usb-0:8:1.0-scsi-0:0:0:0' /lib/udev/rules.d/60-persistent-storage.rules:62
Feb 1 17:52:56 iSCSI-SAN udevd[480]: IMPORT '/sbin/blkid -o udev -p /dev/sdb' /lib/udev/rules.d/60-persistent-storage.rules:74
Feb 1 17:52:56 iSCSI-SAN udevd[481]: seq 1566 running
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552a2670 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552a2670 filled with db file data
Feb 1 17:52:56 iSCSI-SAN udevd[481]: no node name set, will use kernel supplied name 'bsg/0:0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: creating device node '/dev/bsg/0:0:0:0', devnum=252:1, mode=0600, uid=0, gid=0
Feb 1 17:52:56 iSCSI-SAN udevd[481]: preserve file '/dev/bsg/0:0:0:0', because it has correct dev_t
Feb 1 17:52:56 iSCSI-SAN udevd[481]: preserve permissions /dev/bsg/0:0:0:0, 020600, uid=0, gid=0
Feb 1 17:52:56 iSCSI-SAN udevd[481]: preserve already existing symlink '/dev/char/252:1' to '../bsg/0:0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: created empty file '/run/udev/data/c252:1' for '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: passed -1 bytes to netlink monitor 0x7fee552e3e30
Feb 1 17:52:56 iSCSI-SAN udevd[481]: seq 1566 processed with 0
Feb 1 17:52:56 iSCSI-SAN udevd[481]: seq 1567 running
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552ae500 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: no db file to read /run/udev/data/+scsi_device:0:0:0:0: No such file or directory
Feb 1 17:52:56 iSCSI-SAN udevd[481]: passed -1 bytes to netlink monitor 0x7fee552e3e30
Feb 1 17:52:56 iSCSI-SAN udevd[481]: seq 1567 processed with 0
Feb 1 17:52:56 iSCSI-SAN udevd[594]: starting '/sbin/modprobe -bv input:b0003v0D3Dp0040e0100-e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw'
Feb 1 17:52:56 iSCSI-SAN udevd[479]: '/sbin/modprobe -bv input:b0003v0D3Dp0040e0100-e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw'(err) 'WARNING: Not loading blacklisted module evbug'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: seq 1568 running
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552a2880 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: no db file to read /run/udev/data/+scsi_disk:0:0:0:0: No such file or directory
Feb 1 17:52:56 iSCSI-SAN udevd[481]: passed -1 bytes to netlink monitor 0x7fee552e3e30
Feb 1 17:52:56 iSCSI-SAN udevd[481]: seq 1568 processed with 0
Feb 1 17:52:56 iSCSI-SAN udevd[481]: seq 1569 running
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552a2900 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg1'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552a2900 filled with db file data
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552aebc0 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0/0:0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552a2de0 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552a3570 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552a37c0 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552a2340 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1/1-8'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552af9b0 has devpath '/devices/pci0000:00/0000:00:0b.1/usb1'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552aff90 has devpath '/devices/pci0000:00/0000:00:0b.1'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: device 0x7fee552b0560 has devpath '/devices/pci0000:00'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: GROUP 6 /lib/udev/rules.d/50-udev-default.rules:85
Feb 1 17:52:56 iSCSI-SAN udevd[481]: no node name set, will use kernel supplied name 'sg1'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: creating device node '/dev/sg1', devnum=21:1, mode=0660, uid=0, gid=6
Feb 1 17:52:56 iSCSI-SAN udevd[481]: preserve file '/dev/sg1', because it has correct dev_t
Feb 1 17:52:56 iSCSI-SAN udevd[481]: set permissions /dev/sg1, 020660, uid=0, gid=6
Feb 1 17:52:56 iSCSI-SAN udevd[481]: preserve already existing symlink '/dev/char/21:1' to '../sg1'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: created empty file '/run/udev/data/c21:1' for '/devices/pci0000:00/0000:00:0b.1/usb1/1-8/1-8:1.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg1'
Feb 1 17:52:56 iSCSI-SAN udevd[481]: passed -1 bytes to netlink monitor 0x7fee552e3e30
Feb 1 17:52:56 iSCSI-SAN udevd[481]: seq 1569 processed with 0
But I think the problem is I'm still trying to do this once the root has mounted.
So I have new questions to look into:
1. What is the deal with /etc/udev/rules.d/10-local.rules and /lib/udev/rules.d/50-udev-default.rules processing at the same time?
2. How do I manipulate the /run/udev/rules.d files so that I can do this before root is mounted? (is this the right track, I'm clueless on tmpfs/booting)
IMG_20140201_130722_680~2.jpg
(it seems like if I could manipulate the udevd workers before this point then I'd get the results I want)
Sorry for the blurry picture above, my cameraphone sucks and I'm hypertensive so I shake a lot, here's what it says:
Code:
udevadm[314]: selinux=0
*unreadable*ir '/run/udev'
*unreadable*14]: runtime dir '/run/udev'
calling: control
udevadm[314]: calling: control
udevd[00]: udevd message (EXIT) received (at least I think it's 00 I forget, might have been 80, might have been cheesypoofs for all I can tell)
udevd[00]: worker [216] exit
udevd[00]: worker [216] cleaned up
udevd[00]: worker [217] exit
udevd[00]: worker [217] cleaned up
done.
[ 0.382998] init: ureadahead mail process (325) terminated with status 5
[ 0.642195] Adding 2899852k swap on /dev/sdb5. Priority:-1 extents:1 across: 2899852k
[ 9.379433] EXT4-fs (sdb1): re-mounted. .....
3. Why does the USB stick keep changing host/targets when it's not moving around on the USB connectors? (It jumps from 8:0:0:0 to 6:0:0:0 to 3:0:0:0 and I don't see why when it's always on usb1 1-8 ('/devices/pci0000:00/0000:00:0b.1/usb1/1-8') does anyone know what the deal with that is? It's literally taped to my case inside and I haven't changed the mobo header since I put it there weeks ago.
Bookmarks