This commit is contained in:
gferg 2000-05-24 14:11:34 +00:00
parent 6372b21636
commit 3526deb90a
2 changed files with 1839 additions and 1708 deletions

View File

@ -3,7 +3,7 @@
<title>CD-Writing HOWTO
<author>Winfried Trümper <tt/&lt;winni@xpilot.org&gt;/
<date>v2.8.13, 5 March 2000
<date>v2.9.1, 05 May 2000
<abstract>
This document explains how to write CD-ROMs under Linux.
</abstract>
@ -66,7 +66,7 @@ version of this document; it is always available from
You may need the handbook for your Linux-distribution to learn about
installing a new kernel. I'm really clueless about this issue when
it comes to any
it comes to any other Linux distribution than my own.
The <url url="http://www.fadden.com/cdrfaq/" name="CD-R FAQ">
is a general FAQ about compact-disk recordables (CD-R), CD-writers and
@ -86,11 +86,11 @@ and are so petite that some billions of them fit on the
disc. Thus a CD is a mass-storage medium.
The term <it>CD-R</it> is a short form of <it>CD-ROM recordable</it> and
refers to a CD that doesn't have those "microscopic pits" on its surface.
refers to a CD that doesn't have those microscopic pits on its surface.
Thus it is empty. The CD-R has a special chemical film inside into which
pits can be burned. This is done by giving the laser which normally just
senses the pits a little bit more power so it burns the pits. This action
can only be taken <bf>once</bf> on a CD-R. Although you can leave out some
can only be taken <bf>once</bf> on a CD-R. You can leave out some
areas for later writing, creating a so called <it>multi-session CD</it>.
The <it>CD-ROM rewritable</it> (short: <it>CD-RW</it>) was developed to
@ -117,27 +117,27 @@ captain.
<sect2>Adaptor vs. Adapter
<p>
The the most frequent spelling within the kernel sources is adapter
(adapter: 4283, adaptor: 154). Even more important, the module options and
aliases are naturally affected, like in "scsi_hostadapter". So in order to
achieve a consistent spelling throughout configuration examples and text, I
follow that convention regardless of the official spelling.
(adapter: 4283, adaptor: 154). Even more important, the parameters of
module options and aliases are naturally affected, like in
"scsi_hostadapter". So in order to achieve a consistent spelling throughout
configuration examples and document text, I follow that convention
regardless of the correct spelling.
<sect1>Supported CD-writers
<p>
USB CD-writers are currently not supported at all. Apart from that you can
safely assume that most newer IDE/ATAPI- and SCSI-writers work under
Linux. Newer drives are mostly MMC-compliant and therefore supported. If
Linux. Newer drives are mostly MMC-compliant and are therefore supported. If
the SCSI-version of a particular writer works, the IDE/ATAPI-version will
most likely work and vice versa. However, some people want to get a warm
and fuzzy feeling by reading the exact model of their writer in some sort
of compatibility list. That is the reason why I didn't throw the following
list out of the HOWTO:
list out of the HOWTO.
Here is a comprehensive summary of drives reported to work with cdrecord:
<tscreen><verb>
Acer: CDRW 4432A, CDRW 6206A, CD-R/RW 6X4X32
Acer: CDRW 4432A, CDRW 6206A, CD-R/RW 6X4X32, 8432A
BTC: BCE 621E (IDE)
Compro: CW-7502, CW-7502B
Creative: MK 4211, RW 4224E,
@ -209,19 +209,20 @@ Yamaha: CDR-100, CDR 102, CDR-200, CDR-200t, CDR-200tx
The detailed list of models which have been reported to work or not to work
under various Unix-like operating systems is available online from
<url url="http://www.guug.de:8080/cgi-bin/winni/lsc.pl">.
<url url="http://www.guug.de:8080/cgi-bin/winni/lsc-orig.pl">.
<!--url="http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdwriters-1.6.html" -->
If your hardware isn't supported you can still use Linux to create an image
of the CD. You may wish to do so because most burning software for DOS does
not deal with RockRidge-extensions. In a second step, you can use DOS or
Macintosh software to write the image to the CD-R.
not deal with RockRidge-extensions (Unix-like filesystems on CD-ROM). In a
second step, you can use DOS or Macintosh software to write the image to
the CD-R.
<sect1>Supported "features"
<p>
There are two classes of utilities for writing CD-Rs: the hardware drivers
There are two classes of utilities: the hardware drivers
and the data-formatters. The hardware drivers support the following
features:
@ -234,8 +235,9 @@ CD-RW no yes yes
Audio CD yes yes yes
Data CD-ROM yes yes partial
Multisession partial yes no
TAO (Track at once) yes yes yes
DAO (Disk at once) no no yes
TAO (track at once) yes yes yes
DAO (disk at once) no no yes
packet writing no no no
</verb><it>Table: </it></tscreen>
<tt>cdwrite</tt> is unmaintained software referenced only for
@ -243,20 +245,22 @@ completeness. Please use <tt>cdrecord</tt> instead, as it
supports a wider range of hardware and has significantly
more features. The main benefit of cdrdao is the ability to create audio
CDs without two seconds of silence between the tracks (writing
in disk-at-once mode).
in disk-at-once (DAO) mode).
The tools classified as "data-formatters" organize the data
on the media ("put a filesystem on it").
<tscreen><verb>
Feature mkisofs mkhybrid
----------------------------------------
ISO 9660 yes yes
RockRidge yes yes
El Torito yes yes
HFS no yes
Joliet yes yes
Multisession yes yes
Feature mkisofs mkhybrid mkvcdfs
-------------------------------------------------------
ISO 9660 yes yes no
RockRidge yes yes no
El Torito yes yes no
HFS no yes no
Joliet yes yes no
Multisession yes yes no
CD-Extra yes yes no
Video-CD no no yes
</verb><it>Table: </it></tscreen>
The most obvious difference between the ISO 9660 filesystem compared to the
@ -273,9 +277,9 @@ Other limitations of the ISO-9660-filesystem include:
<it>RockRidge</it> is an extension to allow longer filenames and a deeper
directory hierarchy for the ISO-9660 filesystem. When reading a CD-ROM with
RockRidge extensions under Linux, all the known properties of files like
owner, group, permissions, symbolic links appear (feels like a Unix
filesystem). These extensions are not available when reading the CD-ROM
under DOS or the Windows-family of operating systems.
owner, group, permissions, symbolic links appear ("feels like a Unix
filesystem"). These extensions are not available when reading the CD-ROM
under DOS or the heterogenous Windows-family of operating systems.
<it>El Torito</it> can be used to produce bootable CD-ROMs. In order to use
this feature, the BIOS of your PC must support it. Roughly speaking, the
@ -292,6 +296,8 @@ may not be accessible.)
of Windows (95, 98, NT). However, the author knows of no tool that allows long
filenames under plain DOS or Windows 3.11.
<it>Video-CDs</it> can be directly played on DVD-devices.
Section 2.8 lists the availability of the mentioned software.
@ -308,7 +314,7 @@ body of the message.
This section applies to the following types of CD-writers: SCSI, IDE/ATAPI
and the devices for the parallel port. USB CD-writers are not supported as
of March 2000. Non-SCSI writers require compatibility
of May 2000. Non-SCSI writers require compatibility
drivers, which make them appear as if they were real SCSI devices. On the
one side such a unifying strategy is easy ("everything is SCSI"), because
on the application level you can share your knowledge with other users
@ -360,46 +366,95 @@ a R, -R or -RW.
<sect1>Quickstart
<p>
This section is an attempt to provide an fast and easy description of the
configuration. Not all possible setups are coverd, but please go and figure
yourself. First of all, check the version number printed by the command
uname. It should be something like 2.0.X or 2.2.Y, where X is higher than
36 and Y is higher than 11. If you run older things or 2.1.* or 1.*.*, you
are on your own. The listing below shows a set of commands you could start
with. The commands create device file entries under /dev and attempt to
load some modules.
configuration. Not all possible setups are covered, but please go on and
try it out anyways. First of all, check the Linux kernel version printed by
the command "uname -r". It should be something like 2.0.X or 2.2.Y, where
X is higher than 36 and Y is higher than 11. If you run older versions or
the so called development kernels, you are on your own. Installing a new
kernel is as much work as fixing an old one, so I have removed all hints
you need for buggy kernels.
The listing below shows a set of commands you could start with. The
commands create device file entries under /dev unless they already exists.
<tscreen><verb>
test `whoami` = 'root' || echo "You must be root to execute the commands."
cd /dev/
umask -S u=rwx,g=rwx,o-rwx
./MAKEDEV loop || for i in 0 1 2 3 4 5 6 7; do mknod loop$i c 7 $i; done
./MAKEDEV loop || for i in 0 1 2 3 4 5 6 7; do mknod loop$i b 7 $i; done
./MAKEDEV sg || for i in 0 1 2 3 4 5 6 7; do mknod sg$i c 21 $i; done
for i in ide-scsi scsi_mod sg sr_mod loop
do
modprobe $i || grep loop /proc/modules || echo "Module $i missing."
done
cdrecord -scanbus
</verb><it>Listing: creating of devicefiles and loading of modules</it></tscreen>
</verb><it>Listing: creating of devicefiles</it></tscreen>
Hardware access is usally implemented through device files under Linux. So
before any other thing you make sure the necessary entries do exists in the
before any other thing you make sure those files do exists in the
directory /dev. Still nobody could give me a compelling reason why this has
not been automated through techniques like the device filesystem
(devfs). The devfs is available for years know, brings safer (!) and far
(devfs). The devfs is available for years know, brings a safer (!) and a far
clearer naming of devices and makes the device entries appear automatically
under /dev. Some people argue devfs is not the perfect solution, but they
do not come up with anything better, not even something comparable and last
but least nothing available and tested now. Lets start to use devfs!
under /dev. Some prominent people argue devfs is not the perfect solution,
but they do not come up with anything better, not even something comparable
and last but least nothing available and tested now. Lets start to use
devfs, so I can remove the above commands from this document. (<url
url="http://www.atnf.CSIRO.AU/~rgooch/linux/kernel-patches.html">)
Please read the next chapter if modules are reported to be missing on your
system or consult the documentation of your Linux-distribution. If you are
Next thing to ensure is, that the Linux kernel is equiped with the
necessary drivers. The following commands check various files for the
presence of drivers in the running Linux kernel. Usally the command
"cdrecord -scanbus" should trigger an automatic loading of all drivers. In
case a driver is not present in the kernel afterwards, it is reported and
the modularized driver (module) is manually loaded through insmod.
<tscreen><verb>
test `whoami` = 'root' || echo "You must be root to execute the commands."
cdrecord -scanbus > /dev/null
if ! (pidof kerneld || test -f "/proc/sys/kernel/modprobe"); then
echo "Neither kerneld nor kmod are running to automatically load modules".
fi
report_no_autoload() {
echo "Ensure the module $1 is loaded automatically next time."
}
if test ! -f "/proc/scsi/scsi"; then
report_no_autoload scsi_mod && insmod scsi_mod
fi
if ! grep "^........ sg_" /proc/ksyms > /dev/null; then
report_no_autoload sg && insmod sg
fi
if ! grep "^........ sr_" /proc/ksyms > /dev/null; then
report_no_autoload sr_mod && insmod sr_mod
fi
if ! grep "^........ loop_" /proc/ksyms > /dev/null; then
report_no_autoload loop && insmod loop
fi
if ! grep iso9660 /proc/filesystems > /dev/null; then
report_no_autoload iso9660 && insmod iso9660
fi
echo "The following is only needed for IDE/ATAPI CD-writers."
if ! grep ide-scsi /proc/ide/drivers > /dev/null; then
report_no_autoload ide-scsi && insmod ide-scsi
fi
cdrecord -scanbus
</verb><it>Listing: Testing for drivers</it></tscreen>
Please read the next chapter if insmod complains about missing module files.
If you are
in text mode (console), the loading of modules may cause some messages to
be printed on your screen. If you are in graphics mode (X11, KDE, Gnome),
you can print this messages with the command dmesg. To have the modules
loaded, you should either list them in a configuration file like
/etc/modules or run the daemons kerneld or kmod, which both load the
required modules automatically for you when the kernel sees a needs for
them.
you can recall these messages with the command dmesg.
There are several ways to load the modules next time you start
up your Linux system:
<tscreen><verb>
(1) Put the relevant insmod command into the startup sequence
(a shell script named rc.local or equivalent).
(2a) Run kerneld or kmod and
(2b) configure them in /etc/modules.conf (to be more precise,
you configure the utility modprobe, which is called by the daemons)
</verb></tscreen>
People with a SCSI-writer can skip the rest of this section, because
cdrecord will most likely already detect their hardware. If not, then
@ -408,7 +463,7 @@ improve the section about SCSI-writers.
Now to the people with CD-writers for IDE/ATAPI. As
written in the previous chapter, you have to load the compatibility driver
ide-scsi. But this driver can only access your CD-Writer, if no other
ide-scsi. But this driver can only access your CD-Writer if no other
driver has already done so. In other words, you have to tell the
regular IDE driver to leave your CD-writer unrecognized, so the ide-scsi
driver can grab it.
@ -423,12 +478,20 @@ hdd = IDE bus/connector 1 slave device
The table above shows the relation of device file names and the placing of
devices on the IDE busses. The device file name representing your CD-Writer
has to be passed to the driver in the Linux kernel. Example: hdb=ide-scsi.
This setting should be placed into lilo.conf or chos.conf if the driver is
statically compiled into your kernel, which is the most common
setup. The next two listings show example configurations. All other variants
Such a setting should be added to lilo.conf or chos.conf if the driver is
statically compiled into your kernel, which seems to be the most common
setup. If you need to pass more than one parameter to the kernel,
then seperate them with spaces (like shown in the chos example). The next
two listings show example configurations containing more lines than just
the relevant append-line. Please note the append- and cmdline-entries
are image-specific (ie. don't add them immediatly at the top).
<!--
All other variants
like hdb=ignore or hdb=none will not do what you need. "Ignore" just means
"no autoprobing" and "none" will even block access to the device for
ide-scsi.
-->
<tscreen><verb>
image=/boot/zImage-2.2.14
@ -446,30 +509,78 @@ linux "Linux 2.1.14" {
If the driver for IDE/ATAPI CD-ROMs is loaded as a module, then the above
won't make any difference to you, but make sure you include the
options-line from the next listing. The last three lines of that listing are
generally suggested to further automate the loading of the required
modules. If you do not run the kernel daemon to trigger module loading
automatically, then add the names of the modules to the files /etc/modules
(or whatever strategy your Linux distribution uses).
options-line from the next listing. The last three lines of that listing
are generally suggested to further automate the loading of the required
modules.
<tscreen><verb>
options ide-cd ignore=hdb # tell the ide-cd module to ignore hdb
alias scd0 sr_mod # load sr_mod upon access of scd0
pre-install sg modprobe ide-scsi # before sg, load ide-scsi
pre-install sr_mod modprobe ide-scsi # before sr_mod, load ide-scsi
#pre-install ide-scsi modprobe imm # uncomment for some ZIP drives only
pre-install sg modprobe ide-scsi # load ide-scsi before sg
pre-install sr_mod modprobe ide-scsi # load ide-scsi before sr_mod
pre-install ide-scsi modprobe ide-cd # load ide-cd before ide-scsi
</verb><it>Listing: Example configuration for /etc/modules.conf</it></tscreen>
Remember you have to access your CD-writer through the device file
If your CD-writer is the only CD-ROM attached to your machine, then
remember you have to access the CD-ROM in the writer through the device file
/dev/scd× where ×=0,..,8. You may want to change the symbolic name cdrom to
point to your actual device file name. The listing below shows the command to
point to the new device file name. The listing below shows the command to
achieve this with the example scd0.
<tscreen><verb>
cd /dev && rm cdrom && ln -s scd0 cdrom
</verb><it>Listing: Making cdrom a symbolic name for scd0</it></tscreen>
If your CD-writer and CD-ROM-drive are two different devices, then don't
change the cdrom symlink.
<sect2>Compiling missing kernel modules
<!--
<sect2>Special notes for kernel versions up to 2.2.9
<p>
Up to kernel version 2.2.9, don't enable CONFIG_SCSI_MULTI_LUN ('probe for
multiple luns') and ide-scsi support at the same time, there is an
ide-scsi bug which prevents this.
<p>
Some users reported conflicts with pre-compiled binaries and the
2.2-release. This is a problem with the Linux kernel. Possible solutions:
<itemize>
<item>It may go away if you recompile cdrecord so that it adopts to the actual
values in linux/include/scsi/sg.h.
These values must be the values of the running kernel due to the
dumb sg user interface.
<item>It may be caused by a loadable sg driver which cannot
get enough memory that is suitable for DMA (Kernel releases up to 2.2.5).
</itemize>
-->
<sect3>Special notes about SCSI CD-writers
<p>
Please make sure that your writer is recognized by the BIOS of your
computer. It makes no sense to proceed if your computer does not accept the
hardware (the fact that it doesn't spit it out should not be interpreted as
a sign of confirmation; a message on the screen is required).
If you plan to connect your SCSI through the parallel port (not to
confuse with the IDE drives for the parallel port), you need a special
active cable and a special kernel driver. Read <url
url="http://www.torque.net/parport/parscsi.html"> to learn more about this
option.
<sect3>Special notes about CD-writers for the parallel port
<p>
I have no clue about this, sorry. Please read <url
url="http://www.torque.net/parport/paride.html"> or your local file
/usr/src/linux/Documentation/paride.txt.
<sect2>Compiling missing kernel modules (optional)
<p>
The Linux kernel can be equipped with drivers for various features. You can
@ -568,55 +679,6 @@ same physical device at the same time (if you still have 2.0.36, read
below).
-->
<sect2>Special notes for kernel versions up to 2.2.9
<p>
Up to kernel version 2.2.9, don't enable CONFIG_SCSI_MULTI_LUN ('probe for
multiple luns') and ide-scsi support at the same time, there is an
ide-scsi bug that prevents this.
<p>
Some users reported conflicts with pre-compiled binaries and the
2.2-release. This is a problem with the Linux kernel. Possible solutions:
<itemize>
<item>It may go away if you recompile cdrecord so that it adopts to the actual
values in linux/include/scsi/sg.h.
These values must be the values of the running kernel due to the
dumb sg user interface.
<item>It may be caused by a loadable sg driver which cannot
get enough memory that is suitable for DMA (Kernel releases up to 2.2.5).
</itemize>
<sect2>Special notes about SCSI CD-writers
<p>
Please make sure that your writer is recognized by the BIOS of your
computer. It makes no sense to proceed if your computer does not accept the
hardware (the fact that it doesn't spit it out should not be interpreted as
a sign of confirmation; a message on the screen is required).
If you plan to connect your SCSI through the parallel port (not to
confuse with the IDE drives for the parallel port), you need a special
active cable and a special kernel driver. Read <url
url="http://www.torque.net/parport/parscsi.html"> to learn more about this
option.
<sect2>Special notes about CD-writers for the parallel port
<p>
I have no clue about this, sorry. Please read <url
url="http://www.torque.net/parport/paride.html"> or your local file
/usr/src/linux/Documentation/paride.txt.
<!--
for i in 0 1 2 3 4 5 6 7
do
mknod sg$i c 21 $i
done
-->
<sect1>Get the user software for burning CD-Rs
<p>
A more detailed survey of tools related to produce CD-ROMs is available from
@ -637,13 +699,14 @@ To write images to the CD-R, you need one of the following software packages:
<quote>
<url url="ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/"> (cdrecord) <p>
<url url="http://www.ping.de/sites/daneb/cdrdao.html"> (cdrdao) <p>
<url url="http://www.munich-vision.de/vcd/"> (mkvcdfs)
</quote>
Don't trust the man page of (old) <tt>mkisofs</tt> which states you need
version 1.5 of <tt>cdwrite</tt>. Just use cdrecord and you are fine.
Please note that newer versions of cdrecord ship with an enhanced version
of mkisofs and some extra tools in the subdirectory misc/ (readcd, isosize)
not found elsewhere.
Don't trust the man page of old versions of <tt>mkisofs</tt> which state
you need version 1.5 of <tt>cdwrite</tt>. Just use cdrecord and you are
fine. Please note that newer versions of cdrecord ship with an enhanced
version of mkisofs and some extra tools in the subdirectory misc/ (readcd,
isosize) not found elsewhere.
<sect2>Graphical user interfaces (optional)
@ -700,13 +763,11 @@ This chapter describes the steps for data and audio CDs in greater detail.
<p>
Note that collecting the data to put onto a CD usually takes longer than one
expects. Consider that missing files cannot be added once the CD is
written and fixated.
<!--
This is also true for CD-RW, which can currently
only be rewritten as a whole. If you don't fixate the CD and produce
a so called multi-session CD-ROM, you waste space for the table of
contents (TOC).
-->
written and fixated. This is also true for CD-RW, which can currently
only be rewritten as a whole. Using the multi-session feature is no
option for single files, as it consumes much space for a new complete
table of contents (TOC). UDF is not ready yet for Linux.
Also keep in mind that a certain amount of the free space of a CD is used
for storing the information of the ISO-9660-filesystem (usually a few MB).
620 MB data will always fit on a 650 MB CD-R.
@ -720,10 +781,10 @@ stored on the medium.
The usual utilities for creating filesystems on hard disk partitions write an
empty filesystem onto them, which is then mounted and filled with files by
the user as they need it. A writable CD is only writable once so if we
the users as they need it. A writable CD is only writable once so if we
wrote an empty filesystem to it, it would get formatted and remain
completely empty forever. This is also true for rewritable media as you
cannot change arbitrary sectors; you must erase their whole content.
cannot change arbitrary sectors yet; you must erase their whole content.
So what we need is a tool that creates the filesystem while copying the
files to the CD. This tool is called <tt>mkisofs</tt>. A sample usage
@ -746,7 +807,7 @@ unless you really know what you're doing
DOS to ensure the highest possible compatibility. In case of naming conflicts
(different files have the same 8.3 name), numbers are used in the filenames
and information about the chosen filename is printed via STDERR (usually
the screen). Don't panic: Under Linux you will never see these 8.3
the screen). Don't panic: Under Linux you will never see these odd 8.3
filenames because Linux makes use of the Rock Ridge extensions which
contain the original file information (permissions, filename, etc.).
@ -759,12 +820,12 @@ to the writer device. There are three reasons:
<item>On slow machines it would not be reliable (see section 4.).
</itemize>
There is a method to write a CD-R in one go which will be described below.
There is a method to write a CD-R in one go, which will be described below.
One also could think of creating an extra partition and writing the image
to that partition instead to a file. I vote against such a strategy because
if you write to the wrong partition (due to a typo), you can lose your
complete Linux system (read: that happened to me...). Furthermore, it is a
if you write to the wrong partition due to a typo, you can lose your
complete Linux system. Read: that happened to me... Furthermore, it is a
waste of disk space because the CD-image is temporary data that can be
deleted after writing the CD. However, using raw partitions saves you the
time for deleting files of 650 MB size.
@ -810,6 +871,12 @@ harder to read.
<sect2>Write the CD-image to a CD
<p>
This section only covers writing data CDs in TAO mode, because it is the
most frequently used mode for data. For more information about the
differences of TAO and DAO, please see the chapter about audio CD-Rs. If
you use DAO mode with the tool cdrdao, then remember to add a dummy audio
track at the end of the TOC file (see the README).
Not much more left to do. If you haven't already tried, it's a good time for
the command
@ -820,19 +887,18 @@ cdrecord -scanbus
This will tell you to which SCSI device your CD-writer is attached to. All
other methods of guessing the information printed so nicely by cdrecord
have been removed from the HOWTO (especially the somewhat dangerous naming
scheme for generic SCSI devices).
scheme for generic SCSI devices under Linux).
Before showing you the last command, let me warn you that CD-writers want
to be fed with a constant stream of data because they only have small
data buffers. So the process of writing the CD image to the CD must not be
to be fed with a constant stream of data. So the process of writing the CD image to the CD must not be
interrupted or a corrupt CD will result. It's easy to interrupt the
data stream by deleting a very large file. Example: if you delete a
previous image of 650 Mbytes size, the kernel must update information about
data stream by deleting a very large file. Example: if you delete an old
CD-image of 650 Mbytes size, the kernel must update information about
650,000 blocks on the hard disk (assuming you have a block size of 1 Kbyte for
your filesystem). That takes some time and is very likely to slow down
disk activity long enough for the data stream to pause for a few seconds.
However, reading mail, browsing the web, or even compiling a kernel
generally will not affect the writing process (on modern machines).
generally will not affect the writing process on modern machines.
Please note that no writer can re-position its laser and continue at
the original spot on the CD when it gets disturbed. Therefore any strong
@ -880,7 +946,7 @@ shell&gt; [ "0$IMG_SIZE" -ne 0 ] && mkisofs -r private_collection/ \
The first command is an empty run to determine the size of the image (you
need the mkisofs from the cdrecord distribution for this to work). Maybe
your writer does not need to know the size of the image to be written, so
you can leave this out. The printed size must be passed as a
you can leave this dry run out. The printed size must be passed as a
tsize-parameter to cdrecord (it is stored in the environment variable
IMG_SIZE). The second command is a sequence of mkisofs and cdrecord, coupled
via a pipe.
@ -888,14 +954,17 @@ via a pipe.
<sect1>Writing audio CDs
<p>
Writing audio CDs is very similar to the steps described above for data
CDs. You can choose between two techniques: DAO or TAO. TAO (track at
once) is less suitable for music, because you will hear clicks between the
individual tracks. It is described first anyways, because it is a little bit
easier to deal with and DAO is not available for all drives yet.
Writing audio CDs is very similar to the steps described
above for data CDs. There are two main differences. One, the audio CD consists of
audio tracks, which are organized as separate images. So if you want to
have ten tracks on your CD, you have to make ten images. The other
difference is that the format of the images is not ISO-9660 (or whatever
filesystem you prefer), but it is "16 bit stereo samples in PCM coding at
44100 samples/second (44.1 kHz)".
The main difference compared to writing data CD-Rs is the format of the
images. ISO-9660 (or whatever filesystem you prefer) would not be suitable,
because no audio CD player is able to deal with filesystems. Instead the
audio data must be writen as "16 bit stereo samples in PCM coding at 44100
samples/second (44.1 kHz)".
One utility to convert your sound files into the required format is sox.
Its usage is straightforward:
@ -906,11 +975,23 @@ shell&gt; sox killing-my-software.wav killing-my-software.cdr
This command would convert the song killing-my-software from the WAV-format
into the CDR audio-format. See the man page for sox for more details about
formats and filename-extensions sox recognizes. Because the output of the conversion
takes up much disk space, it was made a built-in feature of cdrecord for the
formats WAV and AU. So as long as your sound files have the extensions .wav
or .au (and the sample rate "stereo, 16 bit, 44.1 kHz"), you can use them as
images without manual conversion.
formats and filename-extensions sox recognizes. Because the output of the
manual conversion takes up much disk space, it was made a built-in feature
of cdrecord for the sound formats WAV and AU. So as long as your sound
files have the extensions .wav or .au (and the sample rate "stereo, 16 bit,
44.1 kHz"), you can use them as audio tracks without manual conversion into
the CDR format. However, cdrecord requires
the size of the sound data to be a integer multiple of 2352 and to be
greater than 705,600 bytes, which is not fullfilled for some WAV files. For
such files the usage of sox is needed to pad the audio data up to 2352
bytes.
<sect2>Writing audio CDs (TAO)
<p>
An audio CD consists of audio tracks, which are organized as separate
images when using TAO mode. So if you want to have ten tracks on your CD,
you have to make ten images.
Cdrecord writes CD images as audio tracks if the option -audio is
specified. The other options are identical to those used for writing
@ -923,24 +1004,28 @@ shell&gt; cdrecord -v speed=2 dev=0,6,0 -audio track1.wav track2.wav...
shell&gt; cdrecord -v speed=2 dev=0,6,0 -audio track1.au track2.au...
</verb></tscreen>
One notable exception are MPEG Layer 3 files, which can be converted to the
CD format with the command "mpg123 --cdr -s track1.mp3 > track1.cdr". The
option --cdr ensures the track is encoded in the required format (see
above). Converting from WAV to MPEG can be done with LAME for WAV-files
One notable format not directly readable by cdrecord is MPEG Layer 3. To
convert files in this format to the CDR-format, you can use the command
"mpg123 --cdr - track1.mp3 > track1.cdr". The option --cdr ensures the
track is encoded in the required format (see above). Older versions of
mpg123 require -s instead of the plain - to write to stdout. The other
direction (converting from WAV to MPEG) can be done with LAME for WAV-files
(extract the track with cdda2wav from the audio CD and encode it into MP3
with the help of LAME). To create a CD-R from a whole bunch of MP3-files,
you can use the following command sequence:
with the help of LAME).
To create a CD-R from a whole bunch of MP3-files, you can use the following
command sequence:
<tscreen><verb>
for I in *.mp3
do
mpg123 --cdr -s "$I" | cdrecord -audio -pad -swab -nofix -
mpg123 --cdr - "$I" | cdrecord -audio -pad -swab -nofix -
done
cdrecord -fix
</verb></tscreen>
Depending on the speed of your machine, you may want to slow down writing
to "speed=1" (cdrecord-Option). If you use "speed=4", your machine must be
to "speed=1" (cdrecord option). If you use "speed=4", your machine must be
able to play the MP3-file at quadruple speed. mpg123 consumes much
CPU-time! If you are in doubt, try an empty run with -dummy (keeps the
laser switched off). By doing this, you will produce an audio CD which has a 2
@ -953,16 +1038,27 @@ use disk-at-once (DAO) recording versus the (individual)
track-at-once (TAO) recording described above. Support for DAO is currently
most advanced in cdrdao. Please see its homepage for details.
Using the parameter read-cd, you are even able to produce 1:1 copies of
audio CDs.
If you master the CD in DAO mode, then you use a monolithic image (sound
file) and control track information with a configuration file.
<tscreen><verb>
CD_DA
TRACK AUDIO
FILE "live.wav" 0 5:0:0
INDEX 3:0:0
TRACK AUDIO
FILE "live.wav" 5:0:0 5:0:0
TRACK AUDIO
FILE "live.wav" 10:0:0 5:0:0
INDEX 2:0:0
</verb></tscreen>
<sect1>Mixed mode CD-ROMs
<p>
There is not much to say about this topic. Just indicate the type of the (subse
quent) images
with the options -data and -audio. Example:
There is not much to say about this topic. Just indicate the type of the
(subse quent) images with the options -data and -audio. Example:
<tscreen><verb>
cdrecord -v dev=0,6,0 -data cd_image -audio track*.cdr
@ -987,7 +1083,7 @@ If you feed cdrecord directly from mkisofs, then disk intensive processes
such as updating the <it>locate</it> database lower the maximum flow rate
and may corrupt the CD. You better check such processes are not started
via <tt>cron</tt>, <tt>at</tt> or <tt>anacron</tt> while you burn
CD-Rs.
CD-Rs on older machines.
<sect1>Has file fragmentation a bad impact on the throughput?
<p>
@ -1067,9 +1163,9 @@ startup. For example:
/dev/cdrom /cdrom ext2 defaults,ro 0 0
</verb></tscreen>
The first 0 means "don't include in dumps", the second (=important) one
means "don't check for errors on startup" (fsck will fail to check the CD
for errors).
The first 0 means "don't include in dumps" (backup), the second
(=important) one means "don't check for errors on startup" (fsck would fail
to check the CD for errors).
<sect1>How to read the tracks from audio CDs?
@ -1120,10 +1216,25 @@ end of the chain. Inserting new SCSI devices into an existing chain
disturbs the naming of devices (directory /dev) and may destroy the
complete content of your hard disk.
Some kernel versions do not like re-scanning the SCSI bus at all and your
system may freeze solid when trying out the above. You have been warned.
<sect1>Is it possible to make a 1:1 copy of a data CD?
<p>
<!-- FIXME: this is highly unclear -->
<!-- FIXME: add this
The correct answer is yes and no. Yes, you can make a 1:1 copy of an
ISO data image. You cannot make a 1:1 copy if there is any
copy-protection in the means of subcode data - - at least, not without a
drive that can do MMC-DAO-Raw-Writing. Many Plextors can do this.
Yamahas can't.
-->
<!-- FIXME: add this:
cdrdao copy - -source-device 0,2,0 - -device 0,5,0 - -buffers 64
-->
Yes. But you should be aware of the fact that any errors while reading the
original (due to dust or scratches) will result in a defective copy.
Please note that both methods will fail on audio CDs! You have to use cdrdao or
@ -1159,7 +1270,7 @@ same result as dd, but reads sectors on the CD-ROM several times in case
of errors.
<sect1>Can Linux read Joliet CD-ROMs?
<sect1>Can Linux read Joliet CD-ROMs? (obsolete answer)
<p>
Yes. Newer Kernels (2.0.36 and the upcoming 2.2) have built-in support for
the joliet format. Remember you have to use both options in your
@ -1185,6 +1296,19 @@ Use <tt>bzip2</tt> instead of any other compressor like <tt>gzip</tt> or
<tt>pkzip</tt>. It will save you up to 30% of disk-space for larger
(&gt;100kb) files. You can download it from
<!-- FIXME: add this
If you're storing images, such as JPEGS, many people set the quality
factor of the JPEG much higher than needed. This produces larger than
necessary files for only a marginally better image. By reducing the
quality down to about 75% from 95%, you can gain 40 to 50% more space.
The difference in image clarity will be negligible.
If an image was created with a high quality value, it can be changed by
using the command:
djpeg infile.jpg | cjpeg -smooth 5 -quality 75 -output outfile.jpg
-->
<quote>
<url url="http://www.muraroa.demon.co.uk/"><p>
</quote>
@ -1238,7 +1362,7 @@ page 206 (<url url="http://www.heise.de/">).
Some details about the bootable RedHat CD-ROM is available from <url url="http://members.bellatlantic.net/~smithrod/rhjol-technical.html">.
<sect1>How to make CD-ROMs writable somehow?
<sect1>How to make CD-ROMs writable like a hard disk?
<p>
There is an <it>overlay filesystem</it> available for Linux, which is
mounted over the CD-ROM and intercepts all writing operations. New and
@ -1248,33 +1372,25 @@ url="http://home.att.net/~artnaseef/ovlfs/ovlfs.html">.
If that is not enough for your needs: wait for the UDF-filesystem to be
supported by Linux or help developing it (see <url
url="http://trylinux.com/projects/udf/">.
url="http://trylinux.com/projects/udf/">. At the moment only reading of
CD-media is supported due to a limitation in the CD-ROM drivers of the
Linux kernel.
<sect1>Is it possible to use several writers at once?
<p>
Yes. However, it has been only tested with two writers yet. You need either
a recent version of the Linux kernel (2.2.10 as of writing) or a
a kernel patch for more buffers in the SCSI generic driver
(<url url="ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha">; works up to
2.2.5).
Yes. It is reported to work with at least 3 writers at full speed (6x) on a
PC with 233 Mhz and a single SCSI bus running kernel 2.2.12. You need
either a recent version of the Linux kernel (2.2.12 or higher).
<!--
or a a
kernel patch to get enough buffers in the SCSI generic driver (<url
url="ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha">; works up to 2.2.5).
-->
<sect1>Which media is the best?
<p>
The German computer magazine "c't" had a list of tips regarding the blank
CD-Rs in their November 1996 issue:
<itemize>
<item> "No name" discs are generally not of highest quality
and should better not be used.
<item> If a recordable CD is defective, this is likely to apply to the
whole batch (if you bought more than one at a time); maybe you are lucky
and can at least use the first 500MB of such CD-Rs ...
<item> Don't touch the CD-Rs at their shimmering side before writing.
</itemize>
<sect1>What about Solaris, *BSD, AIX, HP-UX, etc.?
<sect1>What about Solaris, *BSD, AIX, HP-UX, etc.? Is my variant of Unix supported?
<p>
Only chapter 2 is Linux-specific. You can apply chapter 3 and 4 even if you
run another family of operating systems than Linux. Please see the files
@ -1282,6 +1398,11 @@ README.NetBSD, README.aix, README.hpux, README.next,
README.solaris, README.sunos, README.vms or README.xxxBSD from the
cdrecord-distribution.
Probably yes. Compile cdrecord for your platform and issue the command
"cdrecord -scanbus". Read the README.* file for your Unix distributed with
the sources of cdrecord. However, not all variants of Unix can read the
RockRidge, Joliet or HFS extensions on your newly written CD-R.
<sect1>Where to store the local configuration permanently?
<p>
@ -1391,7 +1512,7 @@ parameter.
First of all, the image for a multi-session CD must be formatted using the
ISO-9660 filesystem using RockRidge-extensions. And you must use the option
-multi for cdrecord as long as you want to add further sessions. So at
least for the first session, you must use -multi.
least for the first session, you must specify the option -multi.
The images for the second and subsequent sessions are a little bit more
complicated to generate. Mkisofs must know where the free space on the
@ -1411,7 +1532,7 @@ distributed with cdrecord.
<sect1>Should I use the SCSI adapter shipped with the writer?
<p>
Most CD-writer docs say to use a separate SCSI bus if going from a CD-ROM
to a CD-writer and i have seen this myself in the following scenario:
to a CD-writer and I have seen this myself in the following scenario:
Adaptec 2940UW SCSI card, a 24x SCSI CD-ROM and a 4x4 SCSI CD-writer. When
I got the CD-writer, it came with its own ISA SCSI card which could only
@ -1446,7 +1567,7 @@ Your ftp-client will notice when cdrecord wants to read from the file and
will start transfering data from the ftp-host.
<sect1>I get a "crack" sound at the end of the each track
<sect1>I hear a crack or click sound at the end of the each track.
<p>
You have to use disk-at-once mode (DAO) to get rid of the cracks.
@ -1466,14 +1587,6 @@ chmod 4111 /usr/bin/cdrecord
</verb></tscreen>
<sect1>Is my variant of Unix supported?
<p>
Probably yes. Compile cdrecord for your platform and issue the command
"cdrecord -scanbus". Read the README.* file for your Unix distributed with
the sources of cdrecord. However, not all variants of Unix can read the
RockRidge, Joliet or HFS extensions on your newly written CD-R.
<sect1>Where do I get the "Yellow Book" and "Orange Book" standards?
<p>
You get the printed specifications from Philips and they are expensive.
@ -1481,10 +1594,19 @@ You get the printed specifications from Philips and they are expensive.
<sect1>I've been searching for information on burning Video-CD under Linux.
<p>
Me, too.
Here you can find utilities for creation of MPEG videos and Video-CDs:
<url url="http://www.mainconcept.de/">
<url url="http://www.munich-vision.de/lavtools/index.html">
Political correct people mention the Berkeley-tools and other
YUV-strategies. Their usage is complicated, takes much time and
harddisk-space and gives you no audio track. I recommend to
use conceptually higher level applications like the ones mentioned
above.
<sect1>Which is easier to set up IDE or SCSI.
<sect1>Which is easier to set up, IDE or SCSI?
<p>
SCSI CD-writers are slightly easier to set up with regard to CD-writing
under Linux. And they are reported to have better error recovery. If that
@ -1503,7 +1625,7 @@ software under Linux.
It will finish writing. So you can just couple your favourite backup tool
with cdrecord using a pipe, like in "bru -size=640m -f - | cdrecord
dev=0,1,0 speed=2 -". You have to take special care within the backup
utility.
utility if the backup spans multiple CD-Rs.
<sect1>Is there an equivalent to ignore=hdX for the ide-scsi emulation?
@ -1516,7 +1638,8 @@ Linux kernel sources.
<p>
Good question.
<sect1>Which format to choose for a platform independant CD-ROM.
<sect1>Which format to choose for a platform independant CD-ROM?
<p>
A CD-ROM to be read by all systems can only use the plain ISO 9660
format. That means stupid 8+3 filenames from old MS-DOS and without any HFS
@ -1527,7 +1650,11 @@ operating systems.
<sect1>Is multi-session for audio tracks possible?
<p>
I doubt usal CD-players are able to deal with that.
Audio CD-players are only able to deal with audio tracks stored in the first
session. In other words, you cannot add audio tracks using subsequent
sessions. However, writing data tracks into the second session effectively
hides them from audio CD-players. This way you prevent having an silent
track on your mixed mode CD (audio and data mixed).
@ -1548,8 +1675,9 @@ with (=under another operating system). Concretely:
If "it doesn't even work" with the accompanied software you have a hardware
conflict or defective hardware. If it works and you use loadlin to boot
Linux, then that is your problem. Loadlin makes a warm-boot with most of
the hardware already initialized and that can confuse the Linux kernel.
Linux, then that is a problem with loadlin. Loadlin makes a warm-boot with
most of the hardware already initialized and that can confuse the Linux
kernel.
<sect1>Error-message: No read access for 'dev=0,6,0'.
@ -1564,6 +1692,9 @@ following:
cdrecord: No such file or directory. No read access for 'dev=0,6,0'.
</verb></tscreen>
The solution is to install a newer C-library.
<sect1>It doesn't work: under DOS and friends
<p>
Try to use Linux. Installation and configuration of SCSI drivers

View File

@ -203,7 +203,7 @@ Answers basic questions on how to connect your Linux box to cable modem
or cable Internet provider.
<item><htmlurl url="CD-Writing-HOWTO.html" name="CD-Writing-HOWTO">,
<BF/CD-Writing HOWTO/ <p><em/Updated: March 2000/.
<BF/CD-Writing HOWTO/ <p><em/Updated: May 2000/.
Explains how to write CD-ROMs under Linux.
<item><htmlurl url="CDROM-HOWTO.html" name="CDROM-HOWTO">,