CDemu is a kernel module for Linux.
It is designed to simulate a CD drive + CD with just simple cue/bin files,
which are pretty common in the Windows world. It includes an user space
program to control the kernel module. You can use it to watch an SVCD
or mount the data track of an bin/cue. However, for watching an SVCD, we
would recommend MPlayer which can play
bin/cue images directly with the patch a friend and I made for it (more
under History). The CDemu project is licensed under the
GPL (v2 or later) !
This is CDemu 0.8.0, a CD drive emulator for Linux.
- 2.6.16 and higher only (no more 2.4).
- cdemu has file access like in a loop module (Nico Huber).
- should work on amd64 & SMP systems.
- .mds, .ccd, .nrg support (Henrik Stokseth).
- .iso (Calin A. Culianu).
- some docs.
- bug fixes.
Sources are available from:
Any bug reports, comments, feature requests are welcomed.
- Using CDemu on multi user systems should be safe now. Any user can mount an
image in an empty CDemu slot while only the user (and root) can unmount a slot
that is already in use.
- Many users have reported SMP issues (varying from lock ups to very poor
performance). We've had an user send us a threading patch to avoid locking
issues, but it is 2.4-centric. So, before it can be added to SVN, it needs
to be generalized to support 2.4 and 2.6. Unfortunately, none of the CDemu
developers have access to SMP systems so the best testing we can do involves
'it looks good' :). CDemu-0.6 final should resolve these issues.
- Looking ahead: CDemu was first created to support bin/cue images. Ideally,
we'd like to be able to support Nero (.nrg), Disc Juggler (.cdi), Clone CD (.ccd),
etc... Anyone with spare time and spare patches would be appreciated :).
It all started like this:
I got some movies from friends on a firewire disk which where bin/cue files.
They told me I would need to burn them or use Daemon Tools
under Windows in order to watch them. That was to much for me, booting Windows
just to watch a movie? So a friend (Justus Schwartz) and I decided that we
should make a patch for our favored video player (MPlayer).
After one night we had a proof of concept; 2 weeks later we had a good patch and
we submitted it. It was accepted by the MPlayer team and starting with 0.9rc3,
our patch is included. The syntax is as follows:
$ mplayer cue://<cue file>[:track] [options]
After that was done, I thought, hey it's not that hard, so I resolved to make
something like Daemon Tools, but for Linux. And so I started to write my first
kernel module and after 1 week it worked; some bug fixes later we had my first
I changed the name to CDemu because the company which owns the rights to the name
"Virtual CD" asked me to do so.
The install is quite simple:
- you need the source of your current running kernel.
/lib/modules/$(shell uname -r)/build/include needs to point at it.
- extract the archive (release tarball):
$ tar -jxvf cdemu-<VER>.tar.bz2
or checkout the code from svn:
$ svn co https://svn.sourceforge.net/svnroot/cdemu/trunk cdemu
- cd into that dir
$ cd cdemu-<VER> or
$ cd cdemu
- build the module:
- install the module and user space utilities:
$ sudo make install
- now simply load the kernel module:
$ sudo modprobe cdemu
(no message should be displayed after running modprobe)
- to load a bin/cue image:
$ cdemu 0 image.cue
$ sudo mount /dev/cdemu0 /mnt/cdrom
(some things may be different on your system, YMMV)
- for more information, please review the help output:
$ cdemu -h
Why should I use the CDemu Kernel Module when i can just mount the ISO9660 filesystem
over a loopback device ?
(mount -o loop mymovie.iso /mnt/mymovie for example)
That only works with ISO images. In other words, only one data track. Many bin/cue
images contain more than one track and often times are in the raw format (that means the
image also contains the error correction codes from the cd ... an exact binary image).
You can't mount these types of images directly.
I am trying to mount an [S]VCD but the mount command keeps failing!
Of course it does not work ! An [S]VCD contains no real filesystem. You need
to read it in raw mode.
e.g. use MPlayer or xine to watch the movie.
Just point the player to the virtual device (i.e. /dev/cdemu/0)
But Windows does you say !? Windows lies to you ;-) Windows has the problem
that it can't read cds in raw mode, so the ATAPI driver creates a virtual file system,
so Windows programs can read it. This layer is not needed in Linux since we can just
handle the raw format with our media players. ;-)
Whenever I try to mount an image I get an error like "mount: you must specify the
Usually when you run mount you don't have to specify the filesystem type, but
sometimes you do. Just add another option to the mount command, "-t iso9660" like
$ mount -t iso9660 /dev/cdemu/0 /mnt/cdrom
The user space program is written in our beloved language Python.
If you would like to make a GUI program for it, you should take a look at
All important user space code is there. If you've made a GUI program to control
the CDemu Kernel Module, please contact us. We would love
to include the code here on our site :).
There are unofficial packages of the next version of cdemu to be
After cdemu 0.8 was released with support for a lot of new CD-images, it was
concluded that the core design of cdemu was inherently broken, so it was
eventually rewritten from scratch by Rok Mandeljc and given the nickname
userspace-cdemu. The stability of the software should at this point actually
be better than that of the last official version (0.8). If you have some
problems getting cdemu 0.8 to work, I recommend that you try userspace-cdemu.
We are interested in bug reports primarily on this upcoming release. We are
also interested in getting help both with development work and documentation
in particular. Patches are most welcome.
Current Release: 0.8
This release supports 2.6.16 and later Linux kernels.
Wolfgang Koller <viras at suselinuxsupport dot de> has made a
The following supports Linux 2.4 and 2.6
The following only support Linux 2.4
Thanks to Fredrik Henriksson, we have a simple test cue/bin file: cdemu_example.tar.bz2
Bug Reports / Questions / Etc:
CDemu Development List
Paweł Różański (current maintainer)
Robert Penz (original author)