Geek Times - Mounting the CD-ROM device

Welcome to Geek Times!
spacer
Mounting the CD-ROM device
home
search
archive
about

Tux

Linux

Contents

System Administration

Hardware

Networking

Security

Software

Hardware

U. I.

3rd Parties

Mac-on-Linux

Troubleshooting


 
.
1. Link /dev/cdrom to the block device driver which corresponds to your CD-ROM drive.
# dmesg | grep ROM
media bay 0 contains a CD-ROM drive
hdc: MATSHITADVD-ROM SR-8171, ATAPI CDROM drive
hdc: ATAPI 20X DVD-ROM drive, 512kB Cache
Uniform CDROM driver Revision: 2.56
#
# ln -s /dev/hdc /dev/cdrom

2. Tell your /etc/fstab about the CD-ROM.

The file system table, or fstab, keeps a list of devices and their respective mount points. To let Linux know about the CD I've added the following line. What does it say? Mount the device /dev/cdrom at /cd, using the ISO 9660 file system type. user allows anyone to mount the drive; ro means read-only; noauto means to wait until a user does the mount, as opposed to automatic mounting upon startup.

/dev/cdrom      /cd      iso9660         noauto,ro,user       0 0

3. Have your .cshrc file remember how to do the mount command.

I always forget how I do things, so I use my C shell run commands (.cshrc) file to remember them for me. Here's what I added so I could just type "cdr" and have the CD-ROM mounted on Linux's file system at /cd.

set     CD-ROM_MOUNT_POINT  = /cd
set     CD-ROM_DEVICE       = /dev/hdc
alias   cdr     mount -r ${CD-ROM_DEVICE} ${CD-ROM_MOUNT_POINT}
 

Geek Times copyright information
This page is copyrighted 1993-2006 by Geek Times, all rights reserved. Questions and comments? Send email to the Geek Times Webmaster. Web space graciously donated by rawbandwidth.com, an Internet Service Provider in San Francisco. FOO

email