Linux Know-How provides a collection of introductory texts on often needed Linux skills. |
Home Newbie Guide Administrator FAQ Accessing my drives How can I access my CDROM? | ||
See also: Writing CD-R/Ws, Device Files | ||
Search the VIAS Library | Index | ||
How can I access my CDROM?Mount it. The mounting adds all the directories and files from your CD to your Linux directory tree so you can easily access them without the drive letter. As root, you can mount the CDROM with a command like this: mount -t auto /dev/cdrom /mnt/cdrom If this works, the contents of your CD appears in the directory /mnt/cdrom Chances are this command will not work for you right away--you may have to customize it. Here is how it works.
mkdir /mnt/cdrom If the mounting command fails, maybe the device /dev/cdrom does not exist on your system? Try ls -l /dev/cdrom /dev/cdrom is just a convenient symbolic link to a real "device" that is mapped onto your hardware. On an IDE system, chances are your real cdrom is on /dev/hdb. Therefore, try /dev/hdb instead of /dev/cdrom in the mount command above: mount -t auto /dev/hdb /mnt/cdrom If this fails, you can try /dev/hdc or /dev/hdd, if your CD is an IDE CDROM on the second IDE interface. If none of them is your CDROM, maybe you don't have IDE but a SCSI CDROM? Then try /dev/sda, /dev/sr0, etc.
A short listing of possible drives could include:
It is a good idea to have a device /dev/cdrom anyway because some programs assume that it exists. If it does not exist on your system, you may create it as a symbolic link using, for example: ln -s /dev/hdb /dev/cdrom if your cdrom is the /dev/hdb drive. If you cannot mount because "the device is already mounted or directory busy", perhaps the mountpoint /mnt/cdrom is your current directory. You have to change the directory to somewhere else in order to be able to mount to it; for example change the current directory to the root directory by issuing this command: cd / To unmount a mounted CD, exit the directory /mnt/cdrom and type as root: umount /mnt/cdrom Your CDROM may refuse to eject the media if it is not unmounted. Also, you may have problems mounting the next CD if the previous one was not unmounted. If you cannot unmount because "the device is busy", perhaps /mnt/cdrom (or any subdirectory underneath) is your current directory? You need to change your current directory to somewhere else out of the mountpoint in order to unmount the device.
|
||
Home Newbie Guide Administrator FAQ Accessing my drives How can I access my CDROM? |