Accessing the CD-ROM

Assuming that you'll shortly want access to the CD-ROM drive, now's the time to discuss how to do that.


For the longest time, accessing a CD-ROM under Linux meant explicitly mounting the device, at a specified mount point, to get at its contents. These days, however, many versions of Linux, including RedHat, have incorporated an automatic mount of inserted CDs, to save you all that trouble.

Frankly, I'd rather explain the manual way of doing this for the time being. If you want to automate this later, that's your choice. So, for the time being, if you're using RedHat, go into X and, under the RedHat menu, select "Preferences" -> "CD Properties", and turn off "Mount CD when inserted." Humor me.

To access a CD-ROM, you need to mount it at a given mount point, at which time its contents appear under the mount point directory name. Assuming that your CD-ROM drive is acccessible through the device file /dev/cdrom, you can mount, enter, access, and unmount the CD with some combination of the following:

# mount /dev/cdrom /mnt/cdrom       mount the device at /mnt/cdrom
# ls /mnt/cdrom                     inspect the CD contents
# cd /mnt/cdrom                     enter the directory if you want
# cd /                              eventually leave the directory
# umount /dev/cdrom                 unmount the device from its mount point
# eject                             software eject the CD

Some helpful hints regarding mounting and unmounting CD-ROMs (which will be covered in far more detail later in the documentation):

  1. You can't mount a CD at a mount point if it's already mounted at another mount point.

  2. You can only mount data CDs for the time being; audio CDs are a different issue and how to access them will be covered later.

  3. You can't unmount a CD from a mount point if it's currently "busy"; that is, there can be no user in that directory, no program running in that directory, no file manager displaying that directory, and so on.

  4. As long as the CD is not busy, you technically don't need to unmount it; you can just eject it, which will do an automatic unmount for you.

  5. And, yes, it's umount, not unmount. Deal with it.


At this point, you might want to take a few minutes and peruse the official install CDs, to familiarize yourself with their contents.