feed-image  ISSN 1836-5930



Receive Your Complimentary Guide to Linux NOW!


A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)




Poll

Do you care about your privacy when using a FACEBOOK?
 

linuxconfig.org
is hosted by:



Partner Linux Sites
TuxMachines
DebianAdmin
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
FreeSoftwareLinux
All For Linux

HowTo mount cdrom in linux
Article Index
1. Detecting CD-ROM/DVD-ROM drive
2. Testing for iso9660 compatibility
3. Creating mount point
4. Mounting CD
5. Mounting Audio CD's
6. Altering /etc/fstab
7. Unmount and eject CD
8. Video

CD's and DVDs are using iso9660 filesytem. As any other operating system, Linux is also able to read data from standard iso9660 filesystem. Let's see how we can mount CD-ROM or DVD-ROM with use of mount command.

1. Detecting CD-ROM/DVD-ROM drive

If we are not sure which block device is our DVD-ROM or CD-ROM we can find it out  by running a following wodim 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:

# wodim -devices
wodim: Overview of accessible drives (1 found) :
----------------------------------------------------------
 0  dev='/dev/sdc' rwrw-- : 'TSSTcorp' 'CD/DVDW SH-S183L'
----------------------------------------------------------

Well, now it's clear that my DVD-ROM drive is know by  system as a block device /dev/hdc. Note different systems may behave differently. For example on Debian Linux a user runing wodim command must belong to cdrom group otherwise the wodim command will fail with a following error message:

wodim: No such file or directory.
Cannot open SCSI driver!
For possible targets try 'wodim --devices'
or 'wodim -scanbus'.
For possible transport specifiers try 'wodim 
dev=help'.
For IDE/ATAPI devices configuration, 
see the file README.ATAPI.setup from
the wodim documentation.

2. Testing for iso9660 compatibility

Lets see if my current kernel supports iso9660 filesystem.

# cat /proc/filesystems 

This command should report available iso9660 filesystem.
Testing for iso9660 compatibility

3. 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 your case create a new mount point now.

# mkdir /media/cdrom0 

4. Mounting CD

As a root user issue a command:

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

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

5. 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 thing you need to be concern about is whether 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:/ 

6. Altering /etc/fstab

To allow users on the system mount CD's or DVD's alter your /etc/fstab and add line similar to the one below:

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

7. 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 the directory where your DVD-ROM is mounted or that some other application is not using it. If you still have a problem to unmount you DVD-ROM medium you can use fuser command to kill all related processes using your device.

# fuser -mk /dev/hdc
# eject

8. Video


Get FREE complimentary Linux Guides

The GNU/Linux Advanced Administration
The GNU/Linux systems have reached an important level of maturity, allowing to integrate them in almost any kind of work environment, from a desktop PC to the sever facilities of a big company.

In this ebook "The GNU/Linux Operating System", the main contents are related with system administration. You will learn how to install and configure several computer services, and how to optimize and synchronize the resources using GNU/Linux.

The topics covered in this 500+ page eBook include Linux network, server and data administration, Linux kernel, security, clustering, configuration, tuning, optimization, migration and coexistence with non-Linux systems. A must read for any serious Linux system admin.

A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.

You've probably heard about Linux, the free, open-source operating system that's been pushing up against Microsoft. It's way cheaper, faster, safer, and has a far bigger active community than Windows, so why aren't you on it? Don't worry, Makeuseof.com understands. Like many things, venturing off into a completely unknown world can seem rather scary, and also be pretty difficult in the beginning. It's while adapting to the unknown, that one needs a guiding, and caring hand. This guide will tell you all you need to know in 20 illustrated pages, helping you to take your first steps. Let your curiosity take you hostage and start discovering Linux today, with this manual as your guide! Don't let Makeuseof.com keep you any longer, and download the Newbie's Initiation to Linux. With this free guide you will also receive daily updates on new cool websites and programs in your email for free courtesy of MakeUseOf.

Linux from Scratch
Linux from Scratch describes the process of creating your own Linux system from scratch from an already installed Linux distribution, using nothing but the source code of software that you need.

This 318 page eBook provides readers with the background and instruction to design and build custom Linux systems. This eBook highlights the Linux from Scratch project and the benefits of using this system. Users can dictate all aspects of their system, including directory layout, script setup, and security. The resulting system will be compiled completely from the source code, and the user will be able to specify where, why, and how programs are installed. This eBook allows readers to fully customize Linux systems to their own needs and allows users more control over their system.

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)
Getting Started with Ubuntu 10.04 (Lucid Lynx) is a comprehensive beginners guide for the Ubuntu operating system; it features comprehensive guides, How Tos and information on anything you need to know after first installing Ubuntu.

Designed to be as user-friendly and easy to follow as possible, it should provide the first point of reference to any Ubuntu newcomer with lots of information. The manual has step by step instructions and includes lots of screenshots to show you how to do tasks. It also includes a Troubleshooting section to help you solve common Ubuntu problems quickly. Download this 160+ page manual today.

Comments (27)
  • Cameron

    cameron@cameron-computer:~$ sudo mount -t iso9660 /dev/scd0 /media/cdrom0/
    mount: no medium found on /dev/sr0

    I'm trying to mount an audio CD. When I went to Rythmbox, it acted like there was no CD inserted. And I DO have the latest version of gnome-media installed.
    Help please? :D

  • Lubos  - I'm trying to mount an audio CD.

    Hi,

    You do not need to mount audio cd. Try some other cd players. Type into the command line:

    apt-cache search cd player

    pick oneand install.

  • LinuxN00b  - No iso9660?

    Hi lubos,

    I'm having a problem similar to himanshu. I don't appear to have iso9660. In Synaptic I searched for cdrecord, but couldn't find anything. I'm running 9.10 Karmic Netbook Remix. Here is what I have so far:

    jillnevan@jillnevan-laptop:~$ sudo wodim --devices
    wodim: Overview of accessible drives (1 found) :
    ---------------------------------------------------------------------- ---
    0 dev='/dev/scd0' rwrw-- : 'HL-DT-ST' 'DVDRAM GSA-4163B'
    ---------------------------------------------------------------------- ---
    jillnevan@jillnevan-laptop:~$ sudo cat /proc/filesystems
    nodev sysfs
    nodev rootfs
    nodev bdev
    nodev proc
    nodev cgroup
    nodev cpuset
    nodev debugfs
    nodev securityfs
    nodev sockfs
    nodev pipefs
    nodev anon_inodefs
    nodev tmpfs
    nodev inotifyfs
    nodev devpts
    ext3
    ext2
    ext4
    nodev ramfs
    nodev hugetlbfs
    nodev ecryptfs
    nodev fuse
    fuseblk
    nodev fusectl
    nodev mqueue
    vfat
    nodev binfmt_misc
    udf

    Any suggestions?
    Thanks!

  • lubos  - I don't appear to have iso9660.

    hi,
    Try put your CD inside and run cat /proc/filesystems command again. I'n my case iso9660 also appears only when cd is inside.

    When you use mount command what error you get?

  • himanshu  - problem regarding mounting dvd

    when i used the following 2 command, it didnt help nd showed the following
    root@himanshu-desktop:/media# cat /proc/filesystems
    nodev sysfs
    nodev rootfs
    nodev bdev
    nodev proc
    nodev cgroup
    nodev cpuset
    nodev debugfs
    nodev securityfs
    nodev sockfs
    nodev usbfs
    nodev pipefs
    nodev anon_inodefs
    nodev tmpfs
    nodev inotifyfs
    nodev devpts
    ext3
    ext4
    ext2
    cramfs
    nodev ramfs
    nodev hugetlbfs
    nodev ecryptfs
    nodev fuse
    fuseblk
    nodev fusectl
    nodev mqueue
    nodev binfmt_misc
    vfat
    iso9660
    root@himanshu-desktop:/media# mount -t iso9660 /dev/scd0 /media/cdrom0/
    mount: no medium found on /dev/sr0
    root@himanshu-desktop:/media#
    please help..
    thanx

  • lubos  - mount: no medium found on /dev/sr0

    and what is the output of the following command?:
    # wodim --devices

  • himanshu alwaria  - problem mounting dvd

    himanshu@himanshu-desktop:~$ wodim --devices
    wodim: Overview of accessible drives (1 found) :
    ---------------------------------------------------------------------- ---
    0 dev='/dev/scd0' rwrw-- : 'HP' 'DVD Writer 1035d'
    ---------------------------------------------------------------------- ---
    himanshu@himanshu-desktop:~$

  • lubos  - mount: no medium found on /dev/sr0

    ok. At this stage everything points to a dvd medium. Have you tried to mount some other DVD ? The one you have in the DVD_ROM right now might be damaged.

  • himanshu alwaria  - problem mounting dvd

    yup.. i have tried with lots of dvd's nd cd's. sometimes it mounts cd's without any problem but it doesnt mount any of dvd's and lots of time when i try #cat /proc/filesystem it doesnt show iso9660, is there anything i can do about it..
    himanshu@himanshu-desktop:~$ cat /proc/filesystems
    nodev sysfs
    nodev rootfs
    nodev bdev
    nodev proc
    nodev cgroup
    nodev cpuset
    nodev debugfs
    nodev securityfs
    nodev sockfs
    nodev usbfs
    nodev pipefs
    nodev anon_inodefs
    nodev tmpfs
    nodev inotifyfs
    nodev devpts
    ext3
    ext4
    ext2
    cramfs
    nodev ramfs
    nodev hugetlbfs
    nodev ecryptfs
    nodev fuse
    fuseblk
    nodev fusectl
    nodev mqueue
    nodev binfmt_misc
    himanshu@himanshu-desktop:~$
    see, it doesnt show iso9660 filesystem.

  • lubos  - see, it doesnt show iso9660 filesystem.

    Its weird that sometimes it shows iso9660 and sometimes not. Could it be because:
    root@himanshu-desktop:/media# cat /proc/filesystems
    himanshu@himanshu-desktop:~$ cat /proc/filesystems

    try as a root user only....and also try mount as a root...

    What linux distro do you use?

  • himanshu

    i am using ubuntu 9.04, it is not showing iso9660 even when i tried it as root.
    root@himanshu-desktop:/media# cat /proc/filesystems
    nodev sysfs
    nodev rootfs
    nodev bdev
    nodev proc
    nodev cgroup
    nodev cpuset
    nodev debugfs
    nodev securityfs
    nodev sockfs
    nodev usbfs
    nodev pipefs
    nodev anon_inodefs
    nodev tmpfs
    nodev inotifyfs
    nodev devpts
    ext3
    ext4
    ext2
    cramfs
    nodev ramfs
    nodev hugetlbfs
    nodev ecryptfs
    nodev fuse
    fuseblk
    nodev fusectl
    nodev mqueue
    nodev binfmt_misc
    root@himanshu-desktop:/media#

  • sadiq  - mounting

    hi, iam learning linux administration and iam having RHCE 5 version but all the commands i dont know.can u help sending those use ful commands. one thing from long time iam searching in net for command in 5 version but iam not getting. and i want to know the complete commands in mountin, raid, and file systems, pls help me

  • lubos  - complete commands in mountin, raid, and file syste

    Dificult question since it can have multiple answers. I think you should try http://www.linuxconfig.org/ apropos command.

  • Dipo  - Mount

    Thanks it worked just fine.

  • tapesh kumar  - some commond of linux

    how to accses graphical mood after pressing Ctrl+Alt+F1/F2/F3/F4...........

    and when we are in the command mood..

  • lubos  - how to accses graphical mood after pressing Ctrl+A

    you can switch back with alt+F7 . I same cases it can be some other F* key.

  • Mr. Jan Hearthone  - mounting read only data (some files) cd-rom

    I run:
    mount -t iso9660 /dev/hdd /media/cdrom0/

    and I get:
    :~# mount -t iso9660 /dev/hdd /media/cdrom0/
    mount: block device /dev/hdd is write-protected, mounting read-only
    mount: wrong fs type, bad option, bad superblock on /dev/hdd,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so

    I burnt the cd-rom myself--maybe I did something wrong?

    Thanks, Hearthstone.

  • Lubos  - mount: block device /dev/hdd is write-protected, m

    Hi, Have a look at section 5. Is this an audio cd?

  • sanjeet kumar  - mounting cd

    plz tell me how can i mount cd and play audio and video cd in linux

  • vijay kumar  - how to configure san device and how to mount to li

    hi friends,

    i need to know about san device mounting in linux 5.0 that shoud be on FC as well as iSCSI protocals

    plz some one help me

  • ashok kumar behera  - i want to know how to mount dvdrom

    i try to mount but i cant do so plz help me.

  • Kumar  - Useful page

    This page is useful as linux help.

  • kanta  - mount

    I am not mounting my Cd-Rom Drive, Please help me. how to do mount my cd_rom drive

  • lubos  - how to do mount my cd_rom drive

    Hi,

    more information is required, such us error message you are getting, OS you are using and so on..

  • vivek  - i need linux commands and study guide

    hi,
    hi friends how u do? am meadium in linux . i want more linux commands wit some examples and linux study guide. will someone help me to improve my knowledge in linux . plz send it to my email .

    my email id: vivinz_1986@yahoo.co.in

    am waiting for ur help.
    thank u ,

  • ayaz  - how to mount dvd rom

    hi friends
    i new join to this group
    i have try to mount my dvd rom mount but not mounted and i have check the fidisk -l command to showing /dev/hdc6 or 7 or 8

    how to mount mount my dvd drive
    i want to copy data my cd to my linux system how to copy my cd data

    plz help me.
    my mail ID == ayazpathaan@gmail.com

  • lubos  - how to mount dvd rom

    HI,

    can you run this command and post your output?:

    wodim -devices

Write comment
NOTE: To unsubscribe enter your email, select "do not dotify" with title: UNSUBSCRIBE and Send.
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
Security
Please input the anti-spam code that you can read in the image.