Server Administration & Management

How to Disable or Block CD/DVD ROM Linux

Below procedure to disable or block CD/DVD on Linux

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

# cd /lib/modules/$(uname -r)/kernel/drivers/cdrom

2) Now list directory.

# ls


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

# mv cdrom.ko cdrom.ko-ok

To Delete file execute below command

# rm -rf cdrom.ko

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

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

# modprobe -r sr_mod

September 24, 2011 Posted by | Tips & Tricks, Unix/Linux | , , | Leave a comment