Warning: It seems that writing to the CD-writer only works if it is directly connected to the PC. The SCSI-chain with all the devices and the SCSI switch seems to give errors. You should at least shorten the SCSI-chain.

2nd Warning: Currently, "cdrecord" is not installed on the system (it resides in my homedirectory under ~rauch/src/cdrecord-1.5/cdrecord/OBJ/unknown-linux-cc/. You have to be root to write a CD! (this will probably change in the future, as soon as everything works fine).

How to write a CR-ROM with Linux

This document describes how to write a CD with the CD-writer standing besides Gettysburg using the Linux machine cs-zz12. It asumes some familiarity with Linux or other UNIX-systems. It is itentionaly kept short, so that you can find the important information quickly.

Checking the device

First you might want to check if you have access to the device and if you have the correct device number choosen. To do this, try the following command:
cdrecord -eject -dev=0,4,0
This should open the tray of the CD-writer. You will get an error if you choose the wrong device.

Creating the filesystem image

Before writing the CD, you have to create an image of the filesystem you plan to write. Usually the ISO 9660 filesystem type with Rockridge Extensions is used, because it makes it possible to use longer filenames.

Create your filesystem on a local disc which has enough space for it (depending on your data up to 700 MB). To create the filesystem, issue the following command:

mkisofs -r -o /path_to_your_imagefile /path_to_your_data
Make sure there is enough space on the disk where you want to write your image (depending on your data up to 700 MB)! This process may take up to somewhere around 20 minutes.

Note: If you want to preserve all ownership-information and all permissions, you should use -R instead of -r.

Check if your image is correct

Linux offers the possibility to mount a filesystem image as if it was a real file system. To do so, mount the drive with:
mount -t iso9660 -o no,loop=/dev/loop0 /path_to_your_imagefile /mnt
Now you can inspect your image by looking at the contents of the directory /mnt. When you are confident that your image contains the right data, leave the directory tree /mnt and unmount the filesystem:
umount /mnt

Writing the CD-ROM

Before actually writing the CD-ROM you might want to test if everything will work (SCSI-chain ok, everything fast enough, etc.). To do so, use the dummy-parameter and simulate the writing:
cdrecord -v -dummy speed=2 dev=0,4,0 /path_to_your_imagefile
This will take quite some time (20-40 minutes), but the command prints the ammount of data it has already written during the process.

If everything works well and there are no errors during the test, you are ready to write your CD. Just repeate the above command without the dummy-parameter:

cdrecord -v speed=2 dev=0,4,0 /path_to_your_imagefile
After that, you are done.
Last change: 25 August 1998
rauch@inf.ethz.ch