
|
|
Q: How do I burn CDs on the CS Linux machines?
This document describes the process of recording a CD-R/CD-RW using the CD
recorders located on most Linux systems throughout Lindley Hall.
If you are using a Linux machine, you should be able
to determine if the system has a CD-R/RW drive by looking at the faceplate
on the drive. If it is a CD-R/RW, it will say Recordable (CD-R)
or ReWritable (CD-R/RW) under the disc logo on the drive.
If you are using a Linux system with a CD-R/RW drive, there are
some GUI options for recording CDs. First, if you are running
Gnome, the Gnome CD Creator window will automatically pop up when
you insert a blank piece of CD-R or CD-RW media. You can just drag
and drop files into this window and then select 'File->Write To CD'
when you are done. Second, you can use the xcdroast program.
This is a much more sophisticated program that lests you do a variety
of things like duplicating a CD, reading tracks from an existing CD,
and combining files into a new CD. A description of how to use
xcdroast is beyond the scope of this document.
The remainder of this document describes some basics of burning
CDs and the usage of some locally written scripts for burning
CDs from the command line. If you find any incorrect
information in this document or have suggestions for additions, please
report it.
Index
Summary for writing data CDs
Summary for writing audio CDs
CD formats and portability issues
Multi-session recording
Burning data CDs
Burning audio CDs
Cleaning up
Summary for writing data CDs
This document is long (perhaps too long) but it contains some useful
information related to the recording of CD-Rs so you may want to go
through it before you start recording CDs.
Here is a summary of the steps required to record a CD for
quick reference.
Example: Recording my home directory (/u/robh)
- Make the image file, robh.image, using "robh_home" as the
CD label:
cd /tmp
CDRmkimage robh.image /u/robh robh_home
Make sure the resulting image file is smaller than 700MB or it won't fit on a CD.
- Do the recording
CDRburn robh.image
If you are recording to rewritable CD-RW media, you
must use the -rw flag to erase the CD before you burn.
CDRburn -rw robh.image
- Verify
CDRverify robh.image
- Clean-up
rm robh.image
Summary for writing audio CDs
The CD-R may also be used to burn audio CD's. To do this follow these steps:
- Create an au or wav file for each track
- Do a dummy burn to verify setup
cdrecord -v -pad -dummy speed=4 dev=ATA:0,0,0 -audio track*.au
- Erase the media if you are using CD-RW media (instead of CD-R)
cdrecord -v speed=4 dev=ATA:0,0,0 blank=fast
- Burn the audio cd
cdrecord -v -pad speed=4 dev=ATA:0,0,0 -audio track*.au
CD formats and portability issues
The standard format for CDs is defined by ISO9660. This format defines
the layout of the data that is recorded to the CD and has the distinct
advantage that it is a highly portable format. ISO9660 format CDs can
be read on a wide range of platforms including DOS/Windows, Sun, and
SGI, just to name a few. The downside is that there are limitations
to the format, including the 8.3 filenaming convention, support for
only 8 levels of directories, no support for unix-style file ownership
and permissions, and the lack of support for symbolic links. The upside
is that there are extensions to the ISO9660 format called the "Rock Ridge
Extensions" that add support for these features to the standard format.
The extensions were done so that an ISO9660+RockRidge format CD can be
read as a standard ISO9660 format CD in machines that do not support
the Rock Ridge Extensions (ie. DOS/Windows) while still providing access
to these features on machines that do (ie. Sun, SGI). The recording
process described below will create an ISO9660+RockRidge format CD.
Here are some notes related to the format of the CD and portability issues.
- If an ISO9660+RockRidge CD is read from a machine that does not
support the Rock Ridge extension:
- filenames that do not fit into the 8.3 convention will be
translated. For example, a file named "sourcecode.older"
may show up as "sourceco.old" or even "sourceco.000".
- the files and directories will be owned by root with
read permission for everyone.
- directories with a depth greater than 8 will be moved to the
top of the tree.
- If you take an ISO9660+RockRidge CD and mount it, it will look
just like the directory tree from which it was recorded. The
ownership, group, and file permissions will be perserved. However,
there are some important issues, expecially if you intend to take
the CD out of the CS department.
- The owner and group, as is done on unix systems, is recorded
using your uid and gid, not your username. Within the CS
department, the uid->username mapping is consistant, so there
is no problem. However, if you are taking the CD off site, there
will be differences in the uid assignment. For example,
my username is robh and my uid is 18396. If I take a CD to
another site where I do not have uid 18396, the files will be
owned by whatever user happens to have uid 18396. Since the
media is read-only, there is no danger that this user will be
able to modify files on the CD. However, if you have files
that were only readable by you, in this new environment they
will only be readable by the user that has uid 18396.
There are a couple ways around this. First, you can make the
files world readable before you record them to assure that you
will be able to read them on the target system. Second, you
could mount the CD on the target system without using the
Rock Ridge extensions. This would make all files readable, but
you would also lose the 8.3-to-long_file_name mapping. Lastly,
if you know the uid you will have on the target machine, you
could change the ownership to this uid before you do the recording.
This will require super-user privileges so you will need to
contact one of the system administrators for assistance.
- Be aware of the fact that this is write-once media. Nothing
can be modified after it is recorded, including file and
directory ownership, group, and permissions.
Multi-session recording
The process of writing an image to a CD-R is called a session. It is
possible to write multiple images to a single CD-R with the images
written one after another on the media. This process is called multi-
session recording. Since the media is write-once, it is not possible
to modify the data that is recorded during any given session. Also,
many computers, including Suns and SGIs, are not capable of reading
anything other than the first session on a multi-session CD. For this
reason, multi-session recording is not recommended. You should create
a single image that is recorded in a single session. Once this image
is recorded, it can never be modified.
Burning data CDs
What follows is a detailed description of the recording process:
- Obtain a CD-R disk
If you are a CS faculty or staff member or a graduate student and
this recording is related to faculty-sponsored research , you can
pick up a blank CD-R from me in LH430D. Otherwise, you will need to
purchase a disk. CDR media should be available locally for < $5 and it
is reported that they are actually available at the bookstore in
the Union. There are 63 minute disks that hold about 550MB and
74 minute that hold 650MB. The price difference between the 74s
and 63s is minimal.
You should not open the CD-R packaging until you are ready to
do the recording.
- Create the image file
This step involves taking a standard unix directory tree and converting
it into an iso9660+RockRidge format file that will then be recorded
onto the CD-R. If the data you want to record is not already arranged
in a single directory tree, you will need to do this first. There is
a world writeable directory on the machine blindcat that you can use
to create this directory. The directory is /l/CDR/CD-Images-HOSTNAME
(where HOSTNAME is either blindcat, oboe, or tucotuco) and
you can create a directory under CD-Images-HOSTNAME and copy the data you want
to record into this directory.
NOTE: The CD-Images directory is ONLY to be used as a staging area
for files during the CD recording process. Once you have
verified that the recording has completed successfully, you
need to remove any files and directories you created.
Once you have the directory of data ready, you can create the image
file using CDRmkimage. CDRmkimage takes three arguments;
the image file you want to create, the directory containing the data,
and a volume id, or label, which is just any name you want to give to
the CD. For example, I can create an image of my home directory
as follows:
blindcat% CDRmkimage robh.image /u/robh robh_home
This will create the image file robh.image that can then be recorded onto
a CD-R.
Note that the CDRmkimage command is just a front end to the mkisofs
command. See the man page for mkisofs if you want to use mkisofs
directly.
Lastly, keep in mind that copying 100s of MBytes of data across
the network is likely to effect other users so you may want to think
about building the image file during off hours.
Also, there are things you can do to limit the network
traffic. In general, you should always do any data copying and
the CDRmkimage from blindcat. You should never run the CDRmkimage
on another machine and write the image to blindcat via /l/CDR/...
- Write the image file.
Load your CDR media into the drive. It is very important that
there be no dust on the CD-R recording surface. Visually verify that
there are no dust particles on the recording surface.
Use the CDRburn command to write the data to the CD-R. For example,
to write the "robh.image" image file created above:
blindcat% CDRburn robh.image
If you are using rewritable CD-RW media, use the -rw flag to CDRburn:
blindcat% CDRburn -rw robh.image
The recording process proceeds at approximately 600KB/s, so a full
650MB image file will take about 20 minutes.
- Verify the write.
It is important to verify that the image file was written properly
to the CD-R. There are several things that can go wrong with the
record and you want to identify these problem now, rather than
two years from now when you go to read the data. For example,
dust on the recording surface can result in portions of the data
that are unreadable. Also, if the host computer was not able to
continue to supply data to the recorder at a rate of 600KB/s for
the entire recording time, a large portion of the image may be
unreadable. Please, practice safe CD recording and always verify.
You can verify the media by using CDRverify, which takes a single
argument, which is the name of the image file you recorded:
blindcat% CDRverify robh.image
Be sure to put your CD into the drive before you run the verify.
- Clean up
Once the verify is successful, remove the image file and data
directories that you created in blindcat:/l/CDR/CD-Images-blindcat.
Do not remove the image file until the verification is complete.
- Reading the data
You can view the data on any of the departmental machines with
CD-ROM drives. How you access the data depends on the type of
machine you are using. Here is how it is done on some of the
machines we have around here:
- Sun (Solaris 2.x) - If you insert the CD into the reader, it
will automatically be mounted for you under /cdrom.
You can eject the CD by issuing the "eject cdrom" command.
- Sun (SunOS 4.1.3) - You can use the cdmount command to mount
the cdrom. Once it is mounted, you can access your
files via the path /cdrom.
- SGI - Under IRIX, a CD is automatically mounted on /CDROM
when it is inserted into the drive.
- DOS/Windows - When you insert the CD, it will be attached to
a drive specifier (ie. E:) as defined by the
configuration of the machine.
- Linux - If you are using Gnome or KDE, you should get a
file manager window automatically when you insert the CD.
If not, you can mount it with "mount /mnt/cdrom" and then
access it using the path /mnt/cdrom. When you are done,
you can unmount it by running "umount /mnt/cdrom".
- Storage and labelling
Proper storage is important for the life of your CD-R. The media is
particularly sensitive to sunlight, heat, and moisture, so you must
protect the media from direct sunlight and moisture and always store
it in the original case. You should never touch the recording
surface and only attempt to clean the surface if you have trouble
reading the data and then only do so following the procedure
recommended by the manufacturer of your particular CD-R media.
You can label the CD-R by writing on the non-data surface with a felt
tip marker. Do not use a ball-point pen and never write on the
green side. Do not use adhesive stickers for labeling.
Burning audio CDs
These directions are a summation of the cdrecord man page. For
more details refer to it.
- Create an au or wav file for each track
The format of the audio file must meet the following conditions:
- 44100 samples/second
- 16-bit digital audio
- au or wav format
- 2 channel stereo
Create an individual file for each track you wish to burn. It
is easiest if you name the tracks foo01.au foo02.au and so
forth. This helps to keep clear which tracks go together and
allows easy passing of the filenames to the cdrecord command
when you are ready to burn.
- Erase the CD-RW
If you are using rewritable CD-RW media instead of write-once
CD-R media, you have to erase it first. You can do this
by running:
blindcat% cdrecord -v speed=4 dev=6,0 blank=fast
If you are using the recorder on oboe or tucotuco instead of blindcat, use "dev=1,6,0".
- Verify the setup
If you have not already, copy all of the files about to be
burned to /l/CDR/CD-Images-blindcat, which is a local hard drive to
blindcat. Note, you should use /l/CDR/CD-Images-oboe if you are using
the recorder attached to oboe and /l/CDR/CD-Images-tucotuco if you
are using tucotuco.
Change into the /l/CDR/CD-Images-blindcat directory, while logged into
blindcat and run the following command, replacing the filenames
at the end with the names of your audio files.
blindcat% cdrecord -v -pad -dummy speed=4 dev=6,0 -audio track*.au
If there were errors, most likely due to bad file sizes, then
correct them first before attempting to burn the audio cd. If you
are using the recorder on oboe or tucotuco instead of blindcat, use "dev=1,6,0".
- Write the CD
Now that all the files are ready and a dummy run has been made
to check for errors, run the cdrecord command.
blindcat% cdrecord -v -pad speed=4 dev=6,0 -audio track*.au
You should get a running status and be told when the operation
has completed. After you have tested the cd in an audio cdplayer
then you should delete the audio files in /l/CDR/CD-Images-blindcat
which were used to create the cd. If you
are using the recorder on oboe or tucotuco instead of blindcat, use "dev=1,6,0".
Cleaning up
When you are done with the recording, please remove the image file and data
directories that you created in /l/CDR/CD-Images-*. Files left
here longer than a week may be deleted without notice.
See an error in this FAQ entry? Please
report it.
[Return to the FAQ index]
|