Geophysical Fluid Dynamics Institute

How To's: DVD and CD Writing

This is a brief, working primier to DVD writting under Linux.

DVD (-) and regular plain ole CD's.

  1. Put all your files in one location. (I assume you can get here w/o help.)
  2. Make the image (iso from here on out) of the files.
    mkisofs -J -r -o $outputname $yourdir/
  3. So now you have an iso (image source object, or whatever) with Joliet and rockridge file extentions. This means windows and unix should be able to read this no problem.
  4. Now we write. I usually check and double check the filesize here. I'll include exact numbers later.
  5. Use For cd's (Anything smaller than 700 MB):
    cdrecord -v dev=0,0,0 speed=8 -dao -data $outputname
    For DVD's (anything larger than 700 MB):
    dvdrecord -v dev=0,0,0 speed=2 -dao -data $outputname
  6. Also, be it known that dvdrecord will work fine for cd's.
  7. The same command, with slightly different arguments is used for erasing both DVD-rw's and CD-rw's. From here on out, I'm just gonna use "cdrecord", please use which ever is appropriate to the task.
    cdrecord -v dev=0,0,0 speed=8 blank=$var
    If you want to blank the whole X-RW, use "all", else, "fast" usually works. If the rewritable media is giving problems, by all means use "all".
  8. Writting a re-writable media is no different than a regular write.
  9. After you've written the disk, CHECK IT.

DVD (+) Media... Slightly different..

This is geared toward writing with the new ide-cd style options. The difference is, the new Linux 2.6.7 enabled machines don't need to use the old SCSI Emulation formats. I assume the magic happens at the kernel level. The difference is:

  1. To do
            cdrecord -scanbus
            
    You actually need to do:
            cdrecord dev=ATAPI
            
  2. Or you can just use:
    
            cdrecord -v dev=/dev/hdd speed=8 -dao -data $blah
            

DVD+RW initialization:

DVD+R media must be initialized. This is actually pretty simple. We use the dvd+rw-tools debian packages.

        medea:/home# dvd+rw-format /dev/hdd

Writing to the new initialized +RW

Write contents of a directory(or file) to a newly initialized DVD+RW
        medea:/home# growisofs -Z /dev/scd1=image.iso

Or you can mesh the two steps, and eliminate the mkisofs intermediate step. (Nice!)

        medea:/home/# growisofs -Z /dev/hdd -R -J /home/blah/Backups/

More multi session madness coming soon. I don't think I've ever actually used multisession. It just always seemed like a Bad Idea. :)