Tuesday, October 9, 2007

Howto: Debian(linux) write (burn) data to DVD or DVD/RW

In order to write DVD/DVD-RW from shell prompt you need to install a package called dvd+rw-tools.

DVD is another good option for backup, archiving, data exchange etc. You can install dvd+rw-tools with following commands. Also note that this package works under *BSD, HP-UX, Solaris and other UNIX like operating systems.

Debian installation:

# apt-get install ‘dvd+rw-tools’

In order to write DVD you need to install cdrecord tools.

How do I write DVD?

You need to use growisofs command, which combined mkisofs frontend/DVD recording program. From growisofs man page, “growisofs was originally designed as a frontend to mkisofs to facilitate appending of data to ISO9660 volumes residing on random-access media such as DVD+RW, DVD-RAM, plain files, hard disk partitions. In the course of development general purpose DVD recording support was implemented, and as of now growisofs supports not only random-access media, but even mastering of multiession DVD media such as DVD+R and DVD-R/-RW. In addition growisofs supports first-/single-session recording of arbitrary pre-mastered image (formatted as UDF, ISO9660 or any other file system, if formatted at all) to all supported DVD media types.

First create the ISO image

# mkisofs -r -o /tmp/var-www-disk1.iso /var/www

Now use the growisofs command to write the ISO onto the DVD:

# growisofs -Z /dev/dvd=/tmp/var-www-disk1.iso

To append more data for same DVD:

# growisofs -M /dev/dvd /tmp/file.1

To format (erase) a DVD:

# dvd+rw-format -force /dev/dvd

OR

# dvd+rw-format -force=full /dev/dvd

The dvd+rw-format command formats dvd disk in the specified dvd drive.

To display information about dvd drive and disk using dvd+rw-mediainfo command:

# dvd+rw-mediainfo /dev/dvd

See also:

No comments: