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.
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.
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:
/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
You can have daily Linux tutorials and FAQs delivered to your email inbox. Simply enter your email address below to subscribe to our mailing list. You will receive hands-on guides and carefully written tutorials related to Linux, everything for free.