Virtual CD Jukebox

From Taclug

This document was manually retyped from a handout distributed during a presentation at a meeting of TACLUG some time in the past by Chuck Wolber, Past President and Board Member of TACLUG.

Objective: Set up a Virtual CD server that will share the contents of a large number of CDROMs as well as the ISO image for users to download or burn to CD.

Problem: While the easiest solution is to just copy the contents of a CD to a directory on the hard drive, this has several setbacks. One, it is a real pain to download, and verify the integrity of the files over an unrealiable network. It would be bothersome to burn to another CD and any bootable CD's would no longer be bootable. Storing both the ISO image and all the files on hard disk would eat up space rather quickly.

Solution: Make an ISO image of the CDROM. Mount the ISO image as a loopback device to access the files contained within. Share both the ISO image and the virtual CDROM over the network with Samba.

Tools: autofs, samba, Scott's Super Hip Rip Script :)

Instructions: First, we need to prepare the automounter. The reason we use the automounter is that the number of file systems you can mount using the loopback device is limited. And since we want our jukebox to be limited only by the size of the hard drive, we'll use the automounter to mount and unmount the file systems as needed.

1) Make your directories. The defaults used in the script are /mnt/images & /mnt/iso_srv. You may also want to give yourself write permissions to these directories so you don't have to be root every time you rip a CD.

2) Add the line "/mnt/iso_srv /etc/auto.iso_srv" to /etc/auto.master/ While you're at it, give yourself write permissions on /etc/auto.iso_srv too.

3) Restart the automount service. #/etc/rc.d/autofs restart .

Now we are ready to use Scott's Super Hip Rip Script. If the default directories are fine and you want to verify the integrity of each CD and generate a md5sum for it, then just run it. If you want to disable the verification, set its value to No by editing the script. When it runs, it will prompt for the name of th eCD, write the ISO, configure the automounter to load the new image, generate md5sums and check it against the md5sum of the original CD.

After you rip your CDs, you either need a great memory or you need to make sym links back to where the automounter will mount the CD. The reason for this is that automounter does not show any links or directories before it mounts them. So your /mnt/iso_srv directory will be empty but you can still cd /mnt/iso_srv/suse-81-1/. Rather than memorieze all the directories, let's make another directory with some organization and some sym links.

1) Make a directory like /mnt/cdlibrary.

2) Make sym links back to where automounter will load the images:

ln -s /mnt/iso_srv/suse-81-1 /mnt/cdlibrary/linux/distros/SuSE/8.1/CD1

3) Add /mnt/cdlibrary and /mnt/images as Samba shares.

navigation
  • Aggregator (http://www.taclug.org/planet/)
  • Gallery (http://www.taclug.org/gallery)
  • Library (http://chameleon.homelinux.net/OpenDB/listings.php?owner_id=taclib)