Disable (Block) CD/DVD ROM Linux ( RHEL )

Hello Friends,

Today i am sharing one howto about how to block or disable CD/DVD ROM in Linux.

Below procedure is working fine on RHEL ( Red Hat Enterprise Linux 5).

1) You need to be root user to perform steps.

[blog@tejasbarot]$  su –

2) Go to Directory Where your kernel drivers stored. Follow exact command.

[root@tejasbarot]# cd /lib/modules/$(uname -r)/kernel/drivers/cdrom

3) Now list directory.

[root@tejasbarot cdrom]# ls

4) Now rename or delete cdrom.ko file with following command.

[root@tejasbarot cdrom]# mv cdrom.ko cdrom.ko-ok

To Delete file execute below command

[root@tejasbarot cdrom]# rm -rf cdrom.ko

5) Now reboot your computer and Insert CD or DVD into Drive. It will not detect.

6) If you dont want to reboot your computer then just execute below command.

modprobe -r sr_mod

Hope this helps you

Let’s Have some feedback

Enjoy Linux 🙂 Enjoy Blocking…….

11 thoughts on “Disable (Block) CD/DVD ROM Linux ( RHEL )”

  1. Yes, You are right, both way can work, This is not a bad option. Not every end users knows about modules and all that. and in some premises we need to block from root also. That’s why this is howto is published. And Administrations can easily revert it back.

  2. Terrific work! This is the type of information that should be shared around the web. Shame on the search engines for not positioning this post higher!

Leave a Reply

Your email address will not be published. Required fields are marked *