Burning
DVD+RW in Linux
Introduction
DVD+RW-tools
is a set of utilities for recording dvd+rw's in the Linux operating
system. It is the only set of utilities supported by Physics
Computing Services for this purpose. Use of these tools requires
installation of the software, as well as SCSI drivers and possibly
other
supporting software. This document assumes you have already had
these requirements setup by PCS.
Please note that
as DVD+RW/+R is a fairly infant technology (and one
that PCS has limited experience with), this document is most certainly
a
work-in-progress. Therefor you should check back occasionally in
case updates have been made to the burning methodology described.
You may want to check out the Other Resources section for
more information regarding DVD+RW/+R.
Writing initial
data to your DVD+RW/+R
Writing data to
the the DVD drive is a fairly straightforward process
using an application called growisofs. If you do not
have
this application installed, contact pcs@physics.ucsb.edu and
request it.
Once installed,
you can just run:
growisofs -Z <scsi-device-name> -R -J
<your-files-here>
What is this
doing? Well, growisofs is a DVD+R/RW
front-end to the old mkisofs command use to create
iso
filesystems. The -Z flag tells it you want to burn the data
directly (instead of creating an iso image file first). The
<scsi-device-name> is the name of your DVD+R/+RW device, usually
/dev/scd0.
The -R and -J flags tell it you want Rock-Ridge extensions and
Joliet filetypes (these allow for more flexibility when using Unix than
the traditional iso9660 format).
So, as a more
specific example, if I wanted to burn my home directory /home/happyuser
using the DVD writing device located at /dev/scd0, I would run:
growisofs -Z /dev/scd0 -R -J /home/happyuser
And viola!
I should then be able to mount the DVD (via the mount
/mnt/cdrom command) and read it. As I mentioned, since growisofs is really just a
front-end
to mkisofs, there is no man
page for the former. Instead, for available options, consult the mkisofs
manpage.
the -Z flag
mentioned above is the only new option that I'm aware of.
PLEASE NOTE:
Since you're translating your data to an ISO9660
filesystem, you may not keep all the permissions/ownership/etc that you
wanted! If you have permission problems, you can try creating a
tar of your data as follows: like
tar --preserve -cvf burn-this-file.tar
<your-files-here>
Then burning the
tar file to a DVD. This will ensure that the
files keep all ownership, permissions, and modification times that they
originally had. HOWEVER, tar is a fickle beast; if one byte goes bad in
the archive, you may lose ALL the data in the archive (particularly if
you use any kind of compression on the tar). For this reason, we don't
recommend burning tar's unless you absolutely need to.
BIG WARNING:
There is a known limitation in the mkisofs (and therefor the growisofs) command shipped
with all
current versions of RedHat Linux that won't allow you to burn more than
2GB of data at a time. You can burn multiple sessions of 2GB each
(see Adding
data to your DVD+RW
below), but only in 2GB increments. PCS is looking into a good
solution for this, but for now just make sure you burn in <2GB
increments.
Adding data to
your DVD+RW
This is where
the real power (and name) of growisofs
comes
into play.
If you're using a DVD+RW drive and media, you can use growisofs
to
quickly and easily
add data to DVD+RW. To do so, run growisofs
as
mentioned above, but
substitute -M for -Z (you must keep all other options the same!).
So, if I wanted to add the directory /home/saduser to the
DVD+RW I
burned earlier with /home/happyuser,I
would execute the following command:
growisofs -M /dev/scd0 -R -J
/home/saduser
When adding data
in this way, be sure to use the same options
(aside from substituting -M for -Z) that you did to burn the initial
session. For instance, above I burned my initial /home/happyuser
directory with
the -R and -J flags. So, when I added the /home/saduser
directory, I used
those same two flags. If I'd used other options, they would have
to be repeated as well.
Another thing
I've noticed is DVD+RW drives seem to like have the media
ejected and re-inserted each time a new burn session happens. I
don't know why. Also note that if you have any kind of
automounter running, you might notice it mount your DVD while you're
mid-burn. Don't worry about this; it will still burn just fine.
Formatting your
DVD+RW
It should go
without saying that you can ONLY do this if you have a
DVD+RW drive AND DVD+RW media! If you've just got DVD+R media,
then formatting them will be an exercise in futility (formatting will
write to them, then you won't be able to do anything after that).
To format your
DVD+RW (assuming your DVD writer is /dev/scd0), you
would run:
dvd+rw-format /dev/scd0
If you get an
error back that you've already got data on that
drive (and you're sure you still want to format, which of course
deletes
any existing data), run:
dvd+rw-format -force /dev/scd0
But make sure
that's what you really want!
Known Issues
- In between burn sessions, you sometimes need to eject and re-load
the DVD media from the drive.
- Since you're translating to iso9660, some
permissions/ownerships/etc may not be honored. If you use
Joliet/Rock-Ridge extensions (-R and -J outlined above) you'll get more
flexibility, but will still for instance be limited to 64 character
filenames (including full path). You may want to tar the files up
first to avoid this, but this is a dangerous prospect. Contact
pcs@physics.ucsb.edu for more information.
- Some DVD drives may not be able to read DVD+RW media that you
burn. See the DVD+RW/+R homepage
for more information on dealing with this.
- Occasionally, running multiple burn sessions sequentially in a
single login (even if you eject and re-insert the DVD) makes the
DVD drive inaccessible. This seems to happen more often when an
automounter (autofs or the Gnome or KDE automounters) of any type is
running and notices the DVD. The only known fix for this is a
reboot.
Mounting and Unmounting your DVD
- To mount: [sudo] mount /dev/cdrom
- To Unmount: [sudo] umount /dev/cdrom
- To eject: eject
Other Resources
Questions?
Email Physics
Computing Services at pcs@physics.ucsb.edu