Addressing the drive:
Print the list of accessible CD, DVD, or BD drives to standard output.
Drives might be inaccessible if the user lacks of permissions to use them
or if the drive is in use by another program.
Each accessible drive is shown by a line like:
0 -dev /dev/sr0 rwrw-- : TSSTcorp CDDVDW SH-S203B
The libburn address of this drive is /dev/sr0. TSSTcorp is the name of the vendor (in this case: Toshiba Samsung Storage Technologies Corporation), CDDVDW SH-S203B is the model name (in this case: a DVD burner).
Afterwards end emulation without performing any further drive operation.
Set the libburn address of the drive to be used.
E.g. on GNU/Linux: dev=/dev/sr0
E.g. on FreeBSD: dev=/dev/cd0
E.g. on Solaris: dev=/dev/rdsk/c2t2d0s2
See also above "Drive preparation and addressing".
The medium in the drive should not be mounted or be otherwise in use.
This option will only get into effect if a track source, a blank= option, or a drive inquiry option is given. Else it will lead to a SORRY event and normally cause a non-zero exit value.
Inquiring drive and media:
|Print to standard output: vendor, model name, and firmware revision of the drive.|
|Print unconditionally that the drive supports burnfree, SAO, and TAO. Also print the output of option -inq.|
Print the output of -checkdrive, the most capable profile of the medium
in the drive, the list of profiles which are supported by the drive,
whether it is erasable (i.e. can be blanked), the media manufacturer, and
the medium product name.
Profiles are usage models, which are often tied to a particular media type (e.g. CD-RW), but may also apply to a family of media. E.g. profile CD-ROM applies to all CD media which contain data.
Print a table of content of the medium in the drive. The output is not
cdrecord option -toc, but rather the one of xorriso command -toc.
It lists the address, vendor, model name, and firmware revision of the drive.
About the medium it tells product name and manufacturer, whether there is already content written, and if so, whether the medium is closed or appendable. Appendable media can take another session. The amount of readable and writable data is told. If there are sessions, then their start block address and size is reported. If a session contains an ISO 9660 filesystem, then its Volume Id is reported. If the medium is writable, then the next writable block address is reported.
If not option --grow_overwriteable_iso is given or no ISO 9660 file system is present on the medium, then overwritable media are reported as being blank. This is due to the fact that they can be written from scratch without further preparation, and that MMC does not distinguish between data written by the most previous burn run and older data which have not been overwritten by that burn run. Consequently, these media are reported with 0 readable blocks, although all their writable blocks normally are readable, too.
Print the argument text for option -C of programs mkisofs, genisoimage,
or xorrisofs. It consists of two numbers separated by a comma.
The first number tells the first block of the first track of the last recorded session. This is also the address used by default when operating systems mount a medium with e.g. ISO 9660 filesystem.
The second number tells the next writable address, where xorrecord will begin to write the next session.
This option is only valid for written, appendable media. In all other cases it will yield no output text but will abort the program with non-zero exit value.
|Settings for the burn run:|
A burn run requires exactly one track source address argument, which
tells from where to read the data wich shall be put into the upcomming
session. The medium state must be either blank or appendable.
Track source may be "-" for standard input or the address of a readable file of any type except directories. Nearly all media types accept a track source with unpredictable byte count, like standard input or named pipes. Nevertheless, DVD-R DL and DVD-RW blanked by mode deformat_quickest demand exact in-advance reservation of the track size, so that they either need to be read from a source of predictable length, or need to be accompanied by option tsize= or by option -isosize.
Several options expect a size value as argument. A number with a trailing letter "b" or without a trailing letter is a plain byte count. Other trailing letters cause multiplication of the given number by a scaling factor:
"k" or "K" = 1024 , "m" or "M" = 1024k , "g" or "G" = 1024m , "s" or "S" = 2048
E.g. tsize=234567s means a size of 234567 * 2048 = 480393216 bytes.
Blank a CD-RW or DVD-RW to make it re-usable from scratch.
Format a DVD-RW, DVD+RW, DVD-RAM, BD-R, or BD-RE if not yet formatted.
This operation normally makes any recorded data on the medium unreadable. It is combinable with burning in the same run of xorrecord, or it may be performed without a track source, leaving the medium empty.
The mode given with blank= selects the particular behavior:
This option keeps CD, unformatted DVD-R[W], DVD+R, or BD-R appendable
after the current session has been written.
Without it the disc gets closed and may not be written any more - unless it
is a -RW and gets blanked, which causes loss of its content.
This option cannot be applied to DVD-R DL or to DVD-RW which were blanked by mode "deformat_quickest". Option --multi_if_possible may automatically recognize and handle this situation.
In order to have all filesystem content accessible, the eventual ISO-9660 filesystem of a follow-up session needs to be prepared in a special way by the filesystem formatter program. mkisofs, genisoimage, and xorrisofs expect particular info about the situation which can be retrieved by xorrecord option -msinfo.
With overwriteable DVD or BD media, -multi cannot mark the end of the session. So when adding a new session, this end has to be determined from the payload. Currently only ISO-9660 filesystems can be used that way. See option --grow_overwriteable_iso.
|-dummy||Try to perform the drive operations without actually affecting the inserted media. There is no warranty that this will work with a particular combination of drive and media. Blanking is prevented reliably, though. To avoid inadverted real burning, -dummy refuses burn runs on anything but CD-R[W], DVD-R[W], or emulated stdio-drives.|
Wait until input data is available at stdin or EOF occurs at stdin.
Only then begin to access any drives.
One should use this if xorrisofs is working at the end of a pipe where the feeder process reads from the drive before it starts writing its output into xorrisofs. Example:
xorrisofs ... -C 0,12800 -M /dev/sr0 ... | \
xorrecord dev=/dev/sr0 ... -waiti -
This option works even if standard input is not the track source. If no process is piping in, then the Enter key of your terminal will act as trigger for xorrecord. Note that this input line will not be consumed by cdrskin if standard input is not the track source. It will end up as shell command, usually.
Announce the exact size of the track source. This is necessary with
DVD-R DL media and with quickest blanked DVD-RW, if the size cannot be
determined in advance from the track source. E.g. if it is standard input
or a named pipe.
If the track source does not deliver the predicted amount of bytes, the remainder of the track is padded with zeros. This is not considered an error. If on the other hand the track source delivers more than the announced bytes then the track on media gets truncated to the predicted size and xorrecord exits with non-zero value.
Try to obtain the track size from the content of the track source.
This works only if the track source bears an ISO 9660 filesystem.
Any other track source content will cause the burn run to abort.
If the track source is not a regular file or block device, then this option will work only if the programs fifo size is at least 64k. See option fs=.
|Add the given amount of trailing zeros to the upcomming track. This feature can be disabled by size 0. Default is 300 kB in order to work around a problem with GNU/Linux which often fails to read the last few blocks of a CD track which was written in write mode TAO. TAO is used by xorrecord if the track size cannot be predicted or if the CD medium is not blank but appendable.|
|-nopad||The same as padsize=0.|
|-pad||The same as padsize=15s. This was once sufficient with older GNU/Linux kernels. Meanwhile one should at least use padsize=128k, if not padsize=300k.|
|-data||Explicitely announce that the track source shall be recorded as data track, and not as audio track. This option has no effect with xorrecord, because there is no support for other track formats anyway.|
|-tao||Explicitely demand that write type TAO shall be used for CD, or Incremental for DVD-R. Normally the program will choose the write type according to the given medium state, option -multi, and track source. Demanding it explicitely prevents the start of a write run, if it is not appropriate to the situation.|
|-sao||Explicitely demand that write type SAO shall be used for CD, or DAO for DVD-R. This might prevent the write run, if it is not appropriate to the situation.|
|-dao||Alias of -sao.|
Set the size of the program fifo buffer to the given value
rather than the default of 4m.
The fifo buffers a temporary surplus of track source data in order to provide the drive with a steady stream during times of temporary lack of track source supply.
Other than cdrecord, xorrecord enables drive buffer underrun protection by default and does not wait with writing until the fifo is full for a first time. On very old CD drives and slow computers, this might cause aborted burn runs. In this case, consider to use program cdrskin for CD burning. DVD and BD drives tolerate buffer underrun without problems.
The larger the fifo, the longer periods of poor source supply can be compensated. But a large fifo can deprive the operating system of read cache for better filesystem performance.
Set the write speed. Default is 0 = maximum speed.
Speed can be given in media type dependent x-speed numbers or as a
desired throughput per second in MMC compliant kB (= 1000)
or MB (= 1000 kB). Media x-speed factor can be set explicity
by appending "c" for CD, "d" for DVD, "b" for BD. "x" is optional.
706k = 706kB/s = 4c = 4xCD
5540k = 5540kB/s = 4d = 4xDVD
If there is no hint about the speed unit attached, then the medium in the drive will decide. Default unit is CD, 1x = 176,400 raw bytes/second. With DVD, 1x = 1,385,000 bytes/second. With BD, 1x = 4,495,625 bytes/second.
MMC drives usually activate their own idea of speed and take the speed value given by the burn program only as a hint for their own decision.
|-eject||Eject the drive tray after alll other work is done.|
Program version and verbosity:
Print to standard output a line beginning by
"Cdrecord 2.01-Emulation Copyright"
and further lines which report the version of xorriso and its supporting libraries. They also state the license under which the program is provided, and disclaim any warranty, to the extent permitted by law.
Afterwards end emulation without performing any drive operation.
|-v||Increase program verbosity by one level. There are four verbosity levels from nearly silent to debugging verbosity. The both highest levels can be enabled by repeated -v or by -vv resp. -vvv.|
Log SCSI commands and drive replies to standard error.
This might be of interest if xorrecord and a particular drive
or medium do not cooperate as expected, or if you just want to know
how libburn interacts with the drive.
To understand this extremely verbous log, one needs to read SCSI
specs SPC, SBC, and MMC.
Please do not add such a log to a bug report on the first hand, unless you want to point out a particular deviation from said specs, or if you get asked for this log by a maintainer of xorrecord who feels in charge for your bug report.
Print a sparse list of program options to standard error
and declare not to be cdrecord.
Afterwards end emulation without performing any drive operation.
Options not compatible to cdrecord:
|Only if used as first command line argument this option prevents reading and interpretation of startup files. See section FILES below.|
Enable emulation of multi-session writing on overwriteable media which
contain an ISO 9660 filesystem. This emulation is learned from growisofs -M
but adapted to the usage model of
xorrisofs -C -M | xorrecord -waiti -multi -
for sequential media.
--grow_overwriteable_iso does not hamper the use of true multi-session media. I.e. it is possible to use the same xorrecord options with both kinds of media and to achieve similar results if ISO 9660 filesystem images are to be written. This option implies option -isosize and therefore demands that the track source is a ISO 9660 filesystem image.
With overwriteable media and no option blank=fast|all present it expands an eventual ISO 9660 filesystem on media. It is assumed that this images inner size description points to the end of the valuable data. Overwriteable media with a recognizable ISO 9660 size will be regarded as appendable rather than as blank. I.e. options -msinfo and -toc will work. -toc will always show a single session with its size increasing with every added ISO 9660 image.
Apply option -multi if the medium is suitable. Not suitable are DVD-R DL
and DVD-RW, which were blanked with mode "deformat_quickest".
Not all drives correctly recognize such fast-blanked DVD-RW which need "on". If there is well founded suspicion that a burn run failed due to -multi, then this causes a re-try without -multi.
Mode "on" requests that compliance to the desired speed setting is
preferred over management of write errors. With DVD-RAM and BD this can
bring effective write speed near to the nominal write speed of the media.
But it will also disable the automatic use of replacement blocks
if write errors occur. It might as well be disliked or ignored by the drive.
If a number is given, then error management stays enabled for all byte addresses below that number. Any number below 16s is the same as "off".
|Linux specific: Set the number of bytes to be transmitted with each write operation to DVD or BD media. Tracks get padded up to the next multiple of this write size. A number of 64 KB may improve throughput with bus systems which show latency problems. The default depends on media type, option stream_recording=, and on compile time options.|
Set the block address on overwritable media where to start writing the track.
With DVD+RW, DVD-RAM or BD-RE, byte_offset must be aligned to 2 kiB blocks,
but better is 32 kiB on DVD and 64 kiB on BD.
With formatted DVD-RW 32 kiB alignment is mandatory.
Other media are not suitable for this option.
|Set the number of bytes after which to force output to emulated stdio: drives. This forcing keeps the memory from being clogged with lots of pending data for slow devices. Default "on" is the same as "16m". Forced output can be disabled by "off".|
Overview of examples: Get an overview of drives and their addresses
Get info about a particular drive or loaded media
Prepare CD-RW or DVD-RW for re-use, BD-R for bad block handling
Format DVD-RW to avoid need for blanking before re-use
De-format DVD-RW to make it capable of multi-session again
Write a single ISO 9660 filesystem image
Write multiple ISO 9660 sessions
Write ISO 9660 session on-the-fly
Write compressed afio archive on-the-fly
Get an overview of drives and their addresses:
$ xorrecord --devices
Get info about a particular drive and loaded media:
$ xorrecord dev=/dev/sr0 -atip -toc --grow_overwriteable_iso
Prepare CD-RW or DVD-RW for re-use:
$ xorrecord -v dev=/dev/sr0 blank=as_needed -eject
Format DVD-RW to avoid need for blanking before re-use:
$ xorrecord -v dev=/dev/sr0 blank=format_overwrite -eject
This command may also be used to format BD-R media before first use, in order to enable handling of write errors. Several hundred MB of spare blocks will be reserved and write runs on such media will perform with less than half nominal speed.
De-format DVD-RW to make it capable of multi-session again:
$ xorrecord -v dev=/dev/sr0 blank=deformat
Write a single ISO 9660 filesystem image:
$ xorrecord -v dev=/dev/sr0 speed=12 fs=8m \
blank=as_needed -eject padsize=300k my_image.iso
Write multiple ISO 9660 sessions: This is possible with all media except minimally blanked DVD-RW and DVD-R DL, which cannot do multi-session.
The first session is written like in the previous example, except that option -multi is used. It will contain the files of hard disk directory ./tree1 under the ISO 9660 directory /dir1:
$ xorrisofs -o image_1.iso -J -graft-points /dir1=./tree1
$ xorrecord -v dev=/dev/sr0 speed=12 fs=8m \
-multi --grow_overwriteable_iso \
blank=as_needed -eject padsize=300k image_1.iso
For the second session xorrisofs needs to know the -msinfo numbers of the medium. Further it will read data from the medium by using the systems read-only CD-ROM driver.
It is advised to load the tray manually or via dd by the CD-ROM driver, rather than letting xorrecord do this by its own SCSI driver. Many system CD-ROM drivers do not take notice of xorrecords activities.
$ dd if=/dev/sr0 count=1 >/dev/null 2>&1
Now get the -msinfo numbers:
$ m=$(xorrecord dev=/dev/sr0 -msinfo)
and use them with xorrisofs to add ./tree2 to the image as /dir2:
$ xorrisofs -M /dev/sr0 -C $m -o image_2.iso \
-J -graft-points /dir2=./tree2
Now burn the new session onto the same medium. This time without blanking:
$ xorrecord -v dev=/dev/sr0 speed=12 fs=8m \
-multi --grow_overwriteable_iso \
-eject padsize=300k image_2.iso
Operating systems which mount this medium will read the superblock of the second session and show both directories /dir1 and /dir2.
Write ISO 9660 session on-the-fly: It is possible to combine the run of xorrisofs and xorrecord in a pipeline without storing the ISO 9660 image as file on hard disk:
$ xorrisofs -M /dev/sr0 -C $m \
-J -graft-points /dir2=./tree2 \
| xorrecord -v dev=/dev/sr0 speed=12 fs=8m \
-waiti -multi --grow_overwriteable_iso \
-eject padsize=300k -
This is also the main use case of program xorriso itself, where this run would look like:
$ xorriso -dev /dev/sr0 -joliet on -speed 12 -fs 8m \
-map ./tree2 /dir2 -commit_eject all
Write compressed afio archive on-the-fly: This is possible with all media except minimally blanked DVD-RW and DVD-R DL. Since the compressed output stream is of very variable speed, a larger fifo is advised. Nevertheless, this example is not suitable for very old CD drives which have no underrun protection and thus would abort the burn run on temporary data shortage.
$ find . | afio -oZ - | \
xorrecord -v dev=/dev/sr0 speed=12 fs=64m \
-multi padsize=300k -
afio archives do not contain references to absolute data block addresses. So they need no special precautions for multi-session. One may get the session start addresses by option -toc, and then use dd option skip= to begin reading at one of those addresses. E.g. for listing its content:
$ dd if=/dev/sr0 bs=2048 skip=64046 | afio -tvZ -
afio will know when the end of the archive is reached.
If not --no_rc is given as the first argument then xorrecord attempts on startup to read and execute lines from the following files:
The files are read in the sequence given here, but none of them is required to exist. The lines are not interpreted as xorrecord options but as generic xorriso commands. See man xorriso.
For generic xorriso command mode xorriso(1) Formatting track sources for xorrecord: xorrisofs(1), mkisofs(8), genisoimage(8), afio(1), star(1) Other programs which burn sessions to optical media growisofs(1), cdrecord(1), wodim(1), cdrskin(1)
To report bugs, request help, or suggest enhancements for xorriso, please send electronic mail to the public list <email@example.com>. If more privacy is desired, mail to <firstname.lastname@example.org>.
Please describe what you expect xorriso to do, the program arguments resp. commands by which you tried to achieve it, the messages of xorriso, and the undesirable outcome of your program run.
Expect to get asked more questions before solutions can be proposed.
Thomas Schmitt <email@example.com>
Copyright (c) 2011 - 2013 Thomas Schmitt
Permission is granted to distribute this text freely. It shall only be modified in sync with the technical properties of xorriso. If you make use of the license to derive modified versions of xorriso then you are entitled to modify this text under that same license.
xorriso is in part based on work by Vreixo Formoso who provides libisofs together with Mario Danic who also leads the libburnia team. Thanks to Andy Polyakov who invented emulated growing, to Derek Foreman and Ben Jansens who once founded libburn.
Compliments towards Joerg Schilling whose cdrtools served me for ten years.
|-->||XORRECORD (1)||Version 1.3.4, Dec 12, 2013|