CDRSKIN(1) | General Commands Manual | CDRSKIN(1) |
cdrskin - burns preformatted data to CD, DVD, and BD via libburn.
cdrskin [options|track_source_addresses]
cdrskin is a program that provides some of cdrecord's options in a compatible way for CD media. With DVD and BD it has its own ways. You do not need to be superuser for its daily usage.
Blanking of CD-RW and DVD-RW.
Formatting of DVD-RW, DVD+RW, DVD-RAM, BD.
Burning of data tracks or audio tracks with CD-TEXT to CD,
either in versatile Track at Once mode (TAO)
or in Session at Once mode for seamless tracks.
Multi session on CD (follow-up sessions in TAO only)
or on DVD-R[W] (in Incremental mode) or DVD+R[/DL] or BD-R.
Single session Disk-at-once on DVD-RW, DVD-R, DVD-R DL.
Single session or emulated ISO-9660 multi-session
on overwriteable DVD+RW, DVD-RW, DVD-RAM, BD-RE
or on data file or block device.
Extraction of audio tracks and CD-TEXT to hard disk files.
Bus scan, burnfree, speed options, retrieving media info, padding, fifo.
See section EXAMPLES at the end of this text.
Track recording model
Write mode selection
Recordable CD Media
Sequentially Recordable DVD or BD Media
Overwriteable DVD or BD Media
Drive preparation and addressing
Emulated drives
The input-output entities which get processed are called tracks. A
track stores a stream of bytes.
More than one track can be burned by a single run of cdrskin. In the terms of
the MMC standard all tracks written by the same run constitute a
session.
Normally, each track is initiated by one track source address argument, which
may either be "-" for standard input or the address of a readable
file. Alternatively, option cuefile= may be used to read a session
description from a text file and to read the session content from a single
data file.
If no write mode is given explicitly then one will be chosen which matches the
peculiarities of track sources and the state of the output media.
Some media types can be kept appendable so that further tracks can be written to them in subsequent runs of cdrskin (see option -multi). Info about the addresses of burned tracks is kept in a table of content (TOC) on media and can be retrieved via cdrskin option -toc. This information is also used by the operating systems' CD-ROM read drivers.
In general there are two types of tracks: data and audio. They
differ in sector size, throughput and readability via the systems' CD-ROM
drivers and by music CD players. With DVD and BD there is only type data.
If not explicitly option -audio is given, then any track is burned as type
data, unless the track source is a file with suffix ".wav" or
".au" and has a header part which identifies it as MS-WAVE or SUN
Audio with suitable parameters. Such files are burned as audio tracks by
default.
While audio tracks just contain a given time span of acoustic
vibrations, data tracks may have an arbitrary meaning. Nevertheless,
ISO-9660 filesystems are established as a format which can represent a tree
of directories and files on all major operating systems. Such filesystem
images can be produced by programs mkisofs or genisoimage or xorriso. They
can also be extended by follow-up tracks if prepared properly. See the man
pages of said programs. cdrskin is able to fulfill the needs about their
option -C.
Another type of data track content are archive formats which originally have
been developed for magnetic tapes. Only formats which mark a detectable
end-of-archive in their data are suitable, though. Well tested are the
archivers afio and star. Not suitable seems GNU tar.
In general there are two approaches for writing media:
A permissive mode selected by option -tao which needs no predicted
track size and can use multi-session capabilities if offered by drive and
medium.
A more restrictive mode -sao (alias -dao) which usually demands a
predictable track size and is not necessarily capable of multi-session. It
can be used to write CD-TEXT and it is the only one that works with option
cuefile=.
If none of the options -dao, -tao or -sao is given then the program will try
to choose a write mode which matches the defined recording job, the
capabilities of the drive and the state of the present media.
So the mentioning of write modes in the following paragraphs and in the
examples is not so much a demand that the user shall choose one explicitly,
but rather an illustration of what to expect with particular media
types.
CD-R can be initially written only once and eventually extended
until they get closed (or are spoiled because they are overly full). After
that they are read-only. Closing is done automatically unless option
-multi is given which keeps the media appendable.
Write mode -tao is able to use track sources of unpredictable length (like
stdin) and to write further sessions to appendable media. -sao produces
audio sessions with seamless tracks but needs predicted track sizes and
cannot append sessions to media.
CD-RW media can be blanked to make them re-usable for another round of
overwriting. Usually blank=fast is the appropriate option. Blanking
damages the previous content but does not make it completely unreadable. It
is no effective privacy precaution. Multiple cycles of blanking and
overwriting with random numbers might be needed.
Currently DVD-RW, DVD-R[DL], DVD+R[DL], and BD-R can be used for
the Sequential recording model. It resembles the model of CD media. Only
DVD-RW can be blanked and re-used from scratch.
DVD-RW are sequential media if they are in state "Sequential
Recording". The media must be either blank or appendable. Newly
purchased DVD-RW and DVD-R media are in this state. Used DVD-RW get into
blank sequential state by option blank=deformat_sequential .
With DVD-R[W] two write modes may be available:
Mode DAO has many restrictions. It does not work with appendable media, cannot
do -multi and writes only a single track. The size of the track needs to be
known in advance. So either its source has to be a disk file of recognizable
size or the size has to be announced explicitly by options tsize= or
tao_to_sao_tsize= .
DAO is the only mode for DVD-R media which do not offer feature 21h
Incremental Streaming (e.g. DVD-R DL). DAO may also be selected explicitly
by option -sao . Program growisofs uses DAO on sequential DVD-R[W]
media for maximum DVD-ROM/-Video compatibility.
The other mode, Incremental Streaming, is the default write mode if it is
available and if the restrictions of DAO would prevent the job. Incremental
Streaming may be selected explicitly by option -tao as it resembles
much CD TAO by accepting track sources of unpredicted length and being able
to keep media appendable by option -multi . It does not work with DVD-R
DL and minimally blanked DVD-RW. The only restriction towards CD-R[W] is
the lack of support for -audio tracks. Multiple tracks per session are
permissible.
The write modes for DVD+R[/DL] and BD-R resemble those with DVD-R except that
each track gets wrapped in an own session. There is no -dummy writing with
DVD+R[/DL] or BD-R.
Quite deliberately write mode -sao insists in the tradition of a predicted
track size and blank media, whereas -tao writes the tracks open ended and
can be applied to appendable media.
BD-R may be formatted before first use to enable the Defect Management which
might catch and repair some bad spots at the expense of slow speed even with
flawless media.
Note: Option -multi might make DVD media unreadable in some DVD-ROM
drives. Best reader compatibility is achieved without it (i.e. by single
session media).
Currently types DVD+RW, DVD-RW, DVD-RAM and BD-RE can be
overwritten via cdrskin.
Option -audio is not allowed. Only one track is allowed. Option -multi cannot
mark a recognizable end of overwriteable media. Therefore -multi is banned
unless ISO-9660 images shall be expandable by help of option
--grow_overwriteable_iso . Without this option or without an ISO-9660
filesystem image present on media, -toc does not return information about
the media content and media get treated as blank regardless whether they
hold data or not.
Currently there is no difference between -sao and -tao. If ever, then -tao
will be the mode which preserves the current behavior.
DVD+RW and DVD-RAM media need no special initial formatting. They
offer a single continuous data area for blockwise random access. BD-RE need
explicit formatting before use. See blank=as_needed or
blank=format_defectmgt .
DVD-RW are sold in state "Sequential Recording". To become suitable
for the Overwriteable DVD recording model they need to get formatted to
state "Restricted Overwrite". Then they behave much like DVD+RW.
This formatting can be done by option blank=format_overwrite .
Several programs like dvd+rw-format, cdrecord, wodim, or cdrskin can bring a
DVD-RW out of overwriteable state so that it has to be formatted again. If
in doubt, just give it a try.
The drives, CD, DVD, or BD burners, are accessed via addresses
which are specific to libburn and the operating system. Those addresses get
listed by a run of cdrskin --devices or cdrskin
--device_links.
On Linux, they are device files which traditionally do not offer w-permissions
for normal users. Because libburn needs rw-permission, it might be only the
superuser who is able to get this list without further precautions.
It is consensus that chmod a+rw /dev/sr0 or chmod a+rw /dev/hdc
is less security sensitive than chmod u+s,a+x /usr/bin/cdrskin. The risk for
the drive is somewhat higher but the overall system is much less at stake.
Consider to restrict rw-access to a single group which bundles the users who
are allowed to use the burner drive (like group "floppy").
For drive permission examples on Linux, FreeBSD, and Solaris, see
cdrskin/README.
If you only got one CD capable drive then you may leave out
cdrskin option dev=. Else you should use this option to address the
drive you want.
cdrskin option dev= not only accepts the listed addresses but also traditional
cdrecord SCSI addresses which consist of three numbers: Bus,Target,Lun. On
Linux there is also a related address family "ATA" which accesses
IDE drives not under control of Linux SCSI drivers: ATA:Bus,Target,Lun.
See option -scanbus for getting a list of cdrecord style addresses.
Further are accepted: links to libburn-suitable device files, device files
which have the same major and minor device number, and device files which
have the same SCSI address parameters (e.g. /dev/sg0).
Option --allow_emulated_drives enables addressing of
pseudo-drives which get emulated on top of filesystem objects. Regular data
files and block devices result in pseudo-drives which behave much like
DVD-RAM. If the given address does not exist yet but its directory exists,
then it gets created as regular file. Other file types like character
devices or pipes result in pseudo-drives which behave much like blank DVD-R.
The target file address is given after prefix "stdio:".
E.g.: dev=stdio:/tmp/my_pseudo_drive
Addresses of the form "stdio:/dev/fd/<number>" are treated
special. The number is read literally and used as open file descriptor. With
dev="stdio:/dev/fd/1" the normal standard output of the program is
redirected to stderr and the stream data of a burn run will appear on
stdout.
Not good for terminals ! Redirect it.
Pseudo-drives support -dummy. Their reply with --tell_media_space can be
utopic. -dummy burn runs touch the file but do not modify its data content.
Note: --allow_emulated_drives is restricted to stdio:/dev/null if cdrskin is
run by the superuser or if it has changed user identity via the
setuid bit of its access permissions. The ban for the superuser can
be lifted by a skillfully created file. See section FILES below.
Alphabetical list of options which are intended to be compatible with original cdrecord by Joerg Schilling:
Alphabetical list of options which are genuine to cdrskin and intended for normal use:
Alphabetical list of options which are only intended for very special situations and not for normal use:
cdrskin -scanbus
cdrskin dev=ATA -scanbus
cdrskin --device_links
cdrskin dev=0,1,0 -checkdrive
cdrskin dev=ATA:1,0,0 -v -atip
cdrskin dev=/dev/hdc -minfo
cdrskin -v dev=/dev/sg1 blank=as_needed -eject
cdrskin -v dev=/dev/sr0 blank=format_overwrite
cdrskin -v dev=/dev/sr0 blank=deformat_sequential
cdrskin -v dev=/dev/hdc speed=12 fs=8m \
blank=as_needed -eject padsize=300k my_image.iso
find . | afio -oZ - | \
cdrskin -v dev=0,1,0 fs=32m speed=8 \
blank=as_needed padsize=300k -
cdrskin dev=/dev/sr0 -v padsize=300k -multi 1.iso
cdrskin dev=/dev/sr0 -v padsize=300k -multi 2.iso
cdrskin dev=/dev/sr0 -v padsize=300k -multi 3.iso
cdrskin dev=/dev/sr0 -v padsize=300k 4.iso
c_values=$(cdrskin dev=/dev/hdc -msinfo 2>/dev/null)
mkisofs ... -C "$c_values" ...
x=$(cdrskin dev=/dev/sr0 -multi \
--tell_media_space 2>/dev/null)
echo "Available: $x blocks of 2048 data bytes"
cdrskin -v dev=ATA:1,0,0 speed=48 -sao \
input_sheet_v07t=cdtext.v07t \
track1.wav track2.au -audio -swab track3.raw
mkdir /home/me/my_cd
cdrskin -v dev=/dev/sr0 extract_audio_to=/home/me/my_cd \
cdtext_to_v07t=/home/me/my_cd/cdtext.v07t
If not --no_rc is given as the first argument then cdrskin attempts on startup to read the arguments from the following files:
/etc/default/cdrskin
/etc/opt/cdrskin/rc
/etc/cdrskin/cdrskin.conf
$HOME/.cdrskinrc
The files are read in the sequence given above, but none of them
is required for cdrskin to function properly. Each readable line is treated
as one single argument. No extra blanks. A first character '#' marks a
comment, empty lines are ignored.
Example content of a startup file:
# This is the default device
dev=0,1,0
# Some more options
fifo_start_at=0
fs=16m
The superuser is normally banned from using any other emulated drive but /dev/null. This ban can be lifted by the existence of file
/root/cdrskin_permissions/allow_emulated_drives
where the directory must be owned by the superuser and must not
offer w-permissions for group or others.
Warning: Superusers must take care not to spoil their hard disk via its raw
block device (like stdio:/dev/hda or stdio:/dev/sd0).
cdrskin was written by Thomas Schmitt <scdbackup@gmx.net>.
This manual page was started by George Danchev <danchev@spnet.net> and is now maintained by Thomas Schmitt.
Version 1.5.2, Oct 26, 2019 |