2004.01_Dvd Programs-the Essential Linux Dvd Writing Software.pdf

(1071 KB) Pobierz
Layout 1
COVER STORY
DVD Burning
Flint and Tinder
No matter whether you have DVD-R(W), DVD+R(W), or DVD-RAM media, the
quickest way to burn a Linux data DVD from an image, or with your weekly
hard disc backup, is the command line. BY MIRKO DÖLLE
on your DVD, it will not involve
a great deal of installation effort.
Of course you will need to equip your PC
with a DVD burning device, if you do not
already have one. And ensure that the
drive supports the formats you require,
as the manufacturers have so far been
unable to agree on a standard.
Three distinct DVD media families
have evolved so far: DVD-R(W),
DVD+R(W) and DVD-RAM. Some new
drives support multiple formats. DVD-R
and DVD+R devices will also burn CD
media. Linux can handle any of these
formats, although you do need a differ-
ent configuration depending on the type.
though your distribution’s hardware
recognition feature may take care of that
automatically. As CD or DVD burning
devices are controlled by SCSI com-
mands, you have to fool the operating
system into thinking that the IDE device
is a SCSI device. This IDE/SCSI emula-
tion is a kernel feature of most modern
distributions, although the boot loader
configuration file, for example, /etc/
lilo.conf will need to be modified. Use an
editor to append a line such as the fol-
lowing to the file,
RAM medium in your first DVD burning
device. You can then enter mount
/dev/scd0 /mnt to mount the medium,
and use the command line (or a file
manager) to copy data onto the medium,
just like any other hard or floppy disk.
Before removing the medium, make sure
that you unmount the DVD-RAM to
allow any data in the buffer to be written
out to the DVD. Sadly, not all drives can
read DVD-RAMs.
Special programs are required to write
data and videos on DVD media. Many
distributions include the dvdrecord pack-
age (dvdrtools [1]), and support
DVD-R(W) drives. The program is actu-
ally a re-worked version of cdrtools.
Growisofs, one of the dvd+rwtools,
is an alternative to dvdrecord and ca-
pable of writing a whole range of
formats; DVD-R, DVD-RW, DVD+R, and
DVD+RW. But growisofs’ handling is
completely different from that of
dvdrecord [2].
append = "hdd=ide-scsi"
taking care to replace hdd with the inter-
nal IDE descriptor for your burning
device (in our example, the drive is
attached as a slave to the secondary IDE
port). Then reboot to apply the changes.
SCSI or IDE
Attaching a SCSI burning device to a
SCSI controller that you set up previ-
ously should be quite simple. The
controller and the devices attached to it
– assuming that the bus is wired and ter-
minated correctly – should be visible to
and useable by any Linux distribution.
Setting up an IDE burning device does
involve a few additional settings, al-
Media Types
DVD-RAM media do not need special dri-
vers. If your drive can handle this kind of
media, you can access the medium just
like a normal floppy. For example,
mke2fs /dev/scd0 will format the DVD-
Commercial Programs
If this is too confusing for you, you
might prefer cdrecord-ProDVD, an en-
GLOSSARY
DVD-R and DVD-RW: The DVD-R standard
specifies write-once media, the DVD coun-
terpart of the CD-R. Most drives support
DVD-R. Just like CD-RWs soon appeared to
supplement CD-Rs, it was not long until
write-many DVD-RWs became available.
DVD+R and DVD+RW: The DVD burning
device issue soon split the manufacturers’
camp. While the DVD-R format was adopted
as the de-facto standard, another group of
manufacturers decided to launch its own
format. But neither of these camps has been
able to capture the market completely. This
means that there is a second DVD standard,
DVD+R(W).
DVD-RAM: This format supports capacities
of up to 4.8 GB and up to 100,000 write
operations in theory (DVD+/-RW supports
up to 1,000 write ops). DVD-RAM does not
require additional drivers or tools on Linux.
On the downside, the DVD-RAM media are
more expensive.
SCSI: The Small Computer Systems Interface
is a bus that transfers data between attached
devices and the SCSI controller card. As the
bus can be extended outside the computer
case, this provides the flexibility to attach up
to 15 internal or external devices. There are
some differences between the various SCSI
types. SCSI 2, Fast SCSI, Ultra SCSI, Wide SCSI,
Ultra Wide SCSI, and Ultra2Wide SCSI.
IDE: Integrated Drive Electronics is not a bus,
but an interface that can support a maxi-
mum of two devices. The controller
evaluates the jumper position to distinguish
between the two devices, assigning the mas-
ter role to one, and the slave role to the
other. EIDE means Enhanced IDE and
removes the older 504 MB limit for attached
drives. ATA is an extension of the EIDE stan-
dard. IDE interfaces are identified by their
data transfer speeds: UDMA/33, UDMA/66,
UDMA/100, and UDMA/133, where the fig-
ures indicate the maximum transfer rate in
MB/s.
24
January 2004
www.linux-magazine.com
DVD burning programs under Linux
N o matter what you want to put
564314214.003.png
DVD Burning
COVER STORY
hanced, commercial variant of cdrecord
that supports DVD-R/W and DVD+R/W.
The license is free for private use [3].
Pre-compiled packages are available for
a number of platforms.
If you intend to burn DVD media, you
will need to install the dvd+rw-tools,
dvdrtools (dvdrecord) or cdrecord-
ProDVD package, depending on your
drive. RPM packages for your distribu-
tion are available from the Rpmseek site
[4], and some distributions include the
package by default.
ure 1, 0,0,0 and 1,0,0 are both burning
devices. The following example copies a
DVD from the first SCSI drive on the first
(virtual) controller:
The limit for images is again 4482 MB.
Older systems cannot handle files that
exceed 2 GBytes; the command
readcd dev=0,0,0 f=image
dvdrecord speed=2 dev=0,0,0 -v U
image
mkisofs -r -J -split -o /tmp/ U
image .
will split your directory tree into 1 GB
images that dvdrecord recognizes as a
group of image files, storing them
accordingly on the DVD medium.
The first line reads the inserted DVD,
and stores its contents in an image file.
The second line burns this image at
dual-speed. However, this approach is
restricted to copying DVDs with a maxi-
mum capacity of 4482 MB. In addition to
this, DVD-R drives are also useful for cre-
ating backups. The following command
creates an image of the current directory
with subdirectories:
DVD-RW
dvdrecord can also handle rewritable
DVD-RW media (cdrecord-ProDVD also
burns DVD+R and DVD+RW).
dvdrecord / cdrecord-ProDVD
Using dvdrecord and cdrecord-ProDVD is
identical to using cdrecord, so we will
only be looking at one example in this
article. All three burning programs
assign a SCSI ID to the drive using the
0,0,0 or 0,1,0 format. The following com-
mand
dvdrecord -v speed=2 dev=0,0,0 U
blank=fast
mkisofs -r -J -o /tmp/image .
performs a quick format, while
cdrecord --scanbus
A similar command to our last example
will burn the image:
dvdrecord -v speed=2 dev=0,0,0 U
blank=all
outputs a list of SCSI devices, where the
first column contains the SCSI ID. In Fig-
dvdrecord speed=2 dev=0,0,0 -v U
/tmp/image
erases the medium. The write operation
is identical for DVD-RW and DVD-R.
EASY TO BUY EASY TO SET UP EASY TO SEE
EasyVserver solutions
Debian or RedHat O/S
True “root” access
4, 6 or 8GB raid space
1IP address
Highly secure
p-p-p-pick up
a dedicated linux server
Make the most of Linux technology with the big name in Web registration and hosting
packages. Our flexible, scalable, secure EasyVserver solutions start at just £39 per
month. Back up by unrivalled support and know-how. If you want the best of Linux
come along for the ride.
log on today at: www.easyspace.com
Established in 1997 with over 1 / 2 million customers. Accredited ICANN registrar & nominet member. Prices exclude VAT.
564314214.004.png 564314214.005.png 564314214.006.png
COVER STORY
DVD Burning
Figure 1: The cdrecord -scanbus command lists the devices attached to the
SCSI subsystem; in our example, the numbers 0,0,0 and 1,0,0 point to burn-
ing devices
Figure 2: DVD backups, of the users’ home directories in our example, are
easy to create using growisofs
Differences
By default, and as previously mentioned,
dvdrecord has the same options and fea-
tures as cdrecord and its commercial
offshoot cdrecord-ProDVD. The manpage
also describes options similar to those of
cdrecord; and that is a good thing, as you
can use dvdrecord to burn CDs.
But hands-on tests revealed one or two
rough edges. You can launch a (non-
standard) multi-session mode burning
process for a data DVD-R, but this opera-
tion will abort without returning a
meaningful error message. The only
burning mode that dvdrecord supports
for DVD media is the DAO (disc at once)
format, and you can’t use the --overburn
option. In contrast to this, other options,
such as auto-ejecting DVDs after com-
pleting the burning operation, work fine.
The commercial cdrecord-ProDVD
package does not have any of these
weaknesses. It is a more mature program
altogether; and it supports both Minus
and Plus formats, that is, it works fine
with practically any combination of DVD
burning devices and media.
from [4]; you can use your package man-
ager to install the appropriate package.
But if you prefer to compile the sources,
simply download the source archive
from the homepage and use make and
make install to compile and install.
The installed package provides a num-
ber of command line functions that
allow you to write DVD+Rs; the backup
function being one of the more interest-
ing. A simple command will create a
DVD image of a filesystem tree and store
it on a DVD+R medium:
Closing the DVD session makes it easier
for other computers and drives to then
read the media. The -lead-out option
takes care of this. Let’s look at an exam-
ple:
dvd+rw-format -lead-out /dev U
/scd0
Conclusion
It is typically quite easy to create simple
data DVDs on Linux. cdrecord-ProDVD
and growisofs support almost any bur-
ning device and media types. Un-
fortunately, complex DVD mastering is
still more or less unsupported under
Linux.
After setting up the command line-
based burning process, you can of course
opt for a GUI-front-end, such as X-CD-
Roast [5] or K3b [6].
growisofs -R -J -Z /dev/scd0 U
/home
In this and the following examples, make
sure that you point to the SCSI device file
for your DVD drive. /proc/scsi/scsi
should provide the information you
need. The first SCSI drive in this file will
be /dev/scd0 , the second /dev/scd1 and
so on.
Yo u can use a slightly different com-
mand to write additional files to the
same medium: growisofs -R -J -M
/dev/scd0 /data (-M instead of -Z). And
the following command will burn an
existing DVD image
INFO
[1] DVD-R tools with dvdrecord:
http://www.nongnu.org/dvdrtools/
[2] DVD+RW tools with growisofs and
dvd+rw format: http://fy.chalmers.se/
~appro/linux/DVD+RW/
[3] CD-Record and CD-Record-ProDVD:
http://www.fokus.gmd.de/research/cc/
glone/employees/joerg.schilling/private/
cdrecord.html
[4] RPM search engine:
http://www.rpmseek.com/
[5] X-CD-Roast project homepage:
http://www.xcdroast.org/
[6] K3b project homepage:
http://www.k3b.org/
growisofs
The fact that dvdrecord is restricted to
DVD-R(W), means that you will need the
dvd+rw-tools package to support
DVD+R(W) drives, if you want to use
Open Source only software.
As the Plus tools introduced Minus
burning device support in version 5.14,
growisofs has now started to outstrip
dvdrecord. Pre-compiled RPM packages
for various distributions are available
growisofs -Z /dev/scd0=image.iso
Erasing DVD+RW
Rewritable DVD+RW media are easy to
handle. Both used and new media have
to be formatted first:
dvd+rw-format -f /dev/scd0
26
January 2004
www.linux-magazine.com
564314214.001.png 564314214.002.png
Zgłoś jeśli naruszono regulamin