There are a couple possible issues that could cause your Linux CD or DVDROM to not be recognized.
- Hardware failure: your optical drive has failed.
- Incorrect fstab entry: your fstab was not configured properly during your Linux install or has been modified incorrectly at some point causing your Linux CD or DVDROM drive to not be available.
If your CD or DVDROM drive has failed the fix is a simple one ... replace it. Before we take such extreme measures let's first rule out software problems. To troubleshoot the problem of your Linux CD or DVDROM not being recognized we are going to use a handy little command line tool, dmesg, to find out what the 'device' name of your optical drive is.
dmesg | grep -i cd | grep -i rom
The output of this command should return a list of the optical drive(s) on your system. The information we are looking for in the output of this command is the device name of your optical drive. For example, hdc, hdd, sr0, sr1, etc. In this example we will assume the output returned hdc as your CDROM.
Once we have this information we will want to make sure it matches the information in your fstab file.
sudo nano /etc/fstab
The line we are looking for in the fstab file will be similar to this:
/dev/hdc /media/cdrom0 udf,iso9960 user,noauto 0 0
As you can see in the above example, /dev/hdc is listed as our optical drive, so the fstab entry appears to be correct. Should the fstab line for your optical line be different than the information returned with the dmesg command you will have to adjust it accordingly. Be sure to backup your fstab file before making any changes.
sudo cp /etc/fstab /etc/fstab.bak
An fstab file being improperly configured is the most common cause that I've seen of a CD or DVDROM drive not being recognized in Linux. With today's distributions this error is rare, such a solid job of hardware detection is done. In most cases if the entry in your fstab file is incorrect causing your CD or DVDROM drive to not be recognized it is because an application (rare) or a user has made incorrect changes to it. Troubleshooting your Linux CD or DVDROM not being recognized is that easy! Until next time, keep it Open Source!