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.
source /opt/schily/bin/cdsetupThis 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 directorywhere 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.
cdrecord -v filename.fswhere 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
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.fsNow (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 -msinfoThis 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.fsYou 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/cdscriptwhich can be used to automate the multi-session process -- use at your own risk.
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)