Tuesday, May 8, 2007

Burning ISO Images

The default CD and DVD-R burning application for Debian is called "wodim" (Write Optical Disc IMage). It's a fork of Jörg Schilling's cdrecord, which changed its license to the GPL-incompatible CDDL after... well, we won't go there.

To burn a CD or DVD image I usually do something like the following:

$ /usr/bin/wodim -v -data -eject -dao speed=10 dev=/dev/cdrom file.iso

The options are -v for verbose, -data for CD-ROM mode 1 (Yellow Book, the usual data format), -eject for ejecting the disc after burning, -dao for Disc-At-Once mode, speed=10 indicates a data transfer rate of 10 (replace with something sensible for your drive) and dev=/dev/cdrom should point to your CD device. The file you want to burn is file.iso. This apparently works as well for DVD ISO images as well as CDs. The wodim manual page recommends doing this as root.

To create an ISO image quickly from a directory, you can do this:

$ genisoimage -r -J -V CDLabel -o image.iso /path/to/files

The options are -r for generating the SUSP and RR records (it's a necessary step), -J for Joliet, -V CDLabel for the 32-character volume label and -o image.iso specifies the output file (replace as needed). The /path/to/files will contain the root directory of your CD.

You can test mount the ISO image as follows:

$ mount -t iso9660 -o ro,loop=/dev/loop0 image.iso /path/to/mountpoint


If you want to verify that the data was written correctly, see the guide I wrote here.

I put this post up here because I keep forgetting how to burn ISO images :).

4 comments:

Irwan said...

As a beginner, I'm just using k3b :)

Dreamer said...

Right Click --> Write to disc...

:D

mnajem said...

use NERO instead :D

hussein said...

None of those options make any sense on a headless server :p