Using the CD writer

This document explains how to use the local CD writers. The publicly accessible CD writer is attached to cygnus. The procedure is very similar for the CD/DVD writers on hercules and lupus, and the CD writer on taurus. Writing a DVD is different. See this page for some documentation, and/or talk to Martin. Note that the Linux machines will require you to have appropriate permissions before you use their CD writers. Again, talk to Martin to sort this out.

Writing a CD is a two-step process. First you create an image of the files to be written to CD. Then you actually carry out the writing process.

Making an image

Type
source /opt/schily/bin/cdsetup
This script will set up your path to use the CD writer software. It will also move you into a directory where it is safe to create the temporary files. It is most sensible to try to create files on discs which are local to the machine hosting the CD writer (presently cygnus). If you use a non-local disc, your CD may be ruined by delays in fetching the image from the network. Do so at your own risk. The /data/cygnus1/scratch area, where you will find yourself after running the cdsetup script, is reserved for CD creation. Please tidy up this area after you've finished. It is automatically cleared early every morning.

(If using hercules, you do not need to source the file above, and you should choose your own location for making the image, ideally on one of the hercules discs.)

To make an image suitable for writing to CD do

mkisofs -l -r -o filename.fs directory
where filename.fs is the name of the image to be created and directory is the previously prepared directory which will be written to CD. It is not necessary that directory be local to cygnus. mkisofs will take a short while to check and build the file system. You will be left with a file called filename.fs containing everything that was in directory in a format suitable for writing to CD. The process takes a few minutes. The capacity of a blank CD is 650 Mb. Do not exceed this total size in directory, and be aware that some space may be taken up with file system requirements.

Writing

cdrecord is the command to write to CD. In its simplest form, you can call it with
cdrecord -v filename.fs
where filename.fs is the name of the file prepared with mkisofs. The -v option causes the program to give diagnostic output. Make sure there is a blank medium in the drive! You will have the opportunity to cancel the command (with control-C) before it starts writing. It will take about 20 minutes to write a full CD.

It is important to ensure that

Advanced use

Rewritable CDs

The CD writer works with rewritable CDs. Before rewriting a CD, you will need to blank it with cdrecord blank=fast. Be aware that not all CD-ROM drives will read rewritables. In particular, most of the CD-ROM drives on the Suns won't. sol can read them, though. Newer CD-ROM drives on PCs should also be able to handle them.

Multi-session use

Multi-session use substantially expands the usefulness of the CD writer by allowing you to add more than one file system to it. This means you can back up over a period of time rather than waiting for 650-Mb chunks of data to become available.

To make use of this facility, make your first file system with mkisofs as normal, but then write it with the -multi option:

cdrecord -v -multi filename.fs
Now (or later) you can make subsequent file systems to add on to this one. First, use cdrecord to determine the space taken up by your existing files on the CD:
cdrecord -msinfo
This returns two numbers; call them X and Y. Then to make a file system that can be added to the existing one, use some additional arguments to mkisofs:
mkisofs -M 1,1,0 -C X,Y -l -r -o filename2.fs new_directory
(On hercules use -M 1,0,0 instead; on taurus and lupus use -M 0,0,0.) The program will look at the disc and construct a filesystem that can be added to what's already there. Then just write it with
cdrecord -v -multi filename2.fs
You can carry on doing this until disc space runs out. Each `session' is written as a separate track on the CD. Be aware that the top-level directories of the multiple filesystems will be merged; they will appear as one large directory when you mount the CD. Also, note that some old operating systems cannot deal with multi-session CDs, though almost all modern machines can: make sure you test your CD first if possible!

Thanks to Dave for bullying me into making this work. He has a script which lives in

~phdt/bin/cdscript
which can be used to automate the multi-session process -- use at your own risk.

CD copying, &c

There is a large number of options to the cdrecord command. Once you have run the startup script, man cdrecord will tell you about some of them. CDrecord has a home page here.

Media

Blank CDs and DVDs for group use are available from Rhys or Martin.

Policy

The CD writer may not be used for reproducing copyright material without permission.

As the CD writer on cygnus was bought by Diana Worrall, she has priority if more than one person needs to use it at a given time.

(mail details removed)9-Nov-1999 (updated 20-Nov-2003)