Friday, January 30, 2009

dvd+rw-tools-7.1 - DVD Burner Utility for RHEL5

I had to work on building a kickstart to automate Red Hat Enterprise Linux (RHEL) 5 installation process for the lab these past few days. And it was quite a challenge, since it was my first time doing this. Also no one in my group seems to know anything about it. But everything dealing with RHEL always take on some sort of a challenge, especially when it comes to building sysadmin tools or create some sort of autonomous system task (w/o the help of cron). I won't go into detail about kickstart in this blog. I just want to let everybody know that after completed building kickstart configuration, I had to burn everything (config files, RPM packages, etc.) into a DVD and what do you know. RHEL doesn't by default come with a DVD burning utility. It has the cdrecorder tool for burning CD, CDR, CDRW but not DVD. So this is my lesson learned, and yes I did contacted Red Hat about this.

Anyway, I was able to find a solution using a tool called dvd+rw-tools-7.1 to burn DVD. The instruction about dvd+rw-tools found on the Internet didn't help me much, but being that I had a lot of experiences on Linux - it was easy to figure out what to do. Below is the note I took while installing and testing out the tool, which I (at this point) really like a lot.

--- Dev Journal ---
utility: dvd+rw-tools
server: RHEL 5

Step 1: untar the file using command "tar -zxvf dvd+rw-tools-7.1.tar.gz"

Step 2: cd to "dvd+rw-tools-7.1"

Step 3: run "make" command
You should see the same output as below.

$ make
make[1]: Entering directory
gcc -O2 -D_REENTRANT -c -o growisofs.o growisofs.c
g++ -O2 -fno-exceptions -D_REENTRANT -c -o growisofs_mmc.o growisofs_mmc.cpp
g++ -O2 -fno-exceptions -D_REENTRANT growisofs.o growisofs_mmc.o -lpthread -o growisofs
g++ -O2 -fno-exceptions -D_REENTRANT -c -o dvd+rw-format.o dvd+rw-format.cpp
g++ -O2 -fno-exceptions -D_REENTRANT dvd+rw-format.o -lpthread -o dvd+rw-format
g++ -O2 -fno-exceptions -D_REENTRANT -c -o dvd+rw-booktype.o dvd+rw-booktype.cpp
g++ -O2 -fno-exceptions -D_REENTRANT dvd+rw-booktype.o -lpthread -o dvd+rw-booktype
g++ -O2 -fno-exceptions -D_REENTRANT -c -o dvd+rw-mediainfo.o dvd+rw-mediainfo.cpp
g++ -O2 -fno-exceptions -D_REENTRANT dvd+rw-mediainfo.o -lpthread -o dvd+rw-mediainfo
g++ -O2 -fno-exceptions -D_REENTRANT -c -o dvd-ram-control.o dvd-ram-control.cpp
g++ -O2 -fno-exceptions -D_REENTRANT dvd-ram-control.o -lpthread -o dvd-ram-control
make[1]: Leaving directory

Step 4: Obtain root priviledge (using sudo) and run "make install" command
You should see the same output as below.

# make install
make[1]: Entering directory
[ -d /usr/local/bin ] || mkdir -p /usr/local/bin
install -o root -m 0755 growisofs dvd+rw-format dvd+rw-booktype dvd+rw-mediainfo dvd-ram-control /usr/local/bin
[ -d /usr/local/man/man1 ] || mkdir -p /usr/local/man/man1
install -o root -m 0644 growisofs.1 /usr/local/man/man1
[ -f rpl8 ] && install -o root -m 0755 rpl8 /usr/local/bin; :
[ -f btcflash ] && install -o root -m 0755 btcflash /usr/local/bin; :
make[1]: Leaving directory

Step 5: Exit out of root priviledge and verify the software is correctly installed using ls command.
You should see the same output as below..

$ ls /usr/local/bin
dvd-ram-control dvd+rw-booktype dvd+rw-format dvd+rw-mediainfo growisofs

Step 6: If you see the executable files above, the installation is a success.
Now... it's time to test out the dvd+rw-tools.

First, insert a blank DVD into the DVD drive and type the following command.

$ dvd+rw-mediainfo /dev/dvd

The above command will output information about your DVD drive and DVD media.
You should see something similar to the output below. The server hardware I'm working with is HP ProLiant Server.

$ dvd+rw-mediainfo /dev/dvd
Mounted Media: 1Bh, DVD+R
Media ID: CMC MAG/M01
Current Write Speed: 8.0x1385=11080KB/s
Write Speed #0: 8.0x1385=11080KB/s
Write Speed #1: 6.0x1385=8310KB/s
Write Speed #2: 4.0x1385=5540KB/s
Write Speed #3: 2.4x1385=3324KB/s
Speed Descriptor#0: 00/2295103 R@8.0x1385=11080KB/s W@8.0x1385=11080KB/s
Speed Descriptor#1: 00/2295103 R@6.0x1385=8310KB/s W@6.0x1385=8310KB/s
Speed Descriptor#2: 00/2295103 R@4.0x1385=5540KB/s W@4.0x1385=5540KB/s
Speed Descriptor#3: 00/2295103 R@2.4x1385=3324KB/s W@2.4x1385=3324KB/s
Media Book Type: 00h, DVD-ROM book [revision 0]
Legacy lead-out at: 2295104*2KB=4700372992
READ DISC INFORMATION:dvd+rw-tools-7.1
Disc status: blank
Number of Sessions: 1
State of Last Session: empty
"Next" Track: 1
Number of Tracks: 1
Track State: blank
Track Start Address: 0*2KB
Next Writable Address: 0*2KB
Free Blocks: 2295104*2KB
Track Size: 2295104*2KB

Step 7: Jump up and down for about 10 seconds! and then congrat
yourself for successfully installing dvd+rw-tools-7.1 on RHEL.

I know, I know, I'm easily excited...

If you don't want to test burn a DVD, you can stop the reading
here and simply remove the DVD from your DVD drive.
Otherwise, continue to step 8.

Step 8: Obtain root priviledge (using sudo) and run the following command
to create an ISO image.

# mkisofs -r -o test.iso /h/local/test/

You should see a bunch of status data looking similar to the output
snippet below. Don't do anything, until you see a command prompt.

32.26% done, estimate finish Fri Jan 30 16:21:08 2009
32.60% done, estimate finish Fri Jan 30 16:21:07 2009
32.93% done, estimate finish Fri Jan 30 16:21:05 2009
33.26% done, estimate finish Fri Jan 30 16:21:04 2009
33.59% done, estimate finish Fri Jan 30 16:21:02 2009
33.93% done, estimate finish Fri Jan 30 16:21:01 2009
99.78% done, estimate finish Fri Jan 30 16:21:28 2009
Total translation table size: 0
Total rockridge attributes bytes: 525542
Total directory bytes: 819200
Path table size(bytes): 390
Max brk space used 37e000
1503291 extents written (2936 MB)

Step 9: Run the following command to burn the ISO image to DVD.

growisofs -Z /dev/dvd=test.iso

Again, you should see a bunch of status data looking similar
to the output snippet below. Wait until you see a command prompt.

# growisofs -Z /dev/dvd=RHEL5_custom.iso
Executing 'builtin_dd if=RHEL5_custom.iso of=/dev/dvd obs=32k seek=0'
/dev/dvd: "Current Write Speed" is 8.2x1352KBps.
1572864/3078739968 ( 0.1%) @0.0x, remaining 195:38 RBU 100.0% UBU 2.0%
1572864/3078739968 ( 0.1%) @0.0x, remaining 293:27 RBU 100.0% UBU 100.0%
2975989760/3078739968 (96.7%) @6.0x, remaining 0:19 RBU 100.0% UBU 100.0%
3003678720/3078739968 (97.6%) @6.0x, remaining 0:13 RBU 100.0% UBU 100.0%
3029565440/3078739968 (98.4%) @5.6x, remaining 0:09 RBU 100.0% UBU 100.0%
3057287168/3078739968 (99.3%) @6.0x, remaining 0:03 RBU 64.0% UBU 100.0%
builtin_dd: 1503296*2KB out @ average 3.9x1352KBps
/dev/dvd: flushing cache
/dev/dvd: closing track
/dev/dvd: closing session

Step 10: Eject the DVD (using command "eject dvd" and then jump up and down again for
about 10 seconds! and congrat yourself for successfully burning dvd on RHEL.

No comments:

Post a Comment