# Dvd+rw-tools

dvd+rw-tools (also known as growisofs, its main part) is a collection of open-source DVD and Blu-ray Disc tools for Linux, OpenBSD, NetBSD, FreeBSD, Solaris, HP-UX, IRIX, Windows and OS X. dvd+rw-tools does not operate on CD media.
The package itself requires another program which is used to create ISO 9660 images on the fly. This is provided by mkisofs (from the cdrtools package) or genisoimage (from the cdrkit package) or a symbolic link xorrisofs to xorriso (from the libisoburn or GNU xorriso package).
Released under the GNU General Public License, dvd+rw-tools is free software.

## Programs

* growisofs burns data to DVD or BD media.
* dvd+rw-mediainfo reports about drive and medium status.
* dvd+rw-format formats some types of media, blanks DVD-RW media.
* dvd-ram-control controls Defect Management and write protection of DVD-RAM media.
* dvd+rw-booktype sets the Book Type property of DVD media.

## growisofs

growisofs is a SCSI/MMC driver in userspace for burning optical media, like cdrecord or libburn. Its original purpose is to coordinate burning with a run of mkisofs or genisoimage (depending on repository), so that ISO 9660 multisession writing becomes possible on DVD+RW media, making it possible to add new files to a partially written disc with existing files.
Soon after, it supported all kinds of DVD media and later also BD (Blu-ray) media. Further it can burn preformatted data images onto the media, not needing any ISO 9660 formatter program for this task.
growisofs employs a Ring Buffer in userspace to smoothen the data transmission to the drive. The fill level of this buffer is reported during a burn run as "RBU", whereas the fill level of the drive's built-in buffer is reported as "UBU".
growisofs is able to create a UDF 1.02 file system that co-exists with the ISO9660 on the same disc or image, but it can not an create UDF-only disc or image. Additionally, multisessioning (adding new files to a disc with existing files) is only supported for ISO9660 file systems, not UDF.
Some undocumented options in the program are prefixed with -use-the-force-luke=, which is a Star Wars reference. Such options are not meant for regular use but for power users who "know what they're doing". For example, -use-the-force-luke=spare:none doubles the writing speed on Blu-ray by deactivating the write verification process that ensures written data is readable right after it was written and repeats writing any data found to be unreadable. Deactivating it can be desirable to save time while mass-producing physical copies of data, given that errors are highly unlikely to occur on new blank media from a reputable brand. This option has no effect on DVD writing given that DVDs have no write verification feature.
Note that "write verification" is not an official term for the feature, only a description for what it does.
Example usage:
In this example, a file system is generated "on the fly", meaning in real time during the writing process. The -use-the-force-luke=notray keeps the tray closed after the burning process to prevent it from collecting dust when the computer is not in use. -overburn tells the drive to try burning beyond the available capacity of the disc. However, if the drive refuses to write beyond a certain point, the program can not overrule the drive. Without this option, growisofs will refuse to write data if it estimates the selected files exceed the size of the disc. -speed=6 sets a desired writing speed. If the speed is not supported by the drive or the disc type, the drive will usually write at a speed as close to the specified speed as possible.
The parameters Z /dev/sr0 are inherited from genisoimage and enable the Rock Ridge extension, create a UDF file tree for files that exceed 4 GiB, and specify a volume label to be shown in file managers. The commands inherited from genisoimage can not be specified intermittently with the ones specific to growisofs and have to come only after them, but can be in any order desired.
Like genisoimage, growisofs places the files and folders inside "parent directory" directly in the root directory of the disc, not inside a directory named "parent directory", like file archival utilities such as tar do.
Instead of generating a file system "on the fly", this command burns an existing image file to the disc. The commands inherited from genisoimage or mkisofs are not needed, since they are only necessary for creating a new file system.
For previewing the space that will be occupied by a selection of files and the file system header, the -print-size parameter can be used. Together with -quiet, this will suppress any output except for the calculated size. The size is displayed in logical blocks, meaning units of 2048 bytes. This means that, for example, 12219392 logical blocks would fill up a single-layer BD-R (capacity table). This can be used to find out how much space will remain on a disc after a write with a given selection of files is completed. By default, the tool refuses to write data if it detects that a disc doesn't have enough space for the selected files. This can be overridden with the -overburn parameter. The dvd+rw-mediainfo tool can determine how much space is currently in use and how much is unused.