CCL Home Page
Up Directory CCL README-DRU-510A.html

Sony DRU510A DVD+/-RW+/-R and Linux RH9


Sony DRU510A DVD+/-RW+/-R and Linux RedHat 9

These are my notes on installing and configuring the Sony DRU510A DVD+/-RW+/-R
Jan Labanowski jkl at ccl.net , September 2003
All this is complete nonsence, and you may do whatever you want with it,
but do not sue me for giving you false information, since you have been warned.

I would like to thank Scott Porter for his comments:

  Date: Thu, 25 Sep 2003 22:55:38 -0700 (PDT)
  From: Scott Porter 
  To: jkl %at% ccl.net
  Subject: About your DVD Recorder review.
  
  Hopefully I have the right address.
  
  I read you DVD burning review using the Sony 510A
  under Linux. Thanks for the info. I bought one of
  these drives about a month ago. I have been using
  primarily DVD+R(W) media, as my other DVD equiment
  seems to like them better than DVD-R(W) media. I have
  been using the dvd+rw tool (growisofs, etc.) with
  success. Here are some of the odd things I have
  discovered (all related to "+" media haven't burn "-"
  media with them):
  * Not many options. Basically the only thing you can
  select is the device and speed. There are a few more
  but nothing major that I can see. Also, they are not
  listed in any of the documentation, you have to go to
  the source code to find them.
  * To reformat a disc use "dvd+rw-format -f ".
  The  -f is used to force the format, otherwise you get
  a media already formated error. After a reformat you
  can then write to the disc as normal using
  "growisofs". If you then try to write to a reformated
  disc using "cdrecord-prodvd" you will get a size
  problem (i.e. can't fit data on disc). I found that if
  you use "growisofs -Z =/dev/zero" to blank the
  disc you can then write to it using "cdrecord-prodvd".
  However, "cdrecord-prodvd" will report it is writing
  to track 2. This does not seem to effect reading from
  the disc.
  
  For basic burning of "+" media, the dvd+rw tools seem
  to work OK. Hopefully with DVD burners becoming more
  popular (i.e. cheaper) and the future release of the
  2.6.x kernel (which I understand has better DVD
  burning support) we'll get better burning software.
  
  Thank You
  Scott Porter
  t_scott_porter --at-- yahoo.com

------------------- ent of Scott's comments --------

Why I write them this way? With all these explanations?
I write them for my students who are really only moderately proficient
in Linux. At the end I will summarize my findings, but if you want
to learn with me, read the stuff and have some compassion at least...

I had an older box with 800MHz PIII, 60GBytes ATA Drive, and a CD-ROM.
I removed CD-ROM and replaced it with Sony DRU510A drive.
On the 1st IDE interface I had a 60 Gig drive as master, and on the 2nd
IDE interface, I had the DRU510A configured as slave. The 60Gig drive was
a virgin, out of the box.


I first installed Windows98 on the drive.

1) I first booted from Win98 start-up diskette I used FDISK to create
   DOS primary partition of a size of 12Gigs, made it active (i.e. bootable)
   and left the rest of the drive unused.

2) Then I booted from the diskette again and asked it to start Windows98
   setup. After two hours, I had the windows installed. I configured the
   network (I used static address) and forgot about windows for a while.

3) I installed Windows98 before Linux, since Windows is supposedly
   particular about partition boundaries. This may not be true any more, but
   at some point Windows may have seen drive geometry different than Linux.
   There is also an issue that Windows partition should really be the first
   one, since Windows does invite coexistence with other OSes. 
   Linux does not care, but at the same time, the RedHat 9 (RH9)
   installation does not give you the access to fdisk, and uses druid
   for installation. The druid asks you for partition sizes, not sectors,
   and you have no control over actual partition table, unless you want
   to put your drive on another Linux server and use fdisk to set the
   partition boundaries exactly as you want them. I may be missing something
   and they may be some tricks, but this is what I see when I do a default
   install of RH9 distro.
   So to be on safe side, install Windows first, since Linux does not care
   and Windows might.

4) I installed Linux in the remaining space on the drive and in effect
   created the following primary partitions: 
/dev/hda1   *         1      1530  12289693+   c  Win95 FAT32 (LBA)
/dev/hda2          1531      7139  45054292+  83  Linux
/dev/hda3          7140      7266   1020127+  82  Linux swap
/dev/hda4          7267      7476   1686825   83  Linux

(you can list it as: 

fdisk /dev/hda

then hit "p" and "q").

I chose LILO as a boot loader, and asked the boot record to be installed on the
root partition (/dev/hda2). The hda3 was swap, and hda4 is used by me
as incoming directory for the ftp or the web upload area.

There are plenty of updates since the time RH9 was originally released.
I use apt rpm to perform my updates. Read my apt installation log to see
how I do it at: 
http://www.ccl.net/cca/software/UNIX/updating-redhat/

After I updates the RH9 (as of Sept 15, 2003), I checked if the kernel module
ide-scsi is loaded:

lsmod | grep scsi



ide-scsi               12208   0 
scsi_mod              107512   5  [sg sr_mod ide-scsi aic7xxx sd_mod]


as you can see, I have also a real Adaptec SCSI adapter in one of my PCI slots.

My /etc/lilo.conf (I use lilo to boot) is:

prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32

image=/boot/vmlinuz-2.4.20-20.9
        label=linux
        initrd=/boot/initrd-2.4.20-20.9.img
        read-only
        append="hdd=ide-scsi root=LABEL=/"

image=/boot/vmlinuz-2.4.20-8
        label=linux-2.4.20-8
        initrd=/boot/initrd-2.4.20-8.img
        read-only
        append="hdd=ide-scsi root=LABEL=/"

other=/dev/hda1
        optional
        label=DOS


I followed explanations given for the the DVD+RW/+R for Linux from:
http://fy.chalmers.se/~appro/linux/DVD+RW/ and
and some of http://acd.ucar.edu/~fredrick/linux/dvd/
but as you can see below, I did not do a good job on reading carefully. 
I did not do kernel patch.

My DRU510A is a slave on the 2nd IDE interface, i.e., is a /dev/hdd

As instructed in the links above, I also added to my modules.conf the:

options ide-cd ignore=hdd
pre-install sg modprobe ide-scsi
pre-install sr_mod modprobe ide-scsi
pre-install ide-scsi modprobe ide-cd


and my final /etc/modules.conf was: (yes, I have to two NICs on this machine)

alias eth0 e100
alias eth1 natsemi
alias scsi_hostadapter aic7xxx
alias usb-controller usb-uhci
options ide-cd ignore=hdd
pre-install sg modprobe ide-scsi
pre-install sr_mod modprobe ide-scsi
pre-install ide-scsi modprobe ide-cd


What it does, is that I do not have the IDE/ATAPI CD/DVD drive.
I only have a SCSI emulation of it. My /dev/cdrom is a link to
/dev/scd0 which is being served by the ide-scsi and related modules.
I rebooted the machine afterwards. I then did

lsmod

which gave me:

Module                  Size  Used by    Not tainted
parport_pc             19076   1  (autoclean)
lp                      8996   0  (autoclean)
parport                37056   1  (autoclean) [parport_pc lp]
autofs                 13268   0  (autoclean) (unused)
natsemi                19552   1 
e100                   54596   1 
sg                     36524   0  (autoclean)
sr_mod                 18136   0  (autoclean)
microcode               4668   0  (autoclean)
ide-scsi               12208   0 
ide-cd                 35712   0 
cdrom                  33728   0  [sr_mod ide-cd]
keybdev                 2976   0  (unused)
mousedev                5556   0  (unused)
hid                    22244   0  (unused)
input                   5856   0  [keybdev mousedev hid]
usb-uhci               26412   0  (unused)
usbcore                79040   1  [hid usb-uhci]
ext3                   70784   2 
jbd                    51924   2  [ext3]
aic7xxx               141204   0  (unused)
sd_mod                 13452   0  (unused)
scsi_mod              107512   5  [sg sr_mod ide-scsi aic7xxx sd_mod]



Next I checked if cdrecord detects my DRU-510A

cdrecord -scanbus


Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
scsibus1:
	1,0,0	100) 'SONY    ' 'DVD RW DRU-510A ' '1.0c' 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) *

So that means, I can write to it with  cdrecord dev=1,0,0 ...

Great... To be sure that I have the right stuff, I went to sony web site

http://sony.storagesupport.com/dvdrw/firmware.htm#510

I downloaded a file 510A_10c.zip which contains 
Firmware Upgrade 1.0C
DRU-510A | DRX-510UL 
Improves reading and writing performance and reliability.

-rw-------   1 jkl      appl      947794 Sep 16 16:21 510A_10c.zip

Of course it is for Windows, and now you know why I installed Windows.

unzip -l *.zip

Archive:  510A_10c.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
  1077596  07-02-03 11:01   510A_10c/510A_10c.exe
    49152  06-17-03 01:54   510A_10c/Sendcom.dll
     9753  04-20-01 12:31   510A_10c/SENDCOM.vxd
 --------                   -------
  1136501                   3 files

I also retrieved the page: 
http://sony.storagesupport.com/dvdrw/downloads/Firmware10c/510update.htm

which tells you how to update your firmware.

I unzipped file under Linux

unzip 510A_10c.zip

formatted a diskette:

fdformat /dev/fd0H1440

formatted it as DOS:

mformat a:

and copied files to the floppy as:

cd 510A_10c
mcopy * a:


Then I booted into Windows and copied files from a diskette to drive C:
with the MS-DOS window.

mkdir C:\dru-510a
copy A:*.* C:\dru-510a

Then double clicked on "My Computer",  "C:", "dru-510a"
and double-clicked on 510A_10c.exe which ran it in the Windows.

Then you get a menu which asks you to click a few times and wait
until it finishes. DO EXACTLY WHAT THEY SAY, or you can mess up your
drive. Do not reboot when this stuff is running.

Then, I rebooted the PC to Windows, and installed the Software which
came with Sony DRU-510A drive.

The DVD with a software will show a menu automatically when you
insert the DVD to the drive.
It asks first for the language -- I chose English.
Then I was installing:
   RecordNow DX -- it asked me to exit "splash" (i.e., the program which
   runs installation Menu). I clicked on Exit in the "splash" window, and
   clicked on the [Retry] button. After clicking on "I accept" and
   Next/Finish (I took all defaults), I was asked to reboot. I said OK
   and rebooted.

   DLA -- As above, after install, I rebooted again.

   Simple backup -- gave me the warning that DLA is already installed,
     which I ignored at this time. After install, reboot

   MusicMatch Jukebox - it asked me some stupid personal questions,
      which I reluctantly answered. I am not sure if it registered
      me over the Internet and what the thing did send to the vendor.
      I suggest that you remove your network cable when you install
      this piece. After installing, I ejected/inserted to get "splash"
      menu again.

   MyDVD -- copies zillions of files. After install, asks to restart.
      Say yes -- it is the Windows way...

   PowerDVD -- During install it asked me if I want to enable DMA mode.
      I did, since it is much faster. 

To check if the drive is working (it better work with the software which
came with it, or send it back).
I copied the original software DVD onto DVD-R and DVD+R blanks.
I did not copy it to DVD+RW, since it seems that if you succeed with
DVD+R you should not have problems with DVD+RW.

Copy was done as:
  Start->Veritas Software->RecordNow DX
  Chose "Make exact copy" which ejected the DVD so I inserted it again
  (and killed the "splash" which started from the DVD's autorun file.
  It was then reading the original DVD for about 7 minutes (note, it is
  only 800 MHz PIII box and its IDE on-board controller probably does not
  make more than 33 MBytes/s). Then it asked me to insert blank. I have
  put DVD-R blank. It was writing to it about 6 minutes. The time estimates,
  which they show, are only roughly correct (they are shorter than actual
  time). Then it was verifying about the same amount of time.
  It finally ejected the copy, and asked me if I want to make another.
  I inserted the 4xDVD+R blank this time, and it was burning it for
  about 5 minutes, and verifying it about the same time. Then I told it
  to quit.  I took the drives to another computer which had a regular
  DVD/CD-ROM (actually about 3 years old -- one of the first one)
  And it read the DVD-R and DVD+R copes fine. It made me think that
  my drive was a good investment (in a year they will have new, better,
  and cheaper ones... {:-)}.

I rebooted the PC to Linux (RH9 with all updates).



The RH9 comes with:

rpm -qa | grep cdr


cdrecord-2.0-11.9.1
cdrdao-1.1.7-4
xcdroast-0.98a13-4
cdrecord-devel-2.0-11.9.1


rpm -qa | grep dvd


radvd-0.7.2-2
dvdrecord-0.1.2-10


I first made a large image with mkisofs

mkisofs -v -U -r -joliet-long -T  -o /tmp/dvd1.iso /content-asdn


ls -l /tmp


...
-rw-r--r--    1 root     root     3368026112 Sep 18 00:30 dvd1.iso


I tried first to use dvdrecord. It supposedly works great with the
DVD-R(W) drives. Since the Sony DRU 510A can write DVD-R/RW, I assumed
that when I give it a DVD-R blank, it will behave as DVD-R writer.
I will describe my failures below. In short... It will not work with dvdrecord.
But go through the misery with me. 

dvdrecord -version


dvdrtools v0.1.3
Portions (c) 2002 Red Hat, Inc.
Based on:
Cdrecord 1.11a15 (i386-redhat-linux-gnu) Copyright (C) 1995-2001 Joerg Schilling


Then, I used the 

dvdrrecord -scanbus

to check what is my device assignment:

dvdrecord -scanbus
dvdrtools v0.1.3
Portions (c) 2002 Red Hat, Inc.
Based on:
Cdrecord 1.11a15 (i386-redhat-linux-gnu) Copyright (C) 1995-2001 Joerg Schilling
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.5'
dvdrecord: Warning: using inofficial libscg transport code version (schily-RH-scsi-linux-sg.c-1.69-RH-O_EXCL '@(#)scsi-linux-sg.c	1.69 02/01/18 Copyright 1997 J. Schilling').
scsibus1:
	1,0,0	100) 'SONY    ' 'DVD RW DRU-510A ' '1.0c' 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) *

The first thing I tried was to put a 4xDVD-R blank (not DVD+R) into the drive
and use dvdrecord which should support DVD-R (but not DVD+R).
I used Accu 1x-4x DVD-R 4.7GB blank media General purpose DVDR
unbranded ($1.19/piece) media.


dvdrecord -dao speed=4 dev=1,0,0 /tmp/dvd1.iso


What I got was:

dvdrecord -dao speed=4 dev=1,0,0 /tmp/dvd1.iso
dvdrtools v0.1.3
Portions (c) 2002 Red Hat, Inc.
Based on:
Cdrecord 1.11a15 (i386-redhat-linux-gnu) Copyright (C) 1995-2001 Joerg Schilling
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.5'
dvdrecord: Warning: using inofficial libscg transport code version (schily-RH-scsi-linux-sg.c-1.69-RH-O_EXCL '@(#)scsi-linux-sg.c	1.69 02/01/18 Copyright 1997 J. Schilling').
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE 
Supported modes: PACKET SAO
Starting to write CD/DVD at speed 4 in write mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
trackno=0
dvdrecord: Input/output error. write_g1: scsi sendcmd: no error
CDB:  2A 00 00 19 18 A6 00 00 1F 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 12 00 00 00 00 2C 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x2C Qual 0x00 (command sequence error) Fru 0x0
Sense flags: Blk 0 (not valid) 
cmd finished after 0.003s timeout 200s
write track data: error after 0 bytes
Sense Bytes: 70 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00 00 00


So, I assumed (wrongly) that maybe I should get latest dvdrecord. The latest is
0.1.5, but there is no RedHat 9 RPM for it. There is an Arklinux RPM
http://rpm.pbone.net/index.php3/stat/4/idpl/591679/com/dvdrecord-0.1.5-1ark.i586.rpm.html
but I decided not to use it, since it could (or maybe not) mess up the
locations/paths/etc for the current RH9 distribution. 

I decided to get the source instead:
http://savannah.nongnu.org/download/dvdrtools/dvdrtools.pkg/0.1.5/dvdrtools-0.1.5.tar.gz

and compile it in /usr/local/bin
rather than in /usr/bin (the RedHat 9) location, so I can still have the
old version running.

I created /usr/local/dvdrecord and placed the tar file there:

mkdir /usr/local/dvdrecord
cd /usr/local/dvdrecord
wget http://savannah.nongnu.org/download/dvdrtools/dvdrtools.pkg/0.1.5/dvdrtools-0.1.5.tar.gz
tar zxvf dvdrtools-0.1.5.tar.gz
cd dvdrtools-0.1.5

I read the INSTALL file and did:

./configure -help

and then did

./configure --prefix=/usr/local
make
make check
make install


Now, when I do: 
 
which dvdrecord

it tells me:

/usr/local/bin/dvdrecord

since my $PATH is:

/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin


To make sure that I do not collide with older dvdrecord (0.1.2) which comes
with RH9, I renamed the executables in /usr/local/bin

cd /usr/local/bin
mv cdda2mp3 cdda2mp3-015
mv cdda2ogg cdda2ogg-015
mv cdda2wav cdda2wav-015
mv devdump devdump-015
mv dvdrecord dvdrecord-015
mv isodump isodump-015
mv isoinfo isoinfo-015
mv isovfy isovfy-015
mv mkisofs mkisofs-015
mv readcd readcd-015

which dvdrecord


  /usr/bin/dvdrecord


which dvdrecord-015


  /usr/local/bin/dvdrecord-015

So I tried again to see if the new dvdrecord will burn the DVD-R:

dvdrecord-015 -dao speed=4 dev=1,0,0 /tmp/dvd1.iso


dvdrecord-015 -dao speed=4 dev=1,0,0 /tmp/dvd1.iso
dvdrtools v0.1.4
Portions (c) 2002-2003 Ark Linux 
....
You should have received a copy of the GNU General Public License along with
this program; see the file COPYING.  If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Based on:
Cdrecord 1.11a15 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Joerg Schilling
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'bero-0.5a'
dvdrecord-015: Warning: using inofficial version of libscg (bero-0.5a '@(#)scsitransp.c	1.81 01/04/20 Copyright 1988,1995,2000 J. Schilling').
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE 
Supported modes: PACKET SAO
dvdrecord-015: WARNING: Data may not fit on current disk.
dvdrecord-015: Notice: Most recorders cannot write CD's >= 90 minutes.
dvdrecord-015: Notice: Use -ignsize option to allow >= 90 minutes.
dvdrecord-015: Notice: Use -overburn option to write more than the official disk capacity.
dvdrecord-015: Notice: Most CD-writers do overburning only on DAO mode.


so I used:

dvdrecord-015 -dao -ignsize speed=2 dev=1,0,0 /tmp/dvd1.iso

No luck... The error was very similar to old dvdrecord

..........
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE 
Supported modes: PACKET SAO
dvdrecord-015: WARNING: Data may not fit on current disk.
dvdrecord-015: Notice: Overburning active. Trying to write more than the official disk capacity.
Starting to write CD/DVD at speed 4 in write mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
trackno=1
dvdrecord-015: Input/output error. reserve track: scsi sendcmd: no error
CDB:  53 00 00 00 00 00 19 18 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 12 00 00 00 00 24 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x24 Qual 0x00 (invalid field in cdb) Fru 0x0
Sense flags: Blk 0 (not valid) 
cmd finished after 0.003s timeout 200s
dvdrecord-015: Cannot open new session.


I found the following on the Web:
http://www.mail-archive.com/dvdrtools-users@nongnu.org/msg00273.html

...
I have DRX-500UL and can only use growisofs.  I could not get cdrecord
-prodvd, dvdrecord, or mkudfs to work and I really want to use udf with
DVD+R.  Some body please announce when/if udf is supported for Sony
DRX-500UL.
...

http://www.mail-archive.com/dvdrtools-users@nongnu.org/msg00276.html

http://www.mail-archive.com/dvdrtools-users@nongnu.org/msg00283.html

Date: Wed, 25 Jun 2003 20:28:31 -0700
....
Unfortunately, I have to conclude the cdrecord-prodvd seems to be the
only program which can currently be relied upon, although the problem in
-ossdvd seems fixable. There doesn't seem to be much going on with Linux
and dvd development atm though.
....


So, I decided to try Cdrecord-ProDVD from:

ftp://ftp.berlios.de/pub/cdrecord/ProDVD/
namely 
ftp://ftp.berlios.de/pub/cdrecord/ProDVD/cdrecord-prodvd-2.01a12-i586-pc-linux-gnu


mkdir /usr/local/cdrecord-prodvd
cd /usr/local/cdrecord-prodvd
wget ftp://ftp.berlios.de/pub/cdrecord/ProDVD/cdrecord-prodvd-2.01a12-i586-pc-linux-gnu
wget ftp://ftp.berlios.de/pub/cdrecord/ProDVD/README
wget ftp://ftp.berlios.de/pub/cdrecord/ProDVD/README.clone
wget ftp://ftp.berlios.de/pub/cdrecord/ProDVD/cdrecord-wrapper.sh
wget ftp://ftp.berlios.de/pub/cdrecord/ProDVD/cdrecord-wrapper.sh
wget ftp://ftp.berlios.de/pub/cdrecord/ProDVD/readcd-clone-2.0-i586-pc-linux-gnu
wget ftp://ftp.berlios.de/pub/cdrecord/ProDVD/VERSIONS

then tried:

cd /usr/local/cdrecord-prodvd
chmod 755 cdrecord-prodvd-2.01a12-i586-pc-linux-gnu
chmod 755 cdrecord-wrapper.sh
chmod 755 readcd-clone-2.0-i586-pc-linux-gnu


I made links to save on typing:

ln -s cdrecord-prodvd-2.01a12-i586-pc-linux-gnu cdrecord-ProDVD
ln -s readcd-clone-2.0-i586-pc-linux-gnu readcd-clone 


I edited the cdrecord-wrapper.sh and changed

#!/bin/sh

to

#!/bin/bash

and

exec cdrecord-ProDVD "$@"

to

exec ./cdrecord-ProDVD "$@"


The last change is there, since I do not have the /usr/local/cdrecord-prodvd
directory in my path. As you can see, the executables are made available
free of charge as a courtesy for non-commercial users by the author, 
Joerg Schilling.

Then I tried:

cd /usr/local/cdrecord-prodvd
./cdrecord-wrapper.sh -dao -ignsize speed=2 dev=1,0,0 /tmp/dvd1.iso

I got:

Cdrecord-ProDVD-Clone 2.01a12 (i586-pc-linux-gnu) Copyright (C) 1995-2003 Joerg Schilling
Unlocked features: ProDVD Clone 
Limited  features: 
This copy of cdrecord is licensed for: private/research/educational_non-commercial_use
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc-2 DVD-R/DVD-RW driver (mmc_dvd).
Driver flags   : DVD MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Starting to write CD/DVD at speed 2 in real SAO mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
Turning BURN-Free off
Track 01: Total bytes read/written: 3368026112/3368026112 (1644544 sectors).


It took 20 minutes to write the DVD-R at speed 2
My DVD-R media were:
ACCU 1x-4x DVD-R 4.7GB Blank Media, General Purpose DVDR, Unbranded. 

As I experimented later, I could have used a simpler command line,
since cdrecord-ProDVD is more intelligent than me, namely:

cd /usr/local/cdrecord-prodvd
./cdrecord-wrapper.sh speed=4 dev=1,0,0 /tmp/SomeImage.iso

which gives you:

Cdrecord-ProDVD-Clone 2.01a12 (i586-pc-linux-gnu) Copyright (C) 1995-2003 Joerg Schilling
Unlocked features: ProDVD Clone 
Limited  features: 
This copy of cdrecord is licensed for: private/research/educational_non-commercial_use
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc-2 DVD-R/DVD-RW driver (mmc_dvd).
Driver flags   : DVD MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Starting to write CD/DVD at speed 4 in real TAO mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
Turning BURN-Free off
Track 01: Total bytes read/written: 4281532416/4281532416 (2090592 sectors).

which took about 15 minutes for a 4.3 GByte image in this particular case.
It chose to write it as Track At Once, rather then Disk At Once.
I suspect that in the case of one-session disk, it does not really
matter.

Then I tried to burn another DVD. This time I decided to try the DVD+R
media. I made a backup of directories from another machine.
I created directory and placed there gzipped tar files which I created as:

mkdir /tmp/asdn-backup
cd /tmp/asdn-backup
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./root ) ' > root.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./usr/local ) ' > usr.local.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./etc ) ' > etc.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./content-asdn ) ' > content-asdn.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./asdn ) ' > asdn.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./chem1/ftp/incoming ) ' > chem1.ftp.incoming.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./nanoandgiga ) ' > nanoandgiga.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./var/spool/mail ) ' > var.spool.mail.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./home/korkin ) ' > home.korkin.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./home/asd ) ' > home.asd.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./home/jkl ) ' > home.jkl.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./home/ccl ) ' > home.ccl.tgz
ssh -l root asdn.net ' ( cd / ; tar zcvf - ./home/asd-old ) ' > home.asd-old.tgz

As a result I got:

ls -l /tmp/asdn-backup


total 3084448
-rw-r--r--    1 root     root     47697920 Sep 18 15:13 asdn.tgz
-rw-r--r--    1 root     root     81623040 Sep 18 15:14 chem1.ftp.incoming.tgz
-rw-r--r--    1 root     root     2364897280 Sep 18 13:57 content-asdn.tgz
-rw-r--r--    1 root     root      5949440 Sep 18 13:29 etc.tgz
-rw-r--r--    1 root     root      5457920 Sep 18 15:22 home.asd-old.tgz
-rw-r--r--    1 root     root     174581760 Sep 18 15:20 home.asd.tgz
-rw-r--r--    1 root     root     263854080 Sep 18 15:31 home.ccl.tgz
-rw-r--r--    1 root     root     91013120 Sep 18 15:25 home.jkl.tgz
-rw-r--r--    1 root     root      4597760 Sep 18 15:17 home.korkin.tgz
-rw-r--r--    1 root     root        30720 Sep 18 15:14 nanoandgiga.tgz
-rw-r--r--    1 root     root     88023040 Sep 18 13:26 root.tgz
-rw-r--r--    1 root     root      4270080 Sep 18 13:28 usr.local.tgz
-rw-r--r--    1 root     root     23306240 Sep 18 15:16 var.spool.mail.tgz

mkisofs -v -U -r -joliet-long -T  -o /tmp/dvd2.iso /tmp/asdn-backup


This was a total failure (you see, I am frank with you that I am
stupid... -- no hype here {:-(}. At the same time, everything is
obvious, once you know it). Then I did: 

ls -l /tmp/dvd2.iso

gives:

-rw-r--r--    1 root     root     790528000 Sep 18 15:37 /tmp/dvd2.iso


i.e., only about 800 Megs, while the 

du -sk /tmp/asdn-backup

gives:

3084452	/tmp/asdn-backup

tells me that the combined size of files is 3084452k, i.e., over 3Gigs.

It looks like mkisofs does not process large files (over 2Gigs),
since sum of the other files but content-asdn.tgz, is about 800 Megs.
I later on noticed, that it even tells you about it, but since it
spews so much stuff to the terminal, I did not notice it at first.
Yes, I was reinventing the wheel busily...

I checked my suspicions by doing

mkisofs -v -U -r -joliet-long -T  -o /tmp/dvd2.iso /tmp/asdn-backup/content-asdn.tgz


and indeed, the image was puny:

-rw-r--r--    1 root     root        98304 Sep 18 15:54 dvd2.iso

and mkisofs was telling me why:

mkisofs 2.0 (i686-pc-linux-gnu)
mkisofs: Value too large for defined data type. File /tmp/asdn-backup/content-asdn.tgz is too large - ignoring


I also found on the web:
http://www.ing.iac.es/~cfg/services/cd.html

  The available space on each blank DVD is about 4.7 GBytes but this depends
  on the make and some other factors. The only restriction when writing a DVD
  is that although the final DVD image can be up to the maximum size of the
  media, none of the original files can be bigger then 2GBytes or it will be
  ignored and not saved  


What to do?

I could either do the directory in pieces, or split the tar.gz archive,
or try bzip2 compression (i.e., tar Jcvf and tar Jxvf), but bzip2
is rarely better than 10% over gzip.

I decided to split the file, since the file is already made, and making a 2GB
tar file, all over again, over the Net takes some time.


split -b 1000000000 content-asdn.tgz content-asdn.tgz-


( I wish I could write 1GB rather than the one and nine zeros).

and then, when I need to unpack it, I will do:


cat content-asdn.tgz-* | tar zxvf -


I moved the large file away from  directory /tmp/asdn-backup,
and my directory now looked like:

total 3084464
-rw-r--r--    1 root     root     47697920 Sep 18 15:13 asdn.tgz
-rw-r--r--    1 root     root     81623040 Sep 18 15:14 chem1.ftp.incoming.tgz
-rw-r--r--    1 root     root     1000000000 Sep 18 16:06 content-asdn.tgz-aa
-rw-r--r--    1 root     root     1000000000 Sep 18 16:08 content-asdn.tgz-ab
-rw-r--r--    1 root     root     364897280 Sep 18 16:09 content-asdn.tgz-ac
-rw-r--r--    1 root     root      5949440 Sep 18 13:29 etc.tgz
-rw-r--r--    1 root     root      5457920 Sep 18 15:22 home.asd-old.tgz
-rw-r--r--    1 root     root     174581760 Sep 18 15:20 home.asd.tgz
-rw-r--r--    1 root     root     263854080 Sep 18 15:31 home.ccl.tgz
-rw-r--r--    1 root     root     91013120 Sep 18 15:25 home.jkl.tgz
-rw-r--r--    1 root     root      4597760 Sep 18 15:17 home.korkin.tgz
-rw-r--r--    1 root     root        30720 Sep 18 15:14 nanoandgiga.tgz
-rw-r--r--    1 root     root     88023040 Sep 18 13:26 root.tgz
-rw-r--r--    1 root     root      4270080 Sep 18 13:28 usr.local.tgz
-rw-r--r--    1 root     root     23306240 Sep 18 15:16 var.spool.mail.tgz

now I did:

mkisofs -v -U -r -joliet-long -T  -o /tmp/dvd2.iso /tmp/asdn-backup

now I get:

-rw-r--r--    1 root     root     3155427328 Sep 18 17:03 dvd2.iso

which looks sensible. so now I burn my DVD as:


cd /usr/local/cdrecord-prodvd
./cdrecord-wrapper.sh -v speed=4 dev=1,0,0 /tmp/dvd2.iso


Cdrecord-ProDVD-Clone 2.01a12 (i586-pc-linux-gnu) Copyright (C) 1995-2003 Joerg Schilling
Unlocked features: ProDVD Clone 
Limited  features: 
This copy of cdrecord is licensed for: private/research/educational_non-commercial_use
TOC Type: 1 = CD-ROM
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: DVD+R
Profile: DVD+R (current)
Profile: DVD+RW 
Profile: DVD-RW sequential overwrite 
Profile: DVD-RW restricted overwrite 
Profile: DVD-R sequential recording 
Profile: DVD-ROM 
Profile: CD-RW 
Profile: CD-R 
Profile: CD-ROM 
Using generic SCSI-3/mmc-3 DVD+R driver (mmc_dvdplusr).
Driver flags   : DVD MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Drive buf size : 4718592 = 4608 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data  3009 MB        
Total size:     3009 MB = 1540736 sectors
Current Secsize: 2048
Blocks total: 2295104 Blocks current: 2295104 Blocks remaining: 754368
Starting to write CD/DVD at speed 4 in real TAO mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Starting new track at sector: 0


It took 15 minutes to burn over 3Gigs of stuff. I am impressed...
I used the Ritek 4X DVD+R Blank Media (4.7GB DVDplusR Disc, paid $1.69/piece)
I inserted the recorded DVD+R into another Windows98 box DVD-ROM drive, and
now I know where the 2 Gigs limit comes from. "My Computer" tells me
that drive D: is only 1.99 GBytes big, though individual files are
listed at correct size (because, they are all less than 2Gig limit).
I suspect that Windows98, would not be able to read files larger than
2 Gigs from the DVD (though I may be wrong... ). It is amazing that
even a few years ago, we did not see the need for computer files that
big... The Linux only recently can support files larger than 2GBytes,
for the 32bit architectures. 
 
Now... Time to see how the copying goes... 

Beside the cdrecord-ProDVD, Joerg gives us the readcd-clone executable.
Assuming that it has the same options as original readcd
(check: man readcd and readcd-clone -help and the files
which comes with the cdrecord-ProDVD, the README and README.clone).
I thought that should be able to retrieve the iso image from the DVD
with a command:

cd /usr/local/cdrecord-prodvd
./readcd-clone -v dev=1,0,0 -clone f=/tmp/myDVDimage.iso


scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Read  speed:  5540 kB/s (CD  31x, DVD  4x).
Write speed:  5540 kB/s (CD  31x, DVD  4x).
TOC len: 48. First Session: 1 Last Session: 1.
01 14 00 A0 00 00 00 00 01 00 00 
01 14 00 A1 00 00 00 00 01 00 00 
01 14 00 A2 00 00 00 00 FF 3B 4A 
01 14 00 01 00 00 00 00 00 02 00 
Capacity: 1540736 Blocks = 3081472 kBytes = 3009 MBytes = 3155 prMB
Sectorsize: 2048 Bytes
Copy from SCSI (1,0,0) disk to file '/tmp/myDVDimage.iso'
end:   1540736
addr:  xxxxxxx cnt: 107
Time total: 730.121sec
Read 3683322.00 kB at 5044.8 kB/sec.

The strange news though is that the tmp/myDVDimage.iso image which I received
was:

-rw-r--r--    1 root     root     3771721728 Sep 18 23:34 myDVDimage.iso

It also	created	a file:

-rw-r--r--    1 root     root           50 Sep 19 00:08 myDVDimage1.iso.toc

while the iso image which was used to burn this DVD was:

-rw-r--r--    1 root     root     3155427328 Sep 18 17:03 dvd2.iso



I tried to mount this iso image in a loopback mode to see if the
files are there, and if they are the same as the ones which I burned
on the DVD:

In my case I did:

mkdir /mnt/dvd
mount  -t iso9660 -o loop  /tmp/myDVDimage.iso /mnt/dvd

cd /mnt/dvd
ls -l


-r--r--r--    1 root     root     47697920 Sep 18 15:13 asdn.tgz
-r--r--r--    1 root     root     81623040 Sep 18 15:14 chem1.ftp.incoming.tgz
-r--r--r--    1 root     root     1000000000 Sep 18 16:06 content-asdn.tgz-aa
-r--r--r--    1 root     root     1000000000 Sep 18 16:08 content-asdn.tgz-ab
-r--r--r--    1 root     root     364897280 Sep 18 16:09 content-asdn.tgz-ac
-r--r--r--    1 root     root      5949440 Sep 18 13:29 etc.tgz
-r--r--r--    1 root     root      5457920 Sep 18 15:22 home.asd-old.tgz
-r--r--r--    1 root     root     174581760 Sep 18 15:20 home.asd.tgz
-r--r--r--    1 root     root     263854080 Sep 18 15:31 home.ccl.tgz
-r--r--r--    1 root     root     91013120 Sep 18 15:25 home.jkl.tgz
-r--r--r--    1 root     root      4597760 Sep 18 15:17 home.korkin.tgz
-r--r--r--    1 root     root        30720 Sep 18 15:14 nanoandgiga.tgz
-r--r--r--    1 root     root     88023040 Sep 18 13:26 root.tgz
-r--r--r--    1 root     root          845 Sep 18 16:58 TRANS.TBL
-r--r--r--    1 root     root      4270080 Sep 18 13:28 usr.local.tgz
-r--r--r--    1 root     root     23306240 Sep 18 15:16 var.spool.mail.tgz

It looked familiar, but then I tried to do diff on them and the originals

diff /tmp/asdn-backup/asdn.tgz /mnt/dvd/asdn.tgz

and I got:

Binary files /tmp/asdn-backup/asdn.tgz and /mnt/dvd/asdn.tgz differ


In other words... The image which I read in is not what is on the DVD.

I umounted /mnt/dvd and did the same with the original iso image, which
I used to burn the DVD 


cd /tmp
umount /mnt/dvd
mount  -t iso9660 -o loop  /tmp/dvd2.iso /mnt/dvd 


and did

diff /tmp/asdn-backup/asdn.tgz /mnt/dvd/asdn.tgz

and this time they were identical and diff did not complain...

Now... maybe the image on dvd is busted? So I mounted the dvd.
I checked my /etc/fstab, and it had a line:

/dev/cdrom       /mnt/cdrom        udf,iso9660 noauto,owner,kudzu,ro 0 0

and the 

ls -l /dev/cdrom


lrwxrwxrwx    1 root     root            9 Sep 16 09:01 /dev/cdrom -> /dev/scd0

So I mounted the dvd drive and did diff with the file on the hard drive.

mount /mnt/cdrom
diff /tmp/asdn-backup/asdn.tgz /mnt/cdrom/asdn.tgz

and diff did not complain either... (I probably should have checked all files
but it would be a few hours work...), so I did


cd /tmp
umount /mnt/cdrom

(I cd-ed to /tmp, so when I umount the drive, I do not have this:
"device is busy" -- you cannot umount the directory which is being used).
I tried again with readcd-clone, but this time I used a wrapper which sets
the key as it did for cdrecord-ProDVD

my readcd-clone wrapper was called readcd-clone-wrapper.sh and
I just changed the line in cdrecord-wrapper.sh from:

exec ./cdrecord-ProDVD "$@"

to: 

exec ./readcd-clone "$@"


and made the shell script executable:

chmod 755 readcd-clone-wrapper.sh

and I tried to read the image again. (I still had 10 Gigs left,
though my /tmp is getting big... Do not try to do it,
if you do not have a lot of free space on your drive).

./readcd-clone-wrapper.sh -v dev=1,0,0 -clone f=/tmp/myDVDimage1.iso


scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Read  speed:  5540 kB/s (CD  31x, DVD  4x).
Write speed:  5540 kB/s (CD  31x, DVD  4x).
TOC len: 48. First Session: 1 Last Session: 1.
01 14 00 A0 00 00 00 00 01 00 00 
01 14 00 A1 00 00 00 00 01 00 00 
01 14 00 A2 00 00 00 00 FF 3B 4A 
01 14 00 01 00 00 00 00 00 02 00 
Capacity: 1540736 Blocks = 3081472 kBytes = 3009 MBytes = 3155 prMB
Sectorsize: 2048 Bytes
Copy from SCSI (1,0,0) disk to file '/tmp/myDVDimage1.iso'
end:   1540736
addr:  xxxxxxx cnt: 107
Time total: 741.594sec
Read 3683322.00 kB at 4966.8 kB/sec.


ls -l /tmp/myDVDimage1.iso


-rw-r--r--    1 root     root     3771721728 Sep 19 00:20 /tmp/myDVDimage1.iso

It also created  a file:

-rw-r--r--    1 root     root           50 Sep 19 00:08 myDVDimage1.iso.toc

It seems like the readcd did not work for me. I simply do not know how
to make it work...
Why? Since I did not read the README file carefully. I looked again
at the README in:
ftp://ftp.berlios.de/pub/cdrecord/ProDVD
directory say:

        1) Copy DVD (DVD-R & DVD-RW):

                Step 1: "readcd dev=b,t,l f=somefile"
		Step 2: "cdrecord dev=b,t,l -v somefile"

Then I looked again at it, and asked myself...
Why do I need this -clone option. I do not have any TOCs... It is a data
DVD, not a movie or an audio. So I tried (later on, with some other image):

cd /usr/local/cdrecord-prodvd
./readcd-clone -v dev=1,0,0 f=/tmp/myDVDimage.iso

and it worked great...

scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Read  speed:  5540 kB/s (CD  31x, DVD  4x).
Write speed:  5540 kB/s (CD  31x, DVD  4x).
Capacity: 2090592 Blocks = 4181184 kBytes = 4083 MBytes = 4281 prMB
Sectorsize: 2048 Bytes
Copy from SCSI (1,0,0) disk to file '/tmp/myDVDimage.iso'
end:   2090592
addr:  2090592 cnt: 968
Time total: 781.761sec
Read 4181184.00 kB at 5348.4 kB/sec.



ls -l /tmp/myDVDimage.iso /tmp/server.iso


-rw-r--r--    1 root     root     4281532416 Sep 19 16:33 /tmp/myDVDimage.iso
-rw-r--r--    1 root     root     4281532416 Sep 19 15:29 /tmp/server.iso


I did the diff between the original image and the one retrieved from DVD-R:

diff /tmp/myDVDimage.iso /tmp/server.iso

and the stuff was identical. 

There is also an old and dear UNIX "dd" to read the devices in raw mode.
So I tried:  

dd if=/dev/cdrom of=/tmp/myDVDdd.iso


And the image was identical to the original:

ls -l /tmp/myDVDdd.iso


-rw-r--r--    1 root     root     3155427328 Sep 19 00:32 /tmp/myDVDdd.iso


ls -l /tmp/dvd2.iso


-rw-r--r--    1 root     root     3155427328 Sep 18 17:03 /tmp/dvd2.iso


diff /tmp/myDVDdd.iso /tmp/dvd2.iso

did not complain... and images were identical.

The readcd-clone is likely a better choice than a dd since
it will retry to read bad spots on the disk, while the generic dd
will not.

Time to burn the same image on the DVD+RW. I did not have any DVD-RW blanks.
Supposedly, the difference is that the DVD-RW or DVD+RW should be "formatted"
before it can be used, though the DVD+RW aware packages do it "on the fly"
as they write stuff. As media I used:
Ricoh Unbranded DVD+RW 4.7GB Media (I paid $2.29 per blank).

I have put the DVD+RW blank and did my standard command:

cd /usr/local/cdrecord-prodvd
./cdrecord-wrapper.sh -v speed=4 dev=1,0,0 /tmp/dvd2.iso


./cdrecord-wrapper.sh -v speed=4 dev=1,0,0 /tmp/dvd2.iso
Cdrecord-ProDVD-Clone 2.01a12 (i586-pc-linux-gnu) Copyright (C) 1995-2003 Joerg Schilling
Unlocked features: ProDVD Clone 
Limited  features: 
This copy of cdrecord is licensed for: private/research/educational_non-commercial_use
TOC Type: 1 = CD-ROM
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: DVD+RW
Profile: DVD+R 
Profile: DVD+RW (current)
Profile: DVD-RW sequential overwrite 
Profile: DVD-RW restricted overwrite 
Profile: DVD-R sequential recording 
Profile: DVD-ROM 
Profile: CD-RW 
Profile: CD-R 
Profile: CD-ROM 
Using generic SCSI-3/mmc-3 DVD+RW driver (mmc_dvdplusrw).
Driver flags   : DVD MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Drive buf size : 4194304 = 4096 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data  3009 MB        
Total size:     3009 MB = 1540736 sectors
Current Secsize: 2048
Format was needed.
Starting to write CD/DVD at speed 2 in real FORMAT mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
Formatting media


I killed it after a minute (it is RW, so I can to it 1000 times, the
promotional stuff says. Can I?) and then I tried to do it again:

./cdrecord-wrapper.sh -v speed=4 dev=1,0,0 /tmp/dvd2.iso


Cdrecord-ProDVD-Clone 2.01a12 (i586-pc-linux-gnu) Copyright (C) 1995-2003 Joerg Schilling
Unlocked features: ProDVD Clone 
Limited  features: 
This copy of cdrecord is licensed for: private/research/educational_non-commercial_use
TOC Type: 1 = CD-ROM
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic CD-ROM.
./cdrecord-ProDVD: Sorry, no CD/DVD-Recorder or unsupported CD/DVD-Recorder found on this target.
Using generic SCSI-2       CD-ROM driver (scsi2_cd).
Driver flags   : 
Supported modes: 
Drive buf size : 8126464 = 7936 KB
FIFO size      : 4194304 = 4096 KB
./cdrecord-ProDVD: Drive does not support TAO recording.
./cdrecord-ProDVD: Illegal write mode for this drive.


so I did:

./cdrecord-wrapper.sh -v -format speed=4 dev=1,0,0 /tmp/dvd2.iso


Cdrecord-ProDVD-Clone 2.01a12 (i586-pc-linux-gnu) Copyright (C) 1995-2003 Joerg Schilling
Unlocked features: ProDVD Clone 
Limited  features: 
This copy of cdrecord is licensed for: private/research/educational_non-commercial_use
TOC Type: 1 = CD-ROM
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: DVD+RW
Profile: DVD+R 
Profile: DVD+RW (current)
Profile: DVD-RW sequential overwrite 
Profile: DVD-RW restricted overwrite 
Profile: DVD-R sequential recording 
Profile: DVD-ROM 
Profile: CD-RW 
Profile: CD-R 
Profile: CD-ROM 
Using generic SCSI-3/mmc-3 DVD+RW driver (mmc_dvdplusrw).
Driver flags   : DVD MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Drive buf size : 4194304 = 4096 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data  3009 MB        
Total size:     3009 MB = 1540736 sectors
Current Secsize: 2048
Trying to clear drive status.
Format was not needed.
Starting to write CD/DVD at speed 2 in real FORMAT mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
./cdrecord-ProDVD: Medium is already formatted.
./cdrecord-ProDVD: Cannot format medium.


Then I tried again:

./cdrecord-wrapper.sh -v speed=4 dev=1,0,0 /tmp/dvd2.iso


Cdrecord-ProDVD-Clone 2.01a12 (i586-pc-linux-gnu) Copyright (C) 1995-2003 Joerg Schilling
Unlocked features: ProDVD Clone 
Limited  features: 
This copy of cdrecord is licensed for: private/research/educational_non-commercial_use
TOC Type: 1 = CD-ROM
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: DVD+RW
Profile: DVD+R 
Profile: DVD+RW (current)
Profile: DVD-RW sequential overwrite 
Profile: DVD-RW restricted overwrite 
Profile: DVD-R sequential recording 
Profile: DVD-ROM 
Profile: CD-RW 
Profile: CD-R 
Profile: CD-ROM 
Using generic SCSI-3/mmc-3 DVD+RW driver (mmc_dvdplusrw).
Driver flags   : DVD MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Drive buf size : 4194304 = 4096 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data  3009 MB        
Total size:     3009 MB = 1540736 sectors
Current Secsize: 2048
Trying to clear drive status.
Blocks total: 265712 Blocks current: 265712 Blocks remaining: -1275024
./cdrecord-ProDVD: Data does not fit on current disk.


so in despair I did:


./cdrecord-wrapper.sh -v -dao speed=4 dev=1,0,0 /tmp/dvd2.iso


Cdrecord-ProDVD-Clone 2.01a12 (i586-pc-linux-gnu) Copyright (C) 1995-2003 Joerg Schilling
Unlocked features: ProDVD Clone 
Limited  features: 
This copy of cdrecord is licensed for: private/research/educational_non-commercial_use
TOC Type: 1 = CD-ROM
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: DVD+RW
Profile: DVD+R 
Profile: DVD+RW (current)
Profile: DVD-RW sequential overwrite 
Profile: DVD-RW restricted overwrite 
Profile: DVD-R sequential recording 
Profile: DVD-ROM 
Profile: CD-RW 
Profile: CD-R 
Profile: CD-ROM 
Using generic SCSI-3/mmc-3 DVD+RW driver (mmc_dvdplusrw).
Driver flags   : DVD MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Drive buf size : 4194304 = 4096 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data  3009 MB        
Total size:     3009 MB = 1540736 sectors
Current Secsize: 2048
Trying to clear drive status.
Blocks total: 265712 Blocks current: 265712 Blocks remaining: -1275024
./cdrecord-ProDVD: Data does not fit on current disk.


Now, I understand that I do not know a thing about it and I have to RTFM,
and I did:

./cdrecord-wrapper.sh -help > cdrecord.help.txt 2>&1 


and

./cdrecord-wrapper.sh -blank=help


and I sought knowledge on: "What you can do when you kill cdrecord during
formatting of the CDR+RW drive" by going through the options in the file
cdrecord.help.txt.

I decided to go with the force (though there are probably 20 other
options to combine which would do the same). The force was with me this time:


./cdrecord-wrapper.sh -v -force  speed=4 dev=1,0,0 /tmp/dvd2.iso


Cdrecord-ProDVD-Clone 2.01a12 (i586-pc-linux-gnu) Copyright (C) 1995-2003 Joerg Schilling
Unlocked features: ProDVD Clone 
Limited  features: 
This copy of cdrecord is licensed for: private/research/educational_non-commercial_use
TOC Type: 1 = CD-ROM
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'SONY    '
Identifikation : 'DVD RW DRU-510A '
Revision       : '1.0c'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: DVD+RW
Profile: DVD+R 
Profile: DVD+RW (current)
Profile: DVD-RW sequential overwrite 
Profile: DVD-RW restricted overwrite 
Profile: DVD-R sequential recording 
Profile: DVD-ROM 
Profile: CD-RW 
Profile: CD-R 
Profile: CD-ROM 
Using generic SCSI-3/mmc-3 DVD+RW driver (mmc_dvdplusrw).
Driver flags   : DVD MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Drive buf size : 4194304 = 4096 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data  3009 MB        
Total size:     3009 MB = 1540736 sectors
Current Secsize: 2048
Trying to clear drive status.
Blocks total: 265712 Blocks current: 265712 Blocks remaining: -1275024
./cdrecord-ProDVD: Data does not fit on current disk.
./cdrecord-ProDVD: Notice: -overburn is not expected to work with DVD media.
./cdrecord-ProDVD: Notice: Overburning active. Trying to write more than the official disk capacity.
starting to write CD/DVD at speed 2 in real force TAO mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Starting new track at sector: 0
Track 02:  xxxx of 3009 MB written (fifo 100%) [buf 100%]   2.6x.
Track 02: Total bytes read/written: 3155427328/3155427328 (1540736 sectors).
Writing  time:  911.898s
Average write speed   2.5x.
Min drive buffer fill was 48%
Fixating...
Fixating time:   10.062s
./cdrecord-ProDVD: fifo had 49702 puts and 49702 gets.
./cdrecord-ProDVD: fifo was 0 times empty and 30217 times full, min fill was 87%.

Now... The time to test has come:

mount /mnt/cdrom
df -k
diff /tmp/asdn-backup/asdn.tgz /mnt/cdrom/asdn.tgz
umount /mnt/cdrom

and diff was happy with it. I also inserted the burn-out into another
Windows machine with DVD-ROM drive to see if I could read the DVD+RW
in an old DVD-ROM. To my surprise, it could (the drive was:
Creative PC-DVD 12x) but it was blinking and trying to recognize it
for a while. I inserted the DVDs which I created into the DVD/CD-ROM
drive on my laptop: Dell Inspiron 5000e with TOSHIBA DVD-ROM SD-C2402.
The DVD-R and DVD+R mounted without any problems. The DVD+RW was not
recognized. Then, I tried the disks again in my kids newer computers
(yes, kids have nice new toys, and I am riding an old crock...),
and the CD-R, CD+R, and CD+RW worked fine. While this is not
a statistical sample, as in the case of CD-RW, I would not bet
my life that DVD+RWs will work in every DVD-ROM drive. 

So, in short... What I learned up to now is:

1) If you want to use Sony DRU-510A under Linux, you can use
   the stuff from ftp://ftp.berlios.de/pub/cdrecord/ProDVD/.    

2) You need to have ide-scsi kernel module loaded. Best, if it is preloaded
   with boot loader (LILO or grub). 

3) Before saving files on DVD in the ISO9660 format,
   use a stock mkisofs which comes with RH9, but remember that while the
   total image size can be larger than 2Gigs, no individual file can be larger
   than 2 Gigs. If you have such files, split them with split UNIX utility.
   I used the command:

      mkisofs -v -U -r -joliet-long -T  -o image.iso /some/dirs

   but there are many options to mkisofs and you should read
   (man mkisofs and also do: mkisofs -help). 

4) edit cdrecord-wrapper.sh to suit your needs and run as:

      ./cdrecord-wrapper.sh speed=4 dev=1,0,0 /tmp/SomeImage.iso

   To find what you need to put after dev, use:

      ./cdrecord-wrapper.sh -scanbus


5) To read the image (e.g. to copy the data DVD) of the data DVD to the
   hard drive use the readcd-clone as:

      ./readcd-clone -v dev=1,0,0 f=/tmp/myDVDimage.iso


   To test the image, after you transferred it to your hard drive, use the
   loopback mount. For example, if you created the /mnt/dvd directory
   to mount an image, you can explore it after you do:

     mount  -t iso9660 -o loop  /tmp/myDVDimage.iso /mnt/dvd 

   You can write the image on another DVD blank with a ./cdrecord-wrapper.sh

6) if you have a DVD+RW (and most likely the DVD-RW, but I did not try),
   and ./cdrecord-wrapper.sh gives you pain in writing it out, use 
   the force, i.e.:

      ./cdrecord-wrapper.sh -v -force  speed=4 dev=1,0,0 /tmp/dvd2.iso 


7) To list the options of /readcd-clone, ./cdrecord-wrapper.sh, and
   mkisofs, use -help parameter. For example, to save the list of
   ./cdrecord-wrapper.sh available parameters to a file called
   write-parameters.txt , use the following line if you are in Bourne
   type shell:

     ./cdrecord-wrapper.sh -help > write-parameter.txt 2>&1 
 
   since the output is originally sent to STDERR. If you are still using
   csh or tcsh, you can do:
   
    ./cdrecord-wrapper.sh -help >& write-parameter.txt 

   i.e., write both STDOUT and STDERR to the write-parameter.txt
   (Note this is equivalent to the Bourne shell example above, since
   it captures also STDOUT and STDERR).

Sorry guys, I have to go... I hope you did not read all this.

I will be adding stuff to it (e.g., my next project is to review the 
dvd+rw-tools at:
http://fy.chalmers.se/~appro/linux/DVD+RW/.
I will not tell you, however, how to copy protected movies on the DVD,
since talking about is forbidden by law in the USA (under the, so
called, freedom of expression constitutional amendment). 
BTW, all this nice free software which we are so grateful to get and
give will soon be illegal due to software patents. So enjoy before
it is taken from us. 

Jan Labanowski, jkl at ccl.net, September 19, 2003


Modified: Mon Oct 20 02:12:12 2003 GMT
Page accessed 452 times since Tue Mar 15 07:17:03 2005 GMT