udev doesn't create symlink to device when using a custom rule

6,353

You can do something like this:

udevadm info -a -n /dev/sdf

to see the attributes as udev does; that greatly helps troubleshooting issues like this. In particular, on a random USB drive, I notice that idVendor and idProduct should not have the 0x prefix. So you should try:

… ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="61b6", …
Share:
6,353

Related videos on Youtube

sitilge
Author by

sitilge

Updated on September 18, 2022

Comments

  • sitilge
    sitilge almost 2 years

    I have created the following foo.rule

    KERNEL=="sd*", ATTRS{serial}=="D93E7DF61B000174", ATTRS{idVendor}=="0x04e8", ATTRS{idProduct}=="0x61b6", SYMLINK+="foo"
    

    The respective serial, idVendor and idProduct is the respective values provided by lsusb (with modifiers). Afterwards, I triggered the rules using udevadm trigger. There should be the respective device file /dev/foo, however, no such file exists.

    • weiclin
      weiclin almost 8 years
      could you try with: SUBSYSTEM=="tty", ATTRS{serial}=="D93E7DF61B000174", ATTRS{idVendor}=="0x04e8", ATTRS{idProduct}=="0x61b6", SYMLINK+="foo" also, could you add the complete udevadm trigger command you used? Also, did you try rebooting and simply plugging in the device?
    • sitilge
      sitilge almost 8 years
      @madeddie still not working. The command udevadm trigger is plain, without any modifiers.
    • weiclin
      weiclin almost 8 years
      i have no more ideas