1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Discuss in my forum

Introduction to Linux

By Machtelt Garrels

7.5.5. Installing extra packages from the installation CDs Mounting a CD

This is basically done in the same way as installing packages manually, except that you have to append the file system of the CD to your machine's file system to make it accessible. On most systems, this will be done automatically upon insertion of a CD in the drive because the automount daemon is started up at boot time. If your CD is not made available automatically, issue the mount command in a terminal window. Depending on your actual system configuration, a line similar to this one will usually do the trick:

mount /dev/cdrom /mnt/cdrom

On some systems, only root can mount removable media; this depends on the configuration.

For automation purposes, the CD drive usually has an entry in /etc/fstab , which lists the file systems and their mount points, that make up your file system tree. This is such a line:


[david@jupiter ~] grep cdrom /etc/fstab
 /dev/cdrom	/mnt/cdrom	iso9660		noauto,owner,ro 0 0

This indicates that the system will understand the command mount /mnt/cdrom . The noauto option means that on this system, CDs are not mounted at boot time.

You may even try to right click on the CD icon on your desktop to mount the CD if your file manager doesn't do it for you. You can check whether it worked issuing the mount command with no arguments:


[david@jupiter ~] mount | grep cdrom
 /dev/cdrom on /mnt/cdrom type iso9660 (ro,nosuid,nodev) Using the CD

After mounting the CD, you can change directories, usually to the mount point /mnt/cdrom , where you can access the content of the CD-ROM. Use the same commands for dealing with files and directories as you would use for files on the hard disk. Ejecting the CD

In order to get the CD out of the drive after you've finished using it, the file system on the CD should be unused. Even being in one of the subdirectories of the mount point, /mnt/cdrom in our example, will be considered as "using the file system" , so you should get out of there. Do this for instance by typing cd with no arguments, which will put you back in your home directory. After that, you can either use the command

umount /mnt/cdrom


eject cdrom

       Blocked drives

NEVER force the drive. The trick with the paperclip is a bad idea, because this will eventually expunge the CD, but your system will think the CD is still there because normal procedures were not followed. Chances are likely that you will have to reboot to get the system back in a consistent state.

If you keep getting "device busy" messages, check first that all shell sessions have left the CD file system and that no graphical applications are using it anymore. When in doubt, use the lsof tool to trace down the process(es) still using the CD resource.

   Prev    Home    Next
   Region specific settings    Up    Summary

* License

* Introduction to Linux Index

  1. About.com
  2. Technology
  3. Linux

©2014 About.com. All rights reserved.