Http://www.tldp.org/HOWTO/CDROM-HOWTO/x289.html#AEN980
4.5. mounting, unmounting, and ejecting Devices
To mount a CD-ROM, insert a disc in the drive, and runMountCommandRoot(This assumes you created a symbolic link to your device file as recommended above and that an empty directory/Mnt/CDROMExists ):
# Mount-T iso9660-r/dev/CDROM/mnt/CDROM |
The CD can now be accessed under the Directory/Mnt/CDROM.
There are other options to the mount command that you may wish to use; seeMount (8)Man page for details.
You can add an entry/Etc/fstabTo automatically mount a CD-ROM when Linux boots or to specify parameters to use when it is mounted; seeFstab (5)Man page.
Note that to play audio CDs you shoshouldNotTry to mount them.
To unmount A CD-ROM, useUmountCommandRoot:
The disc can only be unmounted if no processes are currently accessing the drive (including having their default directory set to the mounted drive ). you can then eject the disc. most drives have an eject button; there is also a standalone eject program that allows ejecting CD-ROMs under software control.
Note that you shoshould not eject a disc while it is mounted (this may or may not be possible depending on the type of drive ). some CD-ROM drivers can automate eject a CD-ROM when it is unmounted and insert the CD tray when a disc is mounted (you can turn this feature off when compiling the kernel or by using a software command).
Its possible that after playing an audio CD you may not be able to mount a CD-ROM. you need to send a CD audio "stop" command (using a CD player program) before trying the mount. this problem only appears to occur with the sbpcd driver.
recent kernels support a kernel-based automounter which provides transparent mounting of removable media including CD-ROM. You can find the tools needed to use it at ftp://ftp.kernel.org/pub/linux/daemons/autofs/.