udev rule to rename /dev/sdx as /dev/sdr does not work :-( on OS 11.2
Hello
I'm trying to get my usb cardreader to apear as /dev/sdr instead of /dev/sdc on Opensuse 11.2 What I read about udev a rule like Code:
UBSYSTEM=="usb", ATTRS{idVendor}=="11b0", ATTRS{idProduct}=="6108", NAME="sdr", SYMLINK="cfreader",GROUP="storage" My device still appears as /dev/sdc and /dev/sdr and symlink /dev/cfreader are created BUT /dev/sdr has not same mayor/minor number as /dev/sdc and of course is not accessible. What is wrong? Any hints from the udev gurus? |
hi
since no-one else has replied as yet.....your rule makes no mention of what to do with sdc ok? I gather you have a sda and sdb? why not create an udev rule so accept sdc but the udev rule creates a symlink from it to /dev/cfreader and no need to mention /dev/sdr something like this assuming your ids are correct ------------------------copy between dashes----- ACTION!="add", GOTO="cfreader_End" SUBSYSTEMS=="usb", ACTION==”add”, ATTRS{idProduct}=="6108", GOTO="cfreader" LABEL="cfreader" RUN+="/bin/ln -s /dev/sdc /dev/cfreader" LABEL="cfreader_End" -------------------------------------- using root powers run Code:
udevadm control --reload-rules |
In case anybody wonders onto this thread, I think the OP was almost correct.
However, I think you need to add a + before the = in the SYMLINK command, and I don't think specifying the name is necessary as the device name sdr can change depending on what udev/the kernel want. You already identify the vendor and product. So you get something like this: Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="11b0", ATTRS{idProduct}=="6108", SYMLINK+="cfreader",GROUP="storage" |
All times are GMT -5. The time now is 08:24 PM. |