|Machine||Main User||Writes CDs?||Writes DVDs?|
Writing a DVD is different see our local page here.
Writing a CD is a two-step process. First you create an image of the files to be written to CD. Then you actually write the image to the CD.
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. 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 capacity of a blank CD is 650 Mb (sometimes 700 Mb). Do not exceed this size limit 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!