Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to disable udev from generating /dev/sr0 device (my cdrom) and Im trying to write udev rules.

I added a file 10-cd-trial.rules in /etc/udev/rules.d and /lib/udev/rules.d, the contents are:


and ran

udevadm control --reload-rules

/dev/sr0 hasnt been disable as yet. Am i missing something? Is it necessary I include additional rules for the device, or is my file name incorrect?

I use Ubuntu 12.10. Thanks in advance.

share|improve this question

udev has no option to stop a device node in /dev from being created. In fact, latest udev versions don't even do that anymore; /dev is nowadays a devtmpfs where everything is created by the kernel, and udev only changes file modes, adds symlinks, etc.

Besides, the UDISKS_IGNORE variable is for udisks2, not udev. udisks does not manage /dev contents, but is only an interface for unprivileged programs to mount disks and manage partitions.

If you want to stop users from accessing the CD drive through file managers, try setting ENV{UDISKS_SYSTEM}="1", ENV{UDISKS_AUTO}="0", ENV{UDISKS_SYSTEM_INTERNAL}="1", and ENV{UDISKS_AUTOMOUNT_HINT}="never" (the former two for udisks2, the latter two for udisks1).

share|improve this answer
I replaced UDISKS_IGNORE with OPTIONS=="ignore_device", but to no avail. So since, the kernel creates the node itself, my only option is to use the options u specified. – Vigneshwaren Dec 26 '13 at 6:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .