How to burn a CD on the Linux machines
All of the Linux machines in the Graduate Computer Lab in RLM 9.326
are equipped with DVD/CD drives capable of recording CD-Rs and CD-RWs.
(You can not however record DVD media on these drives)
Follow these steps to create a CD....
See also the
other notes at the end of
this article.
A CD-ROM can hold approximately 650 MB of data. (Some CDs, usually
advertised as "80 minute" CDs, can hold 700MB or more. Check the
packaging of your CD to determine its maximum capacity.) Note that
the file system structures will take up some space, so the actual
capacity will end up being slightly less than the theoretical capacity.
The CD-R/CD-RW drives are capable of creating audio CDs; however,
we only support the creation of data CDs at this time. See the man
page for
cdrecord(1) for details on creating
an audio CD that can be played in a normal CD player. See also the
notes below on copying copyrighted materials.
Directory names and filenames will appear on the CD just as they
appear on the current filesystem, so arrange your files as you
would like them to appear on the CD. Note that you will probably
exceed your disk quota if you try to prepare a CD layout in your
home directory; instead, use the /temp/username/
directory. (For example, if your login name is
userabc then you should use the directory
/temp/userabc/.) Note that the files in
this directory are deleted after seven days, so don't expect things
that you put here to stay here; it is just a convenient place to
store large, short-term files.
Once you have the files arranged as you want them, you must build a
CD image file. This file is an exact binary replica of the data as
it will appear on the CD-R/CD-RW. Because the CD recording program
will need to have uninterrupted, relatively high-speed access to
this file, you must create it on a locally mounted filesystem. Do
not create this file in your home directory or in
/temp/ (both of which are NFS mounted over
the network, and are subject to minor, but critical lags and lapses
that would ruin a CD being recorded). Use the
/buffer/ directory for this purpose.
You will use the mkisofs(8) utility to
create the disk image. There are a variety of command-line options
available; see the man page for details. The most common command
line form that you will probably use is:
mkisofs -frvJL -o /buffer/mycd.iso /temp/mydirectory/
(In this example, the disk image is written out to
/buffer/mycd.iso and the input is read
from the /temp/mydirectory/ directory.)
You may also occasionally wish to use the -l
flag if you intend to use the CD on Windows machines. This flag
allows Windows machines to see slightly longer (31-character) filenames
instead of the default 8.3 specified by the ISO-9660 CD standard. (This
violates the standard, but it happens to work and occasionally be useful
when working with Windows systems. Use with caution.)
You must be logged in locally (i.e., physically at the terminal) to
record a CD. Logging in remotely will not work. Also, you must make
sure that the machine is not under a heavy load; if the CD recording
process does not get sufficient CPU time and disk access to keep its
buffer full throughout the process, the CD will be ruined. (The CD
must be recorded in one continuous stream; you cannot pause in the
middle, no matter how briefly.) You can use the
uptime(1), w(1),
or top(1) commands to check the current
load averages. Once you are logged in, insert your CD-R or CD-RW into
the drive. When you are ready to record the CD, enter the following
command (choose the one that applies to you):
For CD-Rs:
cdrecord -v speed=16 dev=2,0,0 /buffer/mycd.iso
For CD-RWs:
cdrecord -v speed=4 dev=2,0,0 blank=fast /buffer/mycd.iso
Note that these commands assume "16x-capable" CD-R and a "4x-capable"
CD-RW media. Most CD-R/RW media these days can be recorded at these
speeds, but you should check first to make sure. (It will be listed
on the label and/or box somewhere.)
To use a different speed, change the speed=16
and speed=4 options accordingly.
Please note that recording a CD can take quite a while, and if you log
out or stop the recording before it is done, the CD will be ruined.
Therefore, don't start a recording session unless you know that you
will be able to wait for it to finish. (For reference, a 650MB CD
recorded at 1x will take a little over one hour. Calculate your own
recording time accordingly. Be sure to add about 1 - 2 minutes for
"session closing" [recording the "end of data" information at the
end of the CD].)
Once you have finished recording the CD, it is very important that
you delete your CD image file. The /buffer/
partition is not very big, and if you leave your file(s) in there,
other people will not be able to record CDs on that machine (and they
will consequently become angry at you, and your login name is right
there in the file ownership field...). Also, don't forget to remove
your CD! (People leave disks behind more often than you might think.)
To copy a CD, first insert the source CD, and issue the following
command:
dd if=/dev/cdrom of=/buffer/mycd.iso
Blank CD-Rs and CD-RWs can be purchased at the Co-Op and at the Campus
Computer Store. They can also be purchased (at much better prices) at
computer stores such as Fry's, CompUSA, Best Buy, etc., or at office
supply stores such as OfficeMax.
Please note that illegally copying copyrighted software, music, movies,
or other copyrighted material is a serious crime that may result in
extreme punishments. Don't do it!