You are on page 1of 6

HowTo mount cdrom in linux

From Linux Config Wiki

Jump to: navigation, search

CD's and DVDs are usinf iso9660 filesytem. As any other Operating systems Linux is
also able to read data from standart iso9660 filesystem. Lets see how we can mount cd.

Contents
[hide]

• 1 Media
• 2 Detecting CD-ROM/DVD-ROM drive
• 3 Testing for iso9660 compatibility
• 4 Creating mount point
• 5 Mounting CD
• 6 Mounting Audio CD's
• 7 Altering /etc/fstab

• 8 Unmount and eject CD

Media

Detecting CD-ROM/DVD-ROM drive


If we are not sure which block device is our DVD-ROM or CD-ROM we can find out
simply by running command:

# wodim -devices

If the wodim command is not available on your system make sure that package cdrecord
is installed. After running wodim command you should get output similar to one below:

Well, now its clear that my CD-ROM drive is know by my system as block device
/dev/hdc

Testing for iso9660 compatibility


Lets see of my current kernel supports iso9660 filesystem.

# cat /proc/filesystems

This command should report available iso9660 filesystem.

Creating mount point


Probably there is already mount point on you system. Usually it is /cdrom, /media/cdrom,
/media/cdrom0 or /mnt/cdrom . If this not you case create mount point now.

# mkdir /media/cdrom0

Mounting CD
As a root issue command:

# mount -t iso9660 /dev/hdc /media/cdrom0/

your CD is now mounted as /media/cdrom0/. Navigate to this directory to see its content.

Mounting Audio CD's


Sometimes you would like to listen to your favorite music and when you try mount music
cd with a command above you can get problems like:
linuxconfig.org# mount -t iso9660 /dev/hdc /media/cdrom0/
mount: block device /dev/hdc is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/hdc,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

linuxconfig.org#

This is because music CD's does not contain standard iso9660 filesystem. In fact the story
with music cd's is easier as a story with data CD's with iso9660 filesystem. In order to
listen to music CD just insert it into CD-ROM/DVD-ROM drive and fire up you favorite
music CD player.

Only think you need to be concern about is if you have "kdemultimedia-kio-plugins" for
KDE or in case of gnome "gnome-media" packages installed which also helps you to
browse CD content. In case you would like to see content of music CD just start
"KONQUEROR" and enter location:

audiocd:/

Altering /etc/fstab
To allow users on the system mount CD's or DVD's you can alter your /etc/fstab by add
line similar to this:

/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0

Unmount and eject CD


There are couple ways how to remove CD/DVD from a drive.

# unmout /dev/hdc
# eject

or you can simply run

# eject

If you are unable to unmount, make sure, that you are not in mount point directory of
device you are trying to unmount or some other application is not using it. If still you
have a problem to unmount desired drive you can use fuser command to kill all related
processes in regards to your drive.

# fuser -mk /dev/hdc


# eject
Retrieved from "http://www.linuxconfig.org/HowTo_mount_cdrom_in_linux"
Views

• Article
• Discussion
• History

Personal tools

• Log in / create account

Navigation

• Main Page

Linux Commands

• Linux Commands

Tutorials

• Vim-Vi Text Editor


• Introduction to Perl
• Bash Script Basics

Search

Publications Archives

• 2009
• 2008
• 2007

Interaction

• Random Page
• Contact us
• About this Project
• Who supports us

Book Store

• Linux Books
Partner Linux Sites

• TuxMachines
• DebianAdmin
• Monsterb
• LinuxBloggers
• AdamsInfo
• LinuxScrew
• FreeSoftwareLinux

top Linux distributions

• Debian
• Ubuntu
• Red Hat
• Suse
• Kubuntu
• Gentoo
• Fedora
• Slackware
• CentOS
• OpenSuse
• Mandriva
• Knoppix
• Mepis
• Xandros
• PCLinuxOS
• Turbolinux
• Kubuntu
• Arch linux

Other Partner Sites

• Australian Student Portal


• Montessori Education

• This page was last modified 04:10, 16 May 2009.


• This page has been accessed 11,851 times.
• Privacy policy
• About Linux Config Wiki
• Disclaimers
• Bookmarks: Term Deposits Australian Banks, Car insurance Quote - Allianz
Insurance Australia , ING Car Insurance, Car Insurance - Budget Direct
, Related Links Info

You might also like