Burning DVD/CDs in Linux

 

*NEW* Burning DVD/CDs with the X-CD-Roast GUI
A GUI frontend for cdrtools has been installed called xcdroast. It requires version 2.0 or higher of cdrtools, and uses cdrecord-ProDVD to write DVDs. As well, to burn DVDs, you must add a security key that is required due to the restrictions imposed on DVD writers. In xcdroast, goto Setup->Options to find the cdrecord-ProDVD key field called CDR_SECURITY key. The key will, reportedly, expire after a certain time period, so a new key can be found in the README at the following address:

ftp://ftp.berlios.de/pub/cdrecord/ProDVD/README

The provided key is for private/research/educational purposes.

You can find X-CD-Roast by running /usr/bin/xcdroast on idun.

While X-CD-Roast provides a significant number of features, the most useful options for performing simple file backups can be found by going to "Create CD/DVD"->"Master Tracks". From here, you can add items from the File/Directory view into the Session view. By unchecking "Display directories only", it is possible to select individual files. Next, click on "Create session/image" where you can burn to an image file (ISO) or write directly to disc using the "Master and write on-the-fly" button. Make sure to check the "Enable protection from Buffer Underruns" option, especially if you are burning across the network.

Note that the typical CD type should be set to 80 min (700 MB), and the typical DVD should be set to 4.7 GB. It is also in the "Create session/image" tab that the option to erase/clear CD/DVD-RWs can be found at "Blank CD/DVD+-RW".

*Important: Make sure that the correct "Write Device" has been selected from the pull-down menu. The device listing is only updated manually from the Setup menu, so devices might be listed that are no longer installed on the machine.

The website and full documentation for X-CD-Roast can be found at:

http://www.xcdroast.org/

Burning DVD/CDs at the command line
Command line DVD/CD authoring in Linux is accomplished by using mkisofs and cdrecord(.ProDVD). mkisofs is used to package the data to be burned into a pre-mastered image in an ISO9660 format (other formats like JOLIET and HFS are also possible) called an ISO file (usually with a .iso extension). A .iso file can be mounted in the normal fashion and accessed as a read-only file system. cdrecord (or cdrecord.ProDVD) can write to a writable CD or DVD from either a .iso file or directly from another device (ie CD-to-CD copying). All settings for cdrecord are also used with cdrecord.ProDVD to burn DVDs.

The newest versions of these tools are distributed together in a package called cdrtools (all versions after 2.0). cdrecord.ProDVD might have to be downloaded separately. You should ensure that you have version 2.0 or newer of these tools. You can check this by running any of these programs with the extension ‘--version’.

To confirm that your CD/DVD drive has been configured, as root, type:

$ cdrecord --scanbus

This will list all detected drives on the SCSI bus. Linux interacts with both IDE and USB devices through a SCSI emulation layer, so all devices should be seen as SCSI devices, regardless of what interface they are actually connected with.

Once you have confirmed that your drive has been properly configured, you can prepare an .iso file with mkisofs in the following manner:

$ mkisofs -o test.iso -Jrv -V test_disk /home/gmd/

In this example:

  • -o names the new .iso image file (test.iso)
  • -J uses Joliet naming records, for Windows compatibility
  • -r uses Rock Ridge naming conventions for UNIX/Linux compatibility, and makes all files publicly readable (can also use -R)
  • -v sets verbose mode, for a running commentary as the image is created
  • -V provides a volume ID (test_disk); this is the disk name that shows up in Windows Explorer
  • Last in the list are the files selected for packaging into the .iso (everything in /home/gmd/)

See the end of this document for some extra info on mkisofs.

Now you can mount the .iso for verification. It is probably a good idea to create a test directory:

$ mkdir /test_iso
$ mount -t iso9660 -o ro,loop=/dev/loop0 test.iso /test_iso    

Look at the directory contents; all of the files should be there and readable. If they are not, the image is bad, and if you burn it onto a disk, you'll end up creating a coaster.

Now, before the .iso can be burned, we must determine the SCSI target for burner. This can be done using the ‘–scanbus’ command:

The output from the above has been modified to show only the relevant line. In the above, the target for the burning is ‘2,0,0’. We can now write the disc:

$ cdrecord -v -eject –dao speed=8 dev=2,0,0 test.iso

This should successfully burn the disc, while showing you a nice progress report.

Some important cdrecord options (not all used in the above):

  • -v sets Verbose mode. This will display the progress of the writing process plus some extra information.
  • -dummy means he recorder will perform the entire recording process with the laser off. This is useful to determine how fast a system can handle burning.
  • -dao sets Disk-at-once burning (also called Session at once).
  • -eject tells the program to eject the disc after completing the write process
  • speed=# sets the speed factor for the writing process. Is a multiple of the base writing speed (150KB/s for CDROM, 170KB/s for CD-Audio). If not speed option is specified, the CDR_SPEED environment variable will be used.
  • blank=type this option allows blanking a re-writable DVD/CD before writing. Types: all – blanks the entire disk, but takes a long time; fast – minimally blanks the entire disk, good most of the time; unclose – unclose the last session; session – blank the last session.
  • dev=target sets the SCSI target for the recorder. This target can be determined using the --scanbus command on cdrecord. A typical target would be ‘1,0,0’. It is possible to set a target that is on a remote system, but you’ll have to refer to the more detailed documentation for how to accomplish this. If no dev option is used, cdrecord will try to get the device from the CDR_DEVICE environment variable.
  • driverotps=burnfree this option allows the use of buffer underrun protection that is common in most new drives. The default is to have burnfree set to off, but is very useful to ensure that the no errors occur during the burn process.

If the overall speed of a system is sufficient, cdrecord can run without first creating an .iso file. Just use the pipe:

mkisofs –R /home/gmd | cdrecord –v –dao dev=2,0,0 –  

mkisofs

  • -path-list file gives the name of a file containing a list of directories and filenames to be added to the .iso filesystem. This list is processed after any that appear on the command line. If the argument is ‘-‘ then the list is read from the standard input (ie. keyboard).
  • -V volid specifies the volume ID to be written onto the disc. This name is assigned to the disc when mounted, or when loaded in MSWindows.

Top | Back

 
© 2006 Carleton University 1125 Colonel By Drive, Ottawa, Ontario, K1S 5B6 Canada (613) 520-7400
| Contacts |
Canada's Capital University