wodim
Write data to optical discs
TLDR
Display optical drives available to wodim
Record ("burn") an audio-only disc
Burn a file to a disc, ejecting the disc once done (some recorders require this)
Burn a file to the disc in an optical drive, potentially writing to multiple discs in succession
SYNOPSIS
wodim [options] [trackfile ...]
PARAMETERS
dev=target
Specifies the SCSI device to use. target can be a device path (e.g., /dev/sr0), a SCSI address (bus,id,lun), or an ATAPI address (ATAPI:bus,id,lun).
-v
Increases verbosity, displaying more information about the burning process.
-dummy
Performs a dummy run; simulates the burning process without actually writing data to the disc. Useful for testing settings.
-dao
Sets the Disc-At-Once burning mode. The entire disc is written in a single session.
-tao
Sets the Track-At-Once burning mode. Each track is written individually, potentially with linking blocks between them.
-data
Indicates that the following track(s) are data tracks (e.g., ISO images).
-audio
Indicates that the following track(s) are audio tracks.
-speed=N
Sets the burning speed to N (e.g., 8, 16, 24). Use 0 for maximum supported speed.
-eject
Ejects the disc from the drive after the burning process is complete.
-blank=type
Blanks a rewritable disc. type can be 'all' (full blank) or 'fast' (quick blank).
-scanbus
Scans for available SCSI/ATAPI CD/DVD/BD writer devices on the system.
-prcap
Prints the drive's capabilities, including supported speeds, disc types, and burning modes.
-fs=N
Sets the FIFO (First-In, First-Out) buffer size in bytes. Larger buffers can help prevent 'buffer underrun' errors.
DESCRIPTION
wodim is a powerful command-line utility used for writing data, audio, and video to various optical disc formats, including CDs, DVDs, and Blu-ray discs. It functions as a successor and open-source re-implementation of the classic cdrecord tool, providing robust features for disc mastering and burning. wodim supports multiple burning modes like Track-At-Once (TAO), Disc-At-Once (DAO), and Session-At-Once (SAO), and can handle different types of input, such as ISO images, audio files, and raw data streams.
It is an essential tool for system administrators and users who need to automate disc burning tasks, create bootable media, or perform disc operations on headless servers where a graphical interface is not available. While primarily used for burning, wodim also offers functionalities like disc blanking, scanning for SCSI/ATAPI devices, and simulating burn processes to prevent disc wastage.
CAVEATS
Using wodim requires appropriate permissions, often root privileges or being a member of the 'cdrom' group. Incorrect usage, especially with blanking or formatting commands, can lead to data loss on rewritable media. Device naming can be complex, and proper identification of the target drive is crucial. On some systems, ATAPI drives might require SCSI emulation to be enabled for wodim to function correctly.
BURNING MODES EXPLAINED
Track-At-Once (TAO): Writes tracks individually. Allows gaps between tracks and adding more tracks later to the same disc (multi-session for CD-R).
Disc-At-Once (DAO): Writes the entire disc in a single session, including lead-in and lead-out. No gaps between tracks. Essential for audio CDs that require precise timing or for finalizing a disc.
Session-At-Once (SAO): Similar to DAO but for multi-session discs, allowing multiple sessions to be recorded completely and independently.
DEVICE SPECIFICATION (DEV=)
The dev= option is critical for telling wodim which optical drive to use. It can be specified in several ways:
SCSI Bus,ID,LUN: 0,0,0 (for a device at SCSI bus 0, ID 0, LUN 0). You can find these using wodim -scanbus.
Device Path: /dev/sr0 (common on Linux for the first optical drive).
ATAPI Device: ATAPI:0,0,0 (for ATAPI drives, sometimes requires SCSI emulation in the kernel).
HISTORY
wodim emerged as a free and open-source alternative to cdrecord, which was originally part of the cdrtools package developed by Joerg Schilling. Due to changes in cdrtools' licensing terms (from GPL to CDDL), many Linux distributions (like Debian and Ubuntu) opted to fork cdrecord to maintain a fully GPL-licensed disc burning utility. This fork resulted in wodim (Write Optical Disc IMg), which is typically found within the cdrkit package. It aims to provide compatible functionality with its predecessor while adhering to open-source licensing principles, ensuring its availability and continued development in mainstream Linux distributions.
SEE ALSO
genisoimage(1), mkisofs(8), growisofs(1), cdrecord(1)