Linux Mount CD-ROM

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 run the mount command as root (this assumes you created a symbolic link to your device file as recommended above and that an empty directory /mnt/cdrom exists):

# 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; see the mount(8) man page for details.

You can add an entry to /etc/fstab to automatically mount a CD-ROM when Linux boots or to specify parameters to use when it is mounted; see the fstab(5) man page.

Note that to play audio CDs you should not try to mount them.

To unmount a CD-ROM, use the umount command as root:

# umount /mnt/cdrom

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 should 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 automatically 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/.

你可能感兴趣的:(Linux,Base)