Using a DVD+RW Drive

The Network Security Toolkit includes the dvd-rw-tools package which allows you to burn DVDs using the dvd+rw-format and growisofs commands. This brief section will demonstrate how one can use these two commands to backup data from a Windows system (my wife's laptop).

For this experiment, the following equipment will be used:

Table 4.1. DVD Burning Equipment

ComponentManufacturerModel
Laptopvpr Matrix200A5
DVD+RWLite-On4X LDW-451S
USB 2.0 EnclosureMWAVE?USB2.0 3.5"/5.25" DEVICES EXTERNAL (AA17570) from http://www.mwave.com/

Figure 4.1. DVD Burner in USB 2.0 Enclosure

DVD Burner in USB 2.0 Enclosure

In this experiment, we will also be testing the USB 2.0 capabilities of the Network Security Toolkit distribution. Trust me. You don't want to think about burning much data with a USB 1.1 interface.

Note

At the time of this writing, it is assumed that the Network Security Toolkit CDROM will be booted from a drive other than the one used to burn the DVD. Were this not the case, the necessary executables and libraries would need to be copied from the Network Security Toolkit boot CDROM to the RAM disk so that the Network Security Toolkit boot CDROM could be ejected from the drive. This process involves the use of the ldd command on the dvd+rw-format and growisofs commands to determine what needs to be transferred. Eventually, a script will be provide for this situation - but the developers don't currently have the equipment to try it out on yet.

After booting the Network Security Toolkit and logging in, the DVD burner is plugged into a USB 2.0 port on the laptop and the following commands are issued:

Figure 4.2. Burning a DVD with growisofs

[root@probe root]# insmod ntfs 1
[root@probe root]# mount -t ntfs /dev/hda1 /mnt/ntfs 2
[root@probe root]# du -s /mnt/ntfs/Documents\ and\ Settings/ 3
876751  /mnt/ntfs/Documents and Settings
[root@probe root]# cdrecord -scanbus 4
Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?rg Schilling
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
scsibus0:
        0,0,0     0) 'MATSHITA' 'CD-RW  CW-8121  ' 'AZ20' Removable CD-ROM
        0,1,0     1) *
        0,2,0     2) *
        0,3,0     3) *
        0,4,0     4) *
        0,5,0     5) *
        0,6,0     6) *
        0,7,0     7) *
scsibus1:
        1,0,0   100) 'LITE-ON ' 'DVDRW LDW-451S  ' 'GSB6' Removable CD-ROM
        1,1,0   101) *
        1,2,0   102) *
        1,3,0   103) *
        1,4,0   104) *
        1,5,0   105) *
        1,6,0   106) *
        1,7,0   107) *
[root@probe root]# growisofs -Z /dev/scd1 -R -J -m "Temporary*" \
"/mnt/ntfs/Documents and Settings" 5


... Lots of output ...

[root@probe root]# 

1

This command makes sure the NTFS file system module is loaded.

2

This command mounts the NTFS file system on the laptop and maps it to /mnt/ntfs.

3

This command checks to see how much space is used by the directory we plan to back up. The 876MB reported will easily fit onto a DVD.

4

This command helps us locate the device name to pass to the growisofs command. The first device found is the DVD/CDRW drive built into the laptop (this would be /dev/scd0). The second device found is the DVD+RW burner that we want to use, so we will need to specify /dev/scd1 when we invoke growisofs or dvd+rw-format.

5

This command actually forms the ISO image and burns it to the DVD. The -m option is used to ignore files and directories whose name starts with Temporary. The -Z option indicates that we want to replace everything that may currently exist on the DVD with the backup.

Now that we've burned the DVD, let's check that we can read it. We'll do this by mounting it and checking to see if we see the names of the users of this computer in the top level directory.

[root@probe root]# mount -t iso9660 -o ro /dev/scd1 /mnt/cdrom1
[root@probe root]# ls /mnt/cdrom1
All Users                             erik          megan           pkb
BB443B11-7D12-450c-9F85-2D32804655F9  Guest         NetworkService  rr_moved
Default User                          LocalService  Owner
[root@probe root]# du -s /mnt/cdrom1
654717  /mnt/cdrom1
[root@probe root]# umount /mnt/cdrom1
[root@probe root]# eject scd1
[root@probe root]# 

If you've just removed the shrink wrap from your new DVD+RW disk, its likely that you'll need to format it prior to using growisofs. The following demonstrates they type of error message the growisofs command may issue if you attempt to use it on a unformatted disk, followed by the dvd+rw-format command necessary to format the disk:

Figure 4.3. Formatting a DVD+RW Disk

[root@probe root]# growisofs -Z /dev/scd1 -R -J /mnt/ntfs/tmp

Executing 'mkisofs -R -J /mnt/ntfs/tmp | builtin_dd of=/dev/scd1 obs=32k seek=0'
:-[ LBA=0h, SENSE KEY=5h/ASC=30h/ASCQ=10h ]
:-( write failed: Input/output error
[root@probe root]# dvd+rw-format /dev/scd1
* DVD?RW format utility by <appro@fy.chalmers.se>, version 4.2.
* 4.7GB DVD+RW media detected.
* formatting 73.3/\
[root@probe root]#

This section has only touched on some of the capabilities of the dvd-rw-tools package. Hopefully its enough for those of you with DVD burning equipment to get started.

While writing this section, several discoveries were made and additional questions asked: