wodim command_examples
wodim – write data to optical disk media
For all examples below, it will be assumed that the CD/DVD-Recorder is connected to the primary SCSI bus of the machine. The SCSI target id is set to 2.
To record a pure CD-ROM at double speed, using data from the file cdimage.raw:
wodim -v speed=2 dev=2,0 cdimage.raw
To create an image for a ISO 9660 filesystem with Rock Ridge extensions:
genisoimage -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 of the filesystem is not too complex, wodim will run without creating an image of the ISO 9660 filesystem. Simply run the pipeline:
genisoimage -R /master/tree | wodim -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 genisoimage in the real time class too. To raise the priority of genisoimage replace the command
genisoimage -R /master/tree
by
priocntl -e -c RT -p 59 genisoimage -R /master/tree
on Solaris and by
nice --18 genisoimage -R /master/tree
on systems that don’t have UNIX International compliant real-time scheduling.
wodim runs at priority 59 on Solaris, you should run genisoimage at no more than priority 58. On other systems, you should run genisoimage at no less than nice –18.
Creating a CD-ROM without file system image on disk has been tested on a Sparcstation-2 with a Yamaha CDR-400. It did work up to quad speed when 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 contained in a file named track01.cdaudio, track02.cdaudio, etc:
wodim -v speed=1 dev=/dev/cdrw -audio track*.cdaudio
To check if it will be ok to use double speed for the example above. Use the dummy write option:
wodim -v -dummy speed=2 dev=/dev/cdrw -audio track*.cdaudio
To record a mixed-mode CD with an ISO 9660 filesystem from cdimage.raw on the first track, the other tracks being audio tracks from the files track01.cdaudio, track02.cdaudio, etc:
wodim -v 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
genisoimage -R -q -print-size /master/tree
and then run
genisoimage -R /master/tree | wodim speed=2 dev=2,0 tsize=XXXs -
where XXX is replaced by the output of the previous run of genisoimage.
To copy an audio CD in the most accurate way, first run
icedax dev=/dev/cdrom -vall cddb=0 -B -Owav
and then run
wodim dev=/dev/cdrw -v -dao -useinfo -text *.wav
This will try to copy track indices and to read CD-Text information from disk. If there is no CD-Text information, icedax will try to get the information from freedb.org instead.
To copy an audio CD from a pipe (without intermediate files), first run
icedax dev=1,0 -vall cddb=0 -info-only
and then run
icedax dev=1,0 -no-infofile -B -Oraw - | wodim dev=2,0 -v -dao -audio -useinfo -text *.inf
This will get all information (including track size info) from the *.inf files and then read the audio data from stdin.
If you like to write from stdin, make sure that wodim is called with a large enough FIFO size (e.g. fs=128m), reduce the write speed to a value below the read speed of the source drive (e.g. speed=12), and get a CD/DVD drive with BURN-Free feature if it is not available yet.
To set drive options without writing a CD (e.g. to switch a drive to single session mode), run
wodim dev=1,0 -setdropts driveropts=singlesession
If you like to do this when no CD is in the drive, call
wodim dev=1,0 -force -setdropts driveropts=singlesession
To copy a CD in clone mode, first read the master CD using:
readom dev=b,t,l -clone f=somefile
or (in case the CD contains many sectors that are unreadable by intention) by calling:
readom dev=1,0 -clone -nocorr f=somefile
will create the files somefile and somefile.toc. Then write the CD using:
wodim dev=1,0 -raw96r -clone -v somefile
One Reply to “wodim command_examples”