MAN page from Old RedHat 8.X cdrtools-2.0-1.i386.rpm
CDRECORD
Section: Schily\'s USER COMMANDS (1)
Updated: Version 2.0
Index NAME
cdrecord - record audio or data Compact Discs from a master
SYNOPSIS
cdrecord[
general options]
dev=device[
track options]
track1...
trackn
DESCRIPTION
Cdrecordis used to record data or audio Compact Discs on an Orange BookCD-Recorder.
Thedevicerefers toscsibus/target/lunof the CD-Recorder. Communication on SunOSis done with the SCSI general driverscg.Other operating systems are using a library simulation of this driver.Possible syntax is:dev=scsibus,target,lunordev=target,lun.In the latter case, the CD-Recorder has to be connected to the default SCSI bus of the machine.Scsibus,target and lunare integer numbers. Some operating systems or SCSI transport implementations may require tospecify a filename in addition.In this case the correct syntax for the device is:dev=devicename:scsibus,target,lunordev=devicename:target,lun.If the name of the device node that has been specified on such a systemrefers to exactly one SCSI device, a shorthand in the formdev=devicename:@ordev=devicename:@,lunmay be used instead ofdev=devicename:scsibus,target,lun.
To access remote SCSI devices, you need to prepend the SCSI device name bya remote device indicator. The remote device indicator is eitherREMOTE:userAATThost:or.BIREMOTE:host:
A valid remote SCSI device name may be:REMOTE:userAATThost:to allow remote SCSI bus scanning orREMOTE:userAATThost:1,0,0to access the SCSI device at hostconnected to SCSI bus # 1,target 0 lun 0.
To access SCSI devices via alternate transport layers,you need to prepend the SCSI device name by a transport layer indicator.The transport layer indicator may be something likeUSCSI: orATAPI:.To get a list of supported transport layers for your platform, use dev=HELP:
To make cdrecordportable to all UNIX platforms, the syntaxdev=devicename:scsibus,target,lunis preferred as is hides OS specific knowledge about device names from the user.A specific OS must not necessarily support a way to specify a real device file name nor away to specify scsibus,target,lun.
Scsibus 0 is the default SCSI bus on the machine. Watch the boot messages for more information or look into /var/adm/messages for more information about the SCSI configuration of your machine.If you have problems to figure out what values for scsibus,target,lunshould be used, try the -scanbusoption of cdrecorddescribed below.
If a file /etc/default/cdrecord exists, the parameter to thedev=option may also be a drive name label in said file (see FILES section).
On SVr4 compliant systems, cdrecord uses the the real time class to get the highest scheduling priority that ispossible (higher than all kernel processes).On systems with POSIX real time schedulingcdrecord uses real time scheduling too, but may not be able to gain a priority that is higher than all kernel processes.
In Track At Once mode, eachtrackcorresponds to a single file that contains the prepared data for that track.If the argument is `-',standard input is used for that track. Only one track may be taken from stdin.
GENERAL OPTIONS
General options must be before any track file name or track option.
- -version
- Print version information and exit.
- -v
- Increment the level of general verbosity by one.This is used e.g. to display the progress of the writing process.
- -V
- Increment the verbose level in respect of SCSI command transport by one.This helps to debug problemsduring the writing process, that occur in the CD-Recorder. If you get incomprehensible error messages you should use this flagto get more detailed output.-VVwill show data buffer content in addition.Using-Vor-VVslows down the process and may be the reason for a buffer underrun.
- debug=#, -d
- Set the misc debug value to # (with debug=#) or incrementthe misc debug level by one (with -d). If you specify-dd,this equals to debug=2.This may help to find problems while opening a driver for libscgas well as with sector sizes and sector types.Using-debugslows down the process and may be the reason for a buffer underrun.
- kdebug=#, kd=#
- Tell the scg-driverto modify the kernel debug value while SCSI commands are running.
- -silent, -s
- Do not print out a status report for failed SCSI commands.
- -force
- Force to continue on some errors. Be careful when using this option.Cdrecordimplements several checks that prevent you from doing unwanted thingslike damaging CD-RW media by improper drives. Many of the sanity checks are disabled when the -forceoption is used.
This option also implements some tricks that will allow you to blank bad CD-RW disks.
- -immed
- Tell cdrecord to set theSCSI IMMEDflag in certain commands(load/eject/blank/close_track/close_session).This can be usefulon broken systems with ATAPI harddisk and CD/DVD writer on the same bus orwith SCSI systems that don't use disconnect/reconnect.These systems will freeze while blanking or fixating a CD/DVD or while a DVDwriter is filling up a session to the minimum amount (approx. 800 MB).Setting the-immedflag will request the command to return immediatelywhile the operation proceeds in background, makingthe bus usable for the other devices and avoiding the system freeze.This is an experimental feature which may work or not, depending on the modelof the CD/DVD writer.A correct solution would be to set up a correct cabling but there seem to be notebooks around that have been set up the wrong way by the manufacturer.As it is impossible to fix this problem in notebooks, the-immedoption has been added.
A second experimental feature of the-immedflag is to tell cdrecord to try to wait short times wile writing to themedia. This is expected to free the IDE bus if the CD/DVD writer and thedata source are connected to the same IDE cable. In this case, the CD/DVDwriter would otherwise usually block the IDE bus for nearly all the timemaking it impossible to fetch data from the source drive. See alsominbuf=and-voption.
Use both features at your own risk.It it turns out that it would make sense to have a separate optionfor the the wait feature, write to the author and convince him.
- minbuf=value
- The #minbuf=options allows to define the minimum drive buffer fill ratio for theexperimental ATAPI wait mode that is intended to free the IDE busto allow hard disk and CD/DVD writer to be on the same IDE cable.As the wait mode currently only works when the verbose option-vhas been specified, cdrecordimplies the verbose option in case the -immedorminbuf=option have been specified.Valid values for minbuf= are between 25 and 95 for 25%...95% minimum drive buffer fill ratio.
- -dummy
- The CD-Recorder will go through all steps of the recording process,but the laser is turned off during this procedure.It is recommended to run several tests before actually writing to a Compact Disk or Digital Versatile Disk,if the timing and load response of the system is not known.
- -dao
- Set SAO (Session At Once)mode which is usually calledDisk At Once mode.This currently only works with MMC drives that supportSession At Oncemode.
- -raw
- SetRAW writing mode.Using this option defaults to -raw96r.
- -raw96r
- SelectSetRAW writing modewith 2352 byte sectors plus 96 bytes of raw P-W subchannel data resultingin a sector size of 2448 bytes.This is the preferred raw writing mode as it gives best control over theCD writing process.If you find any problems with the layout of a disk or with sub channel content (e.g. wrong times on the display when playing the CD) and your drivesupports to write in -raw96ror-raw16mode, you should give it a try. There are several CD writers with bad firmwarethat result in broken disks when writing in TAO or SAO mode.Writing data disks in raw mode needs significantly more CPU time than otherwrite modes. If your CPU is too slow, this may result in buffer underruns.
- -raw96p
- SelectSetRAW writing modewith 2352 byte sectors plus 96 bytes of packed P-W subchannel data resultingin a sector size of 2448 bytes.This is the less preferred raw writing mode as only a few recorders supportit and some of these recorders have bugs in the firmware implementation.Don't use this mode if your recorder supports-raw96ror-raw16.Writing data disks in raw mode needs significantly more CPU time than otherwrite modes. If your CPU is too slow, this may result in buffer underruns.
- -raw16
- SelectSetRAW writing modewith 2352 byte sectors plus 6 bytes of P-Q subchannel data resultingin a sector size of 2368 bytes.If a recorder does not support -raw96r,this is the preferred raw writing mode.It does not allow to writeCD-TextorCD+Graphicsbut it is the only raw writing mode in cheap CD writers.As these cheap writers in most cases do not support-daomode.Don't use this mode if your recorder supports-raw96r.Writing data disks in raw mode needs significantly more CPU time than otherwrite modes. If your CPU is too slow, this may result in buffer underruns.
- -multi
- Allow multi session CD's to be made. This flag needs to be presenton all sessions of a multi session disk,except you want to create a session that will be the last session on the media.The fixation will be done in a way that allows the CD-Recorder toappend additional sessions later. This is done by generation a TOCwith a link to the next program area. The so generated media is not100% compatible to manufactured CD's (except for CDplus). Use only for recording of multi session CD's.If this option is present, the default track type isCD-ROM XA mode 2.The Sony drives have no hardware support for CD-ROM XA mode 2.You have to specify the -data option in order to create multi session disks on these drives.As long as cdrecord does not have a coder for converting data sectorsto audio sectors, you need to force CD-ROMsectors by including the-dataoption if you like to record a multisession disk in SAO mode.Not all drives allow multisession CD's in SAO mode.
- -msinfo
- Retrieve multi session info in a form suitable for mkisofs-1.10 or later.
This option makes only sense with a CD that contains at leastone closed session and is appendable (not finally closed yet). Some drives create error messages if you try to get the multi session info for a disk that is not suitable for this operation.
- -toc
- Retrieve and print out the table of content or PMA of a CD.With this option, cdrecordwill work with CD-R drives and with CD-ROM drives.
- -atip
- Retrieve and print out the ATIP (absolute Time in Pregroove) info of a CD/DVDrecordable or CD/DVD rewritable media.With this option, cdrecordwill try to retrieve the ATIP info. If the actual drive does not supportto read the ATIP info, it may be that only a reduced set of informationrecords or even nothing is displayed. Only a limited number of MMC compliantdrives support to read the ATIP info.
If cdrecordis able to retrieve the lead-in start time for the first session, it will try todecode and print the manufacturer info from the media.DVD media dos not have atip information but there is equivalent prerecordedinformation that is read out and printed.
- -fix
- The disk will only be fixated (i.e. a TOC for a CD-Reader will be written). This may be used, if for some reason the disk has been written but notfixated. This option currently does not work with old TEAC drives (CD-R50S andCD-R55S).
- -nofix
- Do not fixate the disk after writing the tracks. This may be usedto create an audio disk in steps. An un-fixated disk can usually not be usedon a non CD-writer type drive but there are audio CD players that willbe able to play such a disk.
- -waiti
- Wait for input to become available on standard input before trying to openthe SCSI driver. This allows cdrecordto read it's input from a pipe evenwhen writing additional sessions to a multi session disk.When writing another session to a multi session disk,mkisofs needs to read the old session from the device before writing output.This cannot be done ifcdrecord opens the SCSI driver at the same time.
- -load
- Load the media and exit. This only works with a tray loading mechanismbut seems to be useful when using the Kodak disk transporter.
- -eject
- Eject disk after doing the work.Some Devices (e.g. Philips) need to eject the medium before creating a newdisk. Doing a -dummy test and immediately creating a real disk would notwork on these devices.
- speed=#
- Set the speed factor of the writing process to #.# is an integer, representing a multiple of the audio speed.This is about 150 KB/s for CD-ROM and about 172 KB/s for CD-Audio.If no speedoption is present, cdrecordwill try to get the speed value from the CDR_SPEEDenvironment.If your drive has problems withspeed=2 or speed=4,you should try speed=0.
- blank=type
- Blank a CD-RW and exit or blank a CD-RW before writing. The blanking type may be one of:
- help
- Display a list of possible blanking types.
- all
- Blank the entire disk. This may take a long time.
- fast
- Minimally blank the disk. This results in erasing the PMA, the TOC and the pregap.
- track
- Blank a track.
- unreserve
- Unreserve a reserved track.
- trtail
- Blank the tail of a track.
- unclose
- Unclose last session.
- session
- Blank the last session.
Not all drives support all blanking types. It may be necessary to useblank=allif a drive reports a specified command as being invalid.If used together with the -forceflag, this option may be used to blank CD-RW disks that otherwise cannot beblanked. Note that you may need to specifyblank=allbecause some drives will not continue with certain types of bad CD-RWdisks. Note also thatcdecorddoes it's best if the -force flag is used but it finally depends on the drive's firmware whether the blanking operation will succeed or not. - fs=#
- Set the fifo (ring buffer) size to #.You may use the same method as in dd(1),sdd(1)orstar(1).The number representing the size is taken in bytes unless otherwise specified.If a number is followed directly by the letter `b', `k', `m', `s' of `f',the size is multiplied by 512, 1024, 1024*1024, 2048 or 2352.If the size consists of numbers separated by `x' or `*', multiplication of the two numbers is performed.Thus fs=10x63kwill specify a fifo size of 630 kBytes.
The size specified by the fs=argument includes the shared memory that is needed for administration. Thisis at least one page of memory.If nofs=option is present, cdrecordwill try to get the fifo size value from the CDR_FIFOSIZEenvironment.The default fifo size is currently 4 MB.
The fifo is used to increase buffering for the real time writing process.It allows to run a pipe from mkisofsdirectly into cdrecord.If the fifo is active and a pipe from mkisofsinto cdrecordis used to create a CD, cdrecordwill abort prior to do any modifications on the disk if mkisofs dies before it starts writing.The recommended fifo size is between 4 and 32 MBytes.As a rule of thumb, the fifo size should be at least equal to the sizeof the internal buffer of the CD-Recorder and no more than half ofthe physical amount of RAM available in the machine.If the fifo size is big enough, the fifo statistics will print a fifoempty count of zero and the fifo min fill is not below 20%.It is not wise to use too much space for the fifo. If you need morethan 8 MB to write a CD on an idle machine, your machine is eitherunderpowered, has hardware problems or is mis-configured.The sun4c architecture (e.g. a Sparcstation-2) has only MMU page table entriesfor 16 MBytes per process. Using more than 14 MBytes for the fifomay cause the operating system in this case to spend much time to constantlyreload the MMU tables. Newer machines from Sun do not have this MMUhardware problem. I have no information on PC-hardware reflectingthis problem.
If you have buffer underruns or similar problems and observe a zerofifo empty count,you have hardware problems. The fifo size in this case is sufficient.
- dev=target
- Sets the SCSI target for the CD-Recorder, see notes above.A typical device specification isdev=6,0.If a filename must be provided together with the numerical target specification, the filename is implementation specific.The correct filename in this case can be found in the system specificmanuals of the target operating system.On a FreeBSDsystem without CAMsupport, you need to use the control device (e.g./dev/rcd0.ctl).A correct device specification in this case may bedev=/dev/rcd0.ctl:@.
On Linux, drives connected to a parallel port adapter are mappedto a virtual SCSI bus. Different adapters are mapped to differenttargets on this virtual SCSI bus.
If no devoption is present, cdrecordwill try to get the device from the CDR_DEVICEenvironment.
If the argument to thedev=option does not contain the characters ',', '/', '@' or ':',it is interpreted as an label name that may be found in the file/etc/default/cdrecord (see FILES section).
- gracetime=#
- Set the grace time before starting to write to# seconds.Values below 2 seconds are not allowed.
- timeout=#
- Set the default SCSI command timeout value to # seconds.The default SCSI command timeout is the minimum timeout used for sendingSCSI commands.If a SCSI command fails due to a timeout, you may try to raise thedefault SCSI command timeout above the timeout value of the failed command.If the command runs correctly with a raised command timeout,please report the better timeout value and the corresponding command to the author of the program.If no timeout option is present, a default timeout of 40 seconds is used.
- driver=name
- Allows to use a user supplied driver name for the device.To get a list of possible drivers usedriver=help.The reason for the existence of this option is to allow users to use cdrecordwith drives that are similar to supported drives but not knowndirectly bycdrecord.Use this option with extreme care. If a wrong driver is used for adevice, the possibility of creating corrupted disks is high.The minimum problem related to a wrong driver is that the -speedor -dummywill not work.
There are two special driver entries in the list:cdr_simulanddvd_simul.These driver entries are designed to make timing tests at any speedor timing tests for drives that do not support the -dummyoption.The simulation drivers implement a drive with a buffer size of 1MBthat can be changed via the CDR_SIMUL_BUFSIZEenvironment variable.The simulation driver correctly simulates even a buffer underrun condition.If the -dummy option is present, the simulation is not aborted in case of a buffer underrun.
- driveropts=option list
- Set driver specific options. The options are specified a comma separated list.To get a list of valid options use driveropts=helptogether with the -checkdriveoption.Currently implemented driver options are:
- burnfree
- Turn the support for Buffer Underrun Free writing on.This only works for drives that support Buffer Underrun Free technology.This may be called:Sanyo BURN-Proof,Ricoh Just-Link,Yamaha Lossless-Linkor similar.
The default is to turn BURN-Freeoff, regardless of the defaults of the drive.
- noburnfree
- Turn the support for Buffer Underrun Free writing off.
- varirec=value
- Turn on the Plextor VariRecwriting mode. The mandatory parametervalueis the laser power offset and currently may be selected from-2, -1, 0, 1, 2.In addition, you need to set the write speed to 4 in order to allowVariRecto work.
- audiomaster
- Turn on the Yahama Audio Master Q. R.feature which usually should result in high quality CDs thathave less reading problems in HiFi players.As this is implemented as a variant of the Session at Once write mode, it will only work if you select SAO write mode and there is no need to turn it off.The Audio Mastermode will work with a limited speed butmay also be used with data CDs. inAudio Mastermode, the pits on the CD will be written larger then usual so the capacityof the medium is reduced when turning this feature on.A 74 minute CD will only have a capacity of 63 minutes ifAudio Masteris active and the capacity of a 80 minute CD will be reduced to 68 minutes.
- forcespeed
- Normally, modern drives know the highest possible speed for differentmedia and may reduce the speed in order to grant best write quality.Some drives (e.g. Ricoh and Yamaha) allow to force the drive touse the selected speed even if the medium is so bad that thewrite quality would be poor. This option tells such a drive toforce to use the selected speed regardless of the medium quality.
Use this option with extreme care and note that the drive should know betterwhich medium will work at full speed.The default is to turn forcespeedoff, regardless of the defaults of the drive.
- noforcespeed
- Turn off the force speedfeature.
- tattooinfo
- Use this option together with-checkdriveto retrieve the image size information for theYamaha DiskT@2feature. The images always have a line length of 3744 pixel.Line number 0 (radius 0) is mapped to the center of the disk.If you know the inner and outer radius you will be able to create apre distorted image that later may appear undistorted on the disk.
- tattoofile=name
- Use this option together with-checkdriveto write an image prepared for theYamaha DiskT@2feature to the medium.The file must be a file with raw image B&W data (one byte per pixel) in a size as retrieved by a previous call totattoofile=name.If the size of the image equals the maximum possible size(3744 x 320 pixel), cdrecordwill use the first part of the file. This first part then will be written to the leftover space on the CD.
Note that the image must be mirrored to be readable from the pick upside of the CD.
- -checkdrive
- Checks if a driver for the current drive is present and exit.If the drive is a known drive, cdrecorduses exit code 0.
- -prcap
- Print the drive capabilities for SCSI-3/mmc compliant drivesas obtained from mode page 0x2A. Values marked with kBuse 1000 bytes as kilo-byte, values marked withKBuse 1024 bytes as Kilo-byte.
- -inq
- Do an inquiry for the drive, print the inquiry info and exit.
- -scanbus
- Scan all SCSI devices on all SCSI busses and print the inquirystrings. This option may be used to find SCSI address of the CD-Recorder on a system.The numbers printed out as labels are computed by: bus * 100 + target
- -reset
- Try to reset the SCSI bus where the CD recorder is located. This works noton all operating systems.
- -overburn
- Allow cdrecord to write more than the official size of a medium. This feature is usuallycalled overburningand depends on the fact that most blank media may hold more space than theofficial size. As the official size of the lead-out area on the disk is90 seconds (6750 sectors) and a disk usually works if there are at least150 sectors of lead out, all media may be overburned by at least 88 seconds(6600 sectors).Most CD recorders only do overburning in SAOorRAWmode. Known exceptions are TEAC CD-R50S, TEAC CD-R55S and the PanasonicCW-7502.Some drives do now allow to overburn as much as you might like and limitthe size of a CD to e.g. 76 minutes. This problem may be circumvented bywriting the CD in RAW mode because this way the drive has no chance to findthe size before starting to burn.There is no guarantee that your drive supports overburning at all.Make a test to check if your drive implements the feature.
- -ignsize
- Ignore the known size of the medium. This options should be used with extremecare, it exists only for debugging purposes don't use it for other reasons.It is not needed to write disks with more than the nominal capacity.This option implies-overburn.
- -useinfo
- Use *.inf files to overwrite audio options.If this option is used, the pregap size information is read from the *.inf file that is associated with the file that contains the audiodata for a track.
- defpregap=#
- Set the default pre-gap size for all tracks except track number 1.This option currently only makes sense with the TEAC drive whencreating track-at-once disks without the 2 second silence before each track.
This option may go away in future. - -packet
- Set Packet writing mode. This is an experimental interface.
- pktsize=#
- Set the packet size to #, forces fixed packet mode.This is an experimental interface.
- -noclose
- Do not close the current track, useful only when in packet writing mode.This is an experimental interface.
- mcn=med_cat_nr
- Set the Media Catalog Numberof the CD to med_cat_nr.
- -text
- Write CD-Text created bycdrecordand based on information taken from a file that contains ascii informationfor the text strings. Currently only the format in the *.inffiles created by cdda2wav is supported. You need to use the-useinfooption in addition in order to tell cdrecordto read these files. If you like to write your own CD-Text information,edit the*.inffiles with a text editor and change the field that are relevant forCD-Text.
- textfile=filename
- Write CD-Text based on information found in the binary filefilename.This file must contain information in a data format defined in theSCSI-3 MMC-2 standard and in the Red Book. The four byte size header that is defined in the SCSI standard is optional and allows to make the recognition ofcorrect data less ambiguous.This is the best option to be used to copy CD-Text data from existing CDsthat already carry CD-Text information. To get data in a format suitablefor this option use cdrecord -vv -tocto extract the information from disk.
TRACK OPTIONS
Track options may be mixed with track file names.
- isrc=ISRC_number
- Set the International Standard Recording Numberfor the next track toISRC_number.
- index=list
- Sets an index list for the next track.In index list is a comma separated list of numbers that are countingfrom index 1. The first entry in this list must contain a 0, the following numbers must be an ascending list of numbers (counting in 1/75 seconds) that represent the start of the indices. An index list in the form:0,7500,15000 sets index 1 to the start of the track, index 2 100 seconds fromthe start of the track and index 3 200 seconds from the start of the track.
- -audio
- If this flag is present, all subsequent tracks are written inCD-DA (similar to Red Book) audio format.The file with data for this tracks shouldcontain stereo, 16-bit digital audio with 44100 samples/s.The byte order should be the following: MSB left, LSB left, MSB right, LSB right, MSB left and so on. The track should be a multiple of 2352 bytes. It is not possible to put the master image of an audio track on a raw disk because data will be read in multiple of 2352 bytes during the recording process.
If a filename ends in .auor.wavthe file is considered to be a structured audio data file.Cdrecordassumes that the file in this case is a Sun audio file or aMicrosoft .WAV fileand extracts the audio data from the files by skipping over thenon-audio header information.In all other cases, cdrecord will only work correctly if theaudio data stream does not have any header.Because many structured audio files do not have an integralnumber of blocks (1/75th second) in length,it is often necessary to specify the-padoption as well.cdrecordrecognizes that audio data in a .WAV file is stored in Intel(little-endian) byte order, and will automatically byte-swap the dataif the CD recorder requires big-endian data. Cdrecordwill reject any audio file that does not match the Red Book requirementsof 16-bit stereo samples in PCM coding at 44100 samples/second.
Using other structured audio data formats as input to cdrecordwill usually work if the structure of the data is the structure described above (raw pcm data in big-endian byte order).However, if the data format includes a header,you will hear a click at the start of a track.
-
- If neither -data nor-audiohave been specified, cdrecorddefaults to -audiofor all filenames that end in.auor .wavand to-data for all other files.
- -swab
- If this flag is present, audio data is assumed to be in byte-swapped(little-endian) order. Some types of CD-Writers e.g. Yamaha, Sony and thenew SCSI-3/mmc drives require audio data to be presented inlittle-endian order,while other writers require audio data to bepresented in the big-endian (network) byte order normally used by theSCSI protocol.Cdrecordknows if a CD-Recorder needs audio data in big- or little-endian order,and corrects the byte order of the data stream to match the needsof the recorder.You only need the -swab flag if your data stream is in Intel (little-endian) byte order.
Note that the verbose output ofcdrecordwill show you if swapping is necessary to make the byte order of the input data fit the required byte order of the recorder.Cdrecordwill not show you if the -swab flag was actually present for a track.
- -data
- If this flag is present, all subsequent tracks are written inCD-ROM mode 1(Yellow Book) format. The data is a multiple of 2048 bytes.The file with track data should contain an ISO-9660 or Rock Ridgefilesystem image (see mkisofsfor more details). If the track data is anufsfilesystem image, fragment size should be set to 2 KB or more to allowCR-drives with 2 KB sector size to to be used for reading.
-
- -data is the default, if no other flag is present.
-
- If neither -data nor-audiohave been specified, cdrecorddefaults to -audiofor all filenames that end in.auor .wavand to-data for all other files.
- -mode2
- If this flag is present, all subsequent tracks are written inCD-ROM mode 2format. The data is a multiple of 2048 bytes.
- -xa1
- If this flag is present, all subsequent tracks are written inCD-ROM XA mode 1format. The data is a multiple of 2048 bytes.
- -xa2
- If this flag is present, all subsequent tracks are written inCD-ROM XA mode 2format. The data is a multiple of 2048 bytes.
- -cdi
- If this flag is present, all subsequent tracks are written inCDIformat. The data is a multiple of 2048 bytes.
- -isosize
- Use the ISO-9660file system size as the size of the next track.This option is needed if you want cdrecordto directly read the image of a track froma raw disk partition or from a TAO master CD. In the first case the option-isosizeis needed to limit the size of the CD to the size of the ISO filesystem.In the second case the option-isosizeis needed to prevent cdrecordfrom reading the two run out blocks that are appended by each CD-recorderin track at once mode. These two run out blocks cannot be read and wouldcause a buffer under run that would cause a defective copy.Do not use this option on files created by mkisofsand in casecdrecordreads the track data from stdin.In the first case, you would prevent cdrecord from writing the amount of padding that has been appended bymkisofsand in the latter case, it will not work because stdinis not seekable.
If -isosizeis used for a track, cdrecordwill automatically add padding for this track as if the-padoption has been used but the amount of padding may be less than the paddingwritten by mkisofs.Note that if you use-isosizeon a track that contains Sparc boot information, the boot information willbe lost.
Note also thatthis option cannot be used to determine the size of a file systemif the multi session option is present.
- -pad
- If the track is a data track, 15 sectors of zeroed datawill be added to the end of this and each subsequent data track.In this case, the -pad option is superseded by the padsize=option. It will remain however as a shorthand forpadsize=15s.If the -pad option refers to an audio track,cdrecord will pad the audio data to be a multiple of 2352 bytes. The audio data padding is done with binary zeroes which is equal to absolute silence.
-pad remains valid until disabled by -nopad.
- padsize=#
- Set the amount of data to be appended as padding to the next track to #.Opposed to the behavior of the -padoption, the value for padsize=is reset to zero for each new track.Cdrecord assumes a sector size of 2048 bytes for thepadsize=option, independent from the real sector size and independent from the write mode.The megabytes mentioned in the verbose mode output however are countingthe output sector size which is e.g. 2448 bytes when writing in RAW/RAW96mode.Seefs=option for possible arguments.To pad the equivalent of 20 minutes on a CD, you may writepadsize=20x60x75s.Use this option if your CD-drive is not able to read the last sectors ofa track or if you want to be able to read the CDon a Linux system with the ISO-9660 filesystem read ahead bug.If an empty file is used for track data, this option may be used to create a disk that is entirely made of padding.This may e.g. be used to find out how much overburning is possible with a specific media.
- -nopad
- Do not pad the following tracks - the default.
- -shorttrack
- Allow all subsequent tracks to violate the Read Book track length standardwhich requires a minimum track length of 4 seconds.This option is only useful when used in SAO or RAW mode.Not all drives support this feature. The drive must be accept theresulting CUE sheet or support RAW writing.
- -noshorttrack
- Re-enforce the Red Book track length standard. Tracks must beat least 4 seconds.
- pregap=#
- Set the pre-gap size for the next track.This option currently only makes sense with the TEAC drive whencreating track-at-once disks without the 2 second silence before each track.
This option may go away in future. - -preemp
- If this flag is present, all TOC entries for subsequent audio tracks will indicate that the audio data has been sampled with 50/15 µsecpreemphasis.The data, however is not modified during the process of transferring from fileto disk. This option has no effect on data tracks.
- -nopreemp
- If this flag is present, all TOC entries for subsequent audio tracks will indicate that the audio data has been mastered with linear data - this is the default.
- -copy
- If this flag is present, all TOC entries for subsequent audio tracksof the resulting CDwill indicate that the audio data has permission to be copied without limit.This option has no effect on data tracks.
- -nocopy
- If this flag is present, all TOC entries for subsequent audio tracks of the resulting CDwill indicate that the audio data has permission to be copied only once forpersonal use -this is the default.
- -scms
- If this flag is present, all TOC entries for subsequent audio tracks of the resulting CDwill indicate that the audio data has no permission to be copied anymore.
- tsize=#
- If the master image for the next track has been stored on a raw disk, use this optionto specify the valid amount of data on this disk. If the image of the next track is stored in a regular file, the size of that file is taken to determinethe length of this track.If the track contains an ISO 9660 filesystem image use the -isosizeoption to determine the length of that filesystem image.
In Disk at Once mode and with some drives that usethe TEAC programming interface, even in Track at Once mode,cdrecordneeds to know the size of each track before starting to write the disk.Cdrecord now checks this and aborts before starting to write.If this happens you will need to runmkisofs -print-sizebefore and use the output (with `s' appended) as an argument to the tsize=option of cdrecord(e.g. tsize=250000s).
Seefs=option for possible arguments.
EXAMPLES
For all examples below, it will be assumed that the CD-Recorder isconnected to the primary SCSI bus of the machine. The SCSI target id isset to 2.
To record a pure CD-ROM at double speed, using data from the filecdimage.raw:
cdrecord -v speed=2 dev=2,0 cdimage.raw
To create an image for a ISO 9660 filesystem with Rock Ridge extensions:
mkisofs -R -o cdimage.raw /home/joerg/master/tree
To check the resulting file before writing to CD on Solaris:
mount -r -F fbk -o type=hsfs /dev/fbk0:cdimage.raw /mnt
On Linux:
mount cdimage.raw -r -t iso9660 -o loop /mnt
Go on with:
ls -lR /mnt
umount /mnt
If the overall speed of the system is sufficient and the structure ofthe filesystem is not too complex, cdrecord will run without creating animage of the ISO 9660 filesystem. Simply run the pipeline:
mkisofs -R /master/tree | cdrecord -v fs=6m speed=2 dev=2,0 -
The recommended minimum fifo size for running this pipeline is 4 MBytes.As the default fifo size is 4 MB, the fs=option needs only be present if you want to use a different fifo size.If your system is loaded, you should run mkisofs in the real time class too.To raise the priority of mkisofsreplace the command
mkisofs -R /master/tree
by
priocntl -e -c RT -p 59 mkisofs -R /master/tree
on Solaris and by
nice --18 mkisofs -R /master/tree
on systems that don't haveUNIX Internationalcompliant realtime scheduling.
Cdrecord runs at priority 59 on Solaris, you should run mkisofsat no more than priority 58. On other systems, you should run mkisofsat no less than nice --18.
Creating a CD-ROM without file system image on disk has been testedon a Sparcstation-2 with a Yamaha CDR-400. It did work up to quad speedwhen the machine was not loaded.A faster machine may be able to handle quad speed also in the loaded case.
To record a pure CD-DA (audio) at single speed, with each track containedin a file namedtrack01.cdaudio,track02.cdaudio,etc:
cdrecord -v speed=1 dev=2,0 -audio track*.cdaudio
To check if it will be ok to use double speed for the example above. Use the dummy write option:
cdrecord -v -dummy speed=2 dev=2,0 -audio track*.cdaudio
To record a mixed-mode CD with an ISO 9660 filesystem fromcdimage.rawon the first track, the other tracks being audio tracks from the filestrack01.cdaudio,track02.cdaudio,etc:
cdrecord -v -dummy dev=2,0 cdimage.raw -audio track*.cdaudio
To handle drives that need to know the size of a track before starting to write,first run
mkisofs -R -q -print-size /master/tree
and then run
mkisofs -R /master/tree | cdrecord speed=2 dev=2,0 tsize=XXXs -
where XXXis replaced by the output of the previous run of mkisofs.
To copy an audio CD in the most accurate way, first run
cdda2wav -vall cddb=0 -D2,0 -B -Owav
and then run
cdrecord -v dev=2,0 -dao -useinfo -text *.wav
This will try copy track indices and to read CD-Text information from disk.If there is no CD-Text information, cdda2wavwill try to get the information from freedb.org instead.
ENVIRONMENT
- CDR_DEVICE
- This may either hold a device identifier that is suitable to the opencall of the SCSI transport library or a label in the file /etc/default/cdrecord.
- CDR_SPEED
- Sets the default speed value for writing (see also -speedoption).
- CDR_FIFOSIZE
- Sets the default size of the FIFO (see also fs=#option).
- CDR_FORCERAWSPEED
- If this environment variable is set, cdrecordwill allow you to write at the full RAW encoding speed a single CPU supports.This will create high potential of buffer underruns. Use with care.
- RSH
- If the RSHenvironment is present, the remote connection will not be created viarcmd(3)but by calling the program pointed to byRSH.Use e.g. RSH=/usr/bin/sshto create a secure shell connection.
Note that this forces cdrecordto create a pipe to the rsh(1)program and disallowscdrecordto directly access the network socket to the remote server.This makes it impossible to set up performance parameters and slows downthe connection compared to a rootinitiatedrcmd(3)connection.
- RSCSI
- If the RSCSIenvironment is present, the remote SCSI server will not be the program/opt/schily/sbin/rscsibut the program pointed to byRSCSI.Note that the remote SCSI server program name will be ignored if you log inusing an account that has been created with a remote SCSI server program aslogin shell.
FILES
- /etc/default/cdrecord
- Default values can be set for the following options in /etc/default/cdrecord.For example:CDR_FIFOSIZE=8morCDR_SPEED=2
- CDR_DEVICE
- This may either hold a device identifier that is suitable to the opencall of the SCSI transport library or a label in the file /etc/default/cdrecord that allows to identify a specific drive on the system.
- CDR_SPEED
- Sets the default speed value for writing (see also -speedoption).
- CDR_FIFOSIZE
- Sets the default size of the FIFO (see also fs=#option).
- Any other label
- is an identifier for a specific drive on the system.Such an identifier may not contain the characters ',', '/', '@' or ':'.
Each line that follows a label contains a TAB separated list of items.Currently, three items are recognized: the SCSI ID of the drive, thedefault speed that should be used for this drive and the default FIFO sizethat should be used for this drive. The values for speedandfifosizemay be set to -1 to tell cdrecord to use the global defaults.A typical line may look this way:
teac1= 0,5,0 4 8m
yamaha= 1,6,0 -1 -1
This tellscdrecordthat a drive namedteac1is at scsibus 0, target 5, lun 0 and should be used with speed 4 anda FIFO size of 8 MB.A second drive may be found at scsibus 1, target 6, lun 0 and uses thedefault speed and the default FIFO size.
SEE ALSO
cdda2wav(1),
readcd(1),
scg(7),
fbk(7),
mkisofs(8),
rcmd(3),
ssh(1).
NOTES
On Solaris you need to stop the volume management if you like to use the USCSIfallback SCSI transport code. Even things like cdrecord -scanbuswill not work if the volume management is running.
Disks made in Track At Once mode are not suitable as a master for direct mass production by CD manufacturers.You will need the disk at onceoption to record such disks.Nevertheless the disks made inTrack At Once will normally be read in all CD players. Some oldaudio CD players however may produce a two second click between two audio tracks.
The minimal size of a track is 4 seconds or 300 sectors. If you write smaller tracks, the CD-Recorder will add dummy blocks. This is not anerror, even though the SCSI-error message looks this way.
Cdrecordhas been tested on an upgraded Philips CDD-521 recorder at single and double speed on a SparcStation 20/502 with no problems, slower computer systemsshould work also. The newer Philips/HP/Plasmon/Grundigdrives as well as Yamaha CDR-100 and CDR-102 work also. The Plasmon RF-4100work, but has not tested in multi session.A Philips CDD-521 that has not been upgraded will not work.The Sony CDU-924 has been tested, but does not support XA-mode2 in hardware.The sony therefore cannot create conforming multi session disks.The Ricoh RO-1420C works, but some people seem to have problems to use them with speed=2, try speed=0 in this case.
The Yamaha CDR-400 and all new SCSI-3/mmc conforming drives are supportedin single and multi-session.
You should run several tests in all supported speeds of your drive with the-dummyoption turned on if you are using cdrecordon an unknown system. Writing a CD is a realtime process. NFSwill not always deliver constantly the needed data rates.If you want to use cdrecord with CD-images that are located on aNFSmounted filesystem, be sure that the fifo size is big enough.I usedcdrecord with with medium load on a SS20/502 and even at quad speed on a Sparcstation-2 which was heavily loaded, but it is recommended to leave the systemas lightly loaded as possible while writing a CD.If you want to make sure that buffer underruns are notcaused by your source disk, you may use the command
cdrecord -dummy dev=2,0 padsize=600m /dev/null
to create a disk that is entirely made of dummy data.Cdrecordneeds to run as root to get access to the /dev/scg?device nodes and to be able to lock itself into memory.
If you don't want to allow users to become root on your system,cdrecordmay safely be installed suid root. This allows all users or a group ofusers with no root privileges to use cdrecord.Cdrecord in this case checks, if the real user would have been able to read the specified files.To give all user access to use cdrecord, enter:
chown root /usr/local/bin/cdrecord
chmod 4711 /usr/local/bin/cdrecord
To give a restricted group of users access to cdrecord enter:
chown root /usr/local/bin/cdrecord
chgrp cdburners /usr/local/bin/cdrecord
chmod 4710 /usr/local/bin/cdrecord
and add a group cdburnerson your system.
Never give write permissions for non root users to the /dev/scg?devices unless you would allow anybody to read/write/formatall your disks.
You should not connect old drives that do not supportdisconnect/reconnect to either the SCSI bus that is connected to theCD-Recorder or the source disk.
A Compact Disc can have no more than 99 tracks.
When creating a disc with both audio and data tracks, the data should be on track 1 otherwise you should createa CDplus disk which is a multi session disk with the first session containing the audio tracks and the following session containing the data track.
Many operating systems are not able to read more than a single data track, orneed special software to do so.
More information on the SCSI command set of a HP CD-Recorder can be found at:
http://www.hp.com/isgsupport/cdr/index.html
If you have more information or SCSI command manuals for currently unsupported CD-Recorders please contact the author.
The Philips CDD 521 CD-Recorder (even in the upgraded version)has several firmware bugs. Some of them willforce you to power cycle the device or to reboot the machine.
When using cdrecordwith the broken Linux SCSI generic driver.You should note that cdrecorduses a hack, that tries to emulate the functionality of the scg driver.Unfortunately, the sg driver on Linuxhas several severe bugs:
- *
- It cannot see if a SCSI command could not be sent at all.
- *
- It cannot get the SCSI status byte. Cdrecordfor that reason cannot report failing SCSI commands in somesituations.
- *
- It cannot get real DMA count of transfer. Cdrecordcannot tell you if there is an DMA residual count.
- *
- It cannot get number of bytes valid in auto sense data.Cdrecordcannot tell you if device transfers no sense data at all.
- *
- It fetches to few data in auto request sense (CCS/SCSI-2/SCSI-3 needs >= 18).
The fifo percent output is computed just after a block of data has been writtento the CD-Recorder. For this reason, there will never be 100% fifo fill,while the fifo is in streaming mode.
DIAGNOSTICS
You have 9 seconds to type ^C to abort cdrecordafter you see the message:
Starting to write CD at speed %d in %s mode for %s session.
A typical error message for a SCSI command looks like:
cdrecord: I/O error. test unit ready: scsi sendcmd: no errorCDB: 00 20 00 00 00 00status: 0x2 (CHECK CONDITION)Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00Sense Key: 0x5 Illegal Request, Segment 0Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0Sense flags: Blk 0 (not valid)cmd finished after 0.002s timeout 40s
The first line gives information about the transport of the command.The text after the first colon gives the error text for the system callfrom the view of the kernel. It usually is:
I/O errorunless other problems happen. The next words contain a short description forthe SCSI command that fails. The rest of the line tells you if there wereany problems for the transport of the command over the SCSI bus.
fatal errormeans that it was not possible to transport the command (i.e. no device presentat the requested SCSI address).
The second line prints the SCSI command descriptor block for the failed command.
The third line gives information on the SCSI status code returned by the command, if the transport of the command succeeds. This is error information from the SCSI device.
The fourth line is a hex dump of the auto request sense information for the command.
The fifth line is the error text for the sense key if available, followedby the segment number that is only valid if the command was acopycommand. If the error message is not directly related to the current command,the textdeferred erroris appended.
The sixth line is the error text for the sense code and the sense qualifier if available.If the type of the device is known, the sense data is decoded from tablesinscsierrs.c .The text is followed by the error value for a field replaceable unit.
The seventh line prints the block number that is related to the failed commandand text for several error flags. The block number may not be valid.
The eight line reports the timeout set up for this command and the timethat the command really needed to complete.
The following message is not an error:
Track 01: Total bytes read/written: 2048/2048 (1 sectors).cdrecord: I/O error. flush cache: scsi sendcmd: no errorCDB: 35 00 00 00 00 00 00 00 00 00status: 0x2 (CHECK CONDITION)Sense Bytes: F0 00 05 80 00 00 27 0A 00 00 00 00 B5 00 00 00 00 00Sense Key: 0x5 Illegal Request, Segment 0Sense Code: 0xB5 Qual 0x00 (dummy data blocks added) Fru 0x0Sense flags: Blk -2147483609 (valid)cmd finished after 0.002s timeout 40s
It simply notifies, that a track that is smaller than the minimum size has beenexpanded to 300 sectors.
BUGS
Cdrecordhas even more options than ls.
There should be a recover option to make disks usable, that have been writtenduring a power failure.
CREDITS
- Bill Swartz (Bill_SwartzAATTtwolf.com)
For helping me with the TEAC driver support
- Aaron Newsome (aaron.d.newsomeAATTwdc.com)
For letting me develop Sony support on his drive
- Eric Youngdale (ericAATTandante.jic.com)
For supplying mkisofs
- Gadi Oxman (gadioAATTnetvision.net.il)
For tips on the ATAPI standard
- Finn Arne Gangstad (finnagAATTguardian.no)
For the first FIFO implementation.
- Dave Platt (dplattAATTfeghoot.ml.org)
For creating the experimental packet writing support,
the first implementation of CD-RW blanking support,the first .wav file decoder and many nice discussions on cdrecord.- Chris P. Ross (crossAATTeng.us.uu.net)
For the first implementation os a BSDI SCSI transport.- Grant R. Guenther (grantAATTtorque.net)
For creating the first parallel port transport implementationfor Linux.- Kenneth D. Merry (kenAATTkdm.org)
for providing the CAM port for FreeBSD together with Michael Smith (msmithAATTfreebsd.org)- Heiko Eißfeldt (heikoAATThexco.de)
- for making libedc_ecc available (needed to write RAW data sectors).
MAILING LISTS
If you want to actively take part on the development of cdrecord,you may join the developer mailing list via this URL:
http://lists.berlios.de/mailman/listinfo/cdrecord-developers
The mail address of the list is:cdwriteAATTother.debian.org
AUTHOR
Joerg SchillingSeestr. 110D-13353 BerlinGermany
Additional information can be found on:
http://www.fokus.fhg.de/usr/schilling/cdrecord.html
If you have support questions, send them to:
cdrecord-supportAATTberlios.de
orcdwriteAATTother.debian.org
Of you have definitely found a bug, send a mail to:
cdrecord-developersAATTberlios.de
orschillingAATTfokus.fhg.de
To subscribe, use:
http://lists.berlios.de/mailman/listinfo/cdrecord-developers
orhttp://lists.berlios.de/mailman/listinfo/cdrecord-support
The old cdwrite mailing list may be joined by sending mail to:
cdwrite-requestAATTother.debian.org
and including the word
subscribein the body.The mail address of the list is:
cdwriteAATTother.debian.org
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- GENERAL OPTIONS
- TRACK OPTIONS
- EXAMPLES
- ENVIRONMENT
- FILES
- SEE ALSO
- NOTES
- DIAGNOSTICS
- BUGS
- CREDITS
- MAILING LISTS
- AUTHOR
This document was created byman2html,using the manual pages.