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@ask4it]$ su -
2) Go to Directory Where your kernel drivers stored. Follow exact command.
[root@ask4it]# cd /lib/modules/$(uname -r)/kernel/drivers/cdrom
3) Now list directory.
[root@ask4it cdrom]# ls
cdrom.ko
4) Now rename or delete cdrom.ko file with following command.
[root@ask4it cdrom]# mv cdrom.ko cdrom.ko-ok
To Delete file execute below command
[root@ask4it 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…….
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.












[...] = 'none'; document.getElementById('singlemouse').style.display = ''; } Hotswap HddDisable (Block) CD/DVD ROM Linux ( RHEL ) var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-17203332-1']); _gaq.push(['_trackPageview']); [...]
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.
[...] http://blog.ask4itsolutions.com/2010/05/07/disable-block-cddvd-rom-linux-rhel/ June 23, 2010 5:35 am mkudlacek But this will disable access also for root, doesn’t it? June 23, 2010 7:38 am nitins Yes root also, but root can easily enable it by moving back.This may not be an ideal solution, but it is okay in my case. June 23, 2010 8:48 am unixbhaskar This is an worst possible solution(above solution).I think people need to look into their /etc/fstab file for that kind of manipulation.If they take out “nouser” option from the cdrom/dvd line in /etc/fstab file then the desired result can be achieved .Moving out and in modules like that is a bad very bad option. June 24, 2010 10:56 am nitins Yes, agree. [...]
Hi ,
Really helpful for me.
Thanks very much.
Nice
It’s always pleasure to read your content, will back here soon
I like that you
think. Thank you for share very
Thank you for Posting & I got to read nice information on your site.
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!
[...] This post was mentioned on Twitter by VGLUG. VGLUG said: Block CD CROM in RHEL 5 :- http://blog.ask4itsolutions.com/2010/05/07/disable-block-cddvd-rom-linux-rhel/ [...]
Very Good Blog! I also like your smooth and clean design.