Linux Command Line – How to Burn DVD+R DL Media

command linedvdlinux

A Plextor PX-750A on a Linux system has made many DVD+R DL coasters while trying to burn an 8GB DVD .iso file with growisofs and the Schilling cdrecord program.

I tried growisofs first:

growisofs --version
* growisofs by <appro@fy.chalmers.se>, version 7.0,
  front-ending to genisoimage: genisoimage 1.1.8 (Linux)

The command line was:

growisofs -dvd-compat -Z /dev/sr1=SUU_14.03.00_A00.iso

Removal of the -dvd-compat option was also attempted.

Schilling cdrtools was also tried:

Cdrecord-ProDVD-ProBD-Clone 3.00 (i686-pc-linux-gnu) Copyright (C) 1995-2010 Jörg Schilling

The command line was:

/usr/local/bin/cdrecord -v dev=ATAPI:1,0,0 SUU_14.03.00_A00.iso

In both cases, the burn aborts half way through as though it writes a layer and croaks when it should move to the second layer.

growisofs:

 4275175424/8434493440 (50.7%) @1.6x, remaining 22:03 RBU 100.0% UBU  94.4%
:-[ WRITE@LBA=1fdb40h failed with SK=3h/ASC=0Ch/ACQ=00h]: Input/output error
:-( write failed: Input/output error

cdrecord:

Track 01: 4205 of 8043 MB written (fifo  99%) [buf  97%]   2.4x./usr/local/bin/cdrecord: Input/output error. write_g1: scsi sendcmd: no error
CDB:  2A 00 00 20 DA 10 00 00 10 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 03 00 00 00 00 0A 00 00 95 00 0C 00 00 00 00 00
Sense Key: 0x3 Medium Error, Segment 0
Sense Code: 0x0C Qual 0x00 (write error) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.019s timeout 200s

write track data: error after 4409294848 bytes
/usr/local/bin/cdrecord: A write error occured.
/usr/local/bin/cdrecord: Please properly read the error message above.

Looking at the media after the burn, it appears to have written data from the inside to the outside – giving the impression that it wrote one layer fully and then errored out when that layer ended. In several attempts, each failure is at about 50% of the way through the burn of:

$ ls -lh SUU_14.03.00_A00.iso
-rw-rw-r-- 1 user group 7.9G 2014-05-14 07:53 SUU_14.03.00_A00.iso

Begin 2014/05/23 edit:

The cdrecord man page says:

Cdrecord functional options
  ...
  driveropts=option list
    ...
    layerbreak
      Switch  a  drive  with  DVD-R/DL  medium  into layer jump
      recording recording mode and  use  automatic  layer-break
      position setup.

      By  default,  DVD-R/DL  media  is  written  in sequential
      recording mode that completely fills up both layers.

    layerbreak=value
      Set up  a  manual  layer-break  value  for  DVD-R/DL  and
      DVD+R/DL.   The  specified  layer-break value must not be
      set to less than half of the recorded data size and  must
      not be set to more than the remaining Layer 0 size of the
      medium.  The manual layer-break value needs to be a  mul-
      tiple  of  the  ECC  sector size which is 16 logical 2048
      byte sectors in case of DVD media  and  32  logical  2048
      byte sectors in case of HD-DVD or BD media.

      Cdrecord  does  not  allow to write DL media in case that
      the total amount of data is less then the Layer 0 size of
      the  medium  except  when  a  manual layer-break has been
      specified by using the layerbreak=value option.

Use of layerbreak without a manually computed breakpoint gives:

cdrecord -v driveropts=layerbreak dev=ATAPI:1,0,0 SUU_14.03.00_A00.iso
...
cdrecord: Bad layer break value ''.
...

After some research, I found a patch to an older cdrecord that contained an "optimal layer break computation". With a little experimentation, I found that I could compute the "optimal layer break" in a shell:

echo -e "a = $(isosize SUU_14.03.00_A00.iso)\nb = a / 2048 / 2\nb - 1 + 16 - ( b - 1 ) % 16\n" | bc

This gave a layerbreak value of 2059216. In fact, for grins, I tried adjusting the value up and down. For some layerbreak values (like 2059215) cdrecord would report:

cdrecord: Layer break at 2059215 is not properly aligned.

Hopeful, I tried:

cdrecord -v driveropts=layerbreak=2059216 dev=ATAPI:1,0,0 SUU_14.03.00_A00.iso

And still got a coaster and write error:

Track 01: 4205 of 8043 MB written (fifo  99%) [buf  97%]   2.4x./usr/local/bin/cdrecord: Input/output error. write_g1: scsi sendcmd: no error
CDB:  2A 00 00 20 DB 60 00 00 10 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 03 00 00 00 00 0A 00 00 95 00 0C 00 00 00 00 00
Sense Key: 0x3 Medium Error, Segment 0
Sense Code: 0x0C Qual 0x00 (write error) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.022s timeout 200s

write track data: error after 4409982976 bytes
/usr/local/bin/cdrecord: A write error occured.
/usr/local/bin/cdrecord: Please properly read the error message above.

End of 2014/05/23 edit.

This issue occured on a server where there were no GUI tools installed. I am looking for a way to burn dual layer DVDs from the command-line.

Best Answer

  1. Try another DVD writer.

    Failing commands functioned properly when used with a USB-attached LG M/N GE24LU20 DVD writer.

  2. Check DVD writer firmware revision. Upgrade the firmware if a newer revision is available.

    Both growisofs and cdrecord commands above that fail on a Plextor PX-750A-UF 1.01 burner succeed with the same drive after a firmware update to PX-750A-UF 1.03.

    /usr/local/bin/cdrecord -v dev=ATAPI:1,0,0 SUU_14.03.00_A00.iso
    
    growisofs -dvd-compat -Z /dev/sr1=SUU_14.03.00_A00.iso
    

    Other benefits to firmware upgrade are probable. For instance, the PX-750A-UF 1.01 firmware device wrote the dual layer DVD at about 2.4x but the 1.03 firmware wrote the media at a 6x rate.

Concerning the layer break, it was interesting to observe cdrecord pausing a long time at the 4023 MB point (half way) and right before the 4025 MB point where cdrecord failed when working with the drive when it had the older firmware. It had the appearance that the delay may have been due to a layer switch operation.

Related Question