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", …
Related videos on Youtube
Author by
sitilge
Updated on September 18, 2022Comments
-
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
andidProduct
is the respective values provided bylsusb
(with modifiers). Afterwards, I triggered the rules usingudevadm trigger
. There should be the respective device file/dev/foo
, however, no such file exists.-
weiclin almost 8 yearscould you try with:
SUBSYSTEM=="tty", ATTRS{serial}=="D93E7DF61B000174", ATTRS{idVendor}=="0x04e8", ATTRS{idProduct}=="0x61b6", SYMLINK+="foo"
also, could you add the completeudevadm trigger
command you used? Also, did you try rebooting and simply plugging in the device? -
sitilge almost 8 years@madeddie still not working. The command
udevadm trigger
is plain, without any modifiers. -
weiclin almost 8 yearsi have no more ideas
-