How to mount CD-ROM drive in Linux

In order to use CD-ROM/DVD drive in Linux, you first need to mount it. I will describe below how to mount CD-ROM/DVD drive in Linux.

The first step is to identify the device name of your CD-ROM or DVD drive. To do so, you can use dmesg output which indicates the device name for your CD-ROM or DVD drive.

$ sudo dmesg | grep -i 'cdrom|dvd|cd/rw|writer'
hdd: PIONEER DVD-RW DVR-106D, ATAPI CD/DVD-ROM drive

In the above example, the device name is /dev/hdd. Verify that /dev/hdd exists.

Now go ahead and mount the identified device using mount command.

$ sudo mount /dev/hdd /media/cdrom

I assume that the mount point /media/cdrom already exists. Note that if the drive is empty or the media format of an inserted CD is not supported, the mount command will fail with the error message: "mount: No medium found".

While in the above example I use the root permission to mount a CD-ROM drive, you can actually allow non-root users to mount a CD-ROM drive, by editing /etc/fstab:

$ sudo vi /etc/fstab
/dev/hdd     /media/cdrom   iso9660 ro,user,noauto  0       0 

In the above, adding the "user" option in the fstab entry for /dev/hdd will allow normal users to mount/unmount the corresponding device.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Leave a comment

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

Current day month ye@r *