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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值