Virtual CDROM for Unix?

Andy Bakun abakun at
Mon Nov 30 23:56:27 GMT 1998

             Subject: Virtual CDROM for Unix?
             Message-ID: <3662536D.990E6384 at>

             Has anyone implemented a "virtual cdrom" facility as offered
             windows?  That is CD images are cached & compressed on hard
             disk and shared across a network. See:


             I have not found any news of a Unix solution.  I would
             like to offer one on a Linux server to Windows clients.

             It should not be hard to implement with Samba...

             Thanks in advance.

Linux supports a thing called the 'loop device' which reads a filesystem from a
You should be able to cat the contents of your cdrom to a file with:

cat /dev/cdrom > cdromfile

and then use losetup (there should be man page for it on your linux system) to
map the file to a device file, and then mount that as a unix path.  This won't
work for compressed images though, but should be faster than using your cdrom
changer.  And of course, you'll need loop device support in the linux kernel.
Or you could just copy the contents of the cdrom to a directory on the

Concerning autorun ability, I have not seen this work reliably or in some cases
at all with network mounted cdroms.

I've found it better to just buy a bunch of cdroms and scsi cards, rather than
use a juke box setup.  Harddrive space is much too important to waste on static
data that already exists on cdroms.  I've found that using harddrive space to
mirror cdroms is not really cost effective.

Andy Bakun

More information about the samba mailing list