Using the CD writer

This document explains how to use CD writers on our linux computers. The following machines can write CDs.

MachineMain UserWrites CDs?Writes DVDs?
grusDiana Worrallyesyes
pavoRhys Morrisyesyes
lupusMalcolm Bremeryesyes
monocerosAaron Robothamyesyes
velaLaura Douglasyesyes
eridanusKaty Lancasteryesyes

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.

Making an image

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. 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 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 -v blank=fast. Be aware that not all CD-ROM drives will read rewritables.

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!

CD copying

Make an image of the files on a CD, then write that image to a blank CD.


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


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

Further information

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.

Rhys Morris
Last modified: Mon Jun 26 10:32:53 BST 2006