O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  



Accessing CDROM / DVDROM / WRITER
A tip on how to access the CD ROM / DVDROM DRIVE / WRITER in the command line, in case the usual mounting commands fail

Contributed by:
logic640
[04/12/06 | Discuss (0) | Link to this hack]

If you execute the command mount /mnt/cdrom or /mnt/cdwriter, you may get the error "Mount - Cannot find /mnt/cdrom in /etc/fstab or /etc/mtab"

This means that the mount points have not been mentioned to the O/S during boot up and the entries are not there in the /etc/fstab file.

So how does one access your drives then. Read below.

A Brief explanation on drive naming conventions in linux - /dev/hda - Primary Master /dev/hdb - Primary Slave /dev/hdc - Secondary Master /dev/hdd - Secondary Slave

First of all let us find out as to how your drive(s) are connected to the system. type eject /dev/hdb or /dev/hdc or /dev/hdd. One of these will definitely eject your drive. In my case I had two drives A DVD WRITER /dev/hdc and a DVD ROM /dev/hdd

1. Create the directories in /mnt such as cdrom, cdwriter, dvdrom or dvdwriter. In my example - mkdir /mnt/dvdwriter. mkdir/mnt/dvdrom 2. mounting the drives - mount /dev/hdc /mnt/dvdwriter mount /dev/hdd /mnt/dvdrom (Substitute appropriately according to your setup) 3. unmounting the drives - umount /mnt/dvdwriter or eject /mnt/dvdwriter ---------------------------------------------- Making these changes permanent 1. Edit /etc/fstab (You need to be ROOT) 2. Under the first section the label section - add /dev/hdc 3. In the second section - mount point - add /mnt/dvdwriter 4. In the third section - file system - add auto 5. In the fourth section - mount options - add defaults,noauto 6. In the last section - DUMP / FSCK add 0 0 7. reboot the system

Next time you need to use your Drives, insert a CD / DVD and execute mount /mnt/dvdwriter

See also: www.openminds.tk (For more tutorials, articles)


O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.