Can udev be told to hide a device?

Tom H tomh0665 at gmail.com
Sun Mar 14 00:48:50 UTC 2010


> This nonsense showed up in my /etc/udev/rules.d/70-persistent-cd.rules
> file when I plugged in my new usb hard drive.
>
> It is all windows nonsense, and I would just as soon pretend
> it doesn't exist at all and not have it cluttering my
> /dev/ directory and wot-not:
>
> # Virtual_CD_1110 (pci-0000:00:1d.7-usb-0:4:1.0-scsi-0:0:0:1)
> SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_SERIAL}=="WD_Virtual_CD_1110_574341563537373931333937-0:1", SYMLINK+="cdrom1", ENV{GENERATED}="1"

> Anyone know if it is possible to write some earlier
> udev rule for this thing that will simply make it vanish
> from existence?

1. You could use /etc/fstab
LABEL="WD_Virtual_CD" none udf rw,noauto 0 0
rather than udev; maybe...

2. If you have a Windows box into which you can plug the disk:
http://u3.com/support/default.aspx#CQ3

3. I am not sure whether this is packaged for Fedora:
http://sourceforge.net/projects/u3-tool/

4. udev possibility:
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*",
ENV{ID_SERIAL}=="WD_Virtual_CD*", OPTIONS+="ignore_device"


More information about the users mailing list