在 Linux 上刻录 DVD+R DL 媒体的命令行?

kbu*_*ien 6 linux command-line dvd

一台 Linux 系统上的 Plextor PX-750A 制作了许多 DVD+R DL 杯垫,同时试图用 growisofs 和 Schilling cdrecord 程序刻录 8GB DVD .iso 文件。

我首先尝试了growisofs:

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

命令行是:

growisofs -dvd-compat -Z /dev/sr1=SUU_14.03.00_A00.iso
Run Code Online (Sandbox Code Playgroud)

-dvd-compat还尝试删除该选项。

Schilling cdrtools 也尝试过:

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

命令行是:

/usr/local/bin/cdrecord -v dev=ATAPI:1,0,0 SUU_14.03.00_A00.iso
Run Code Online (Sandbox Code Playgroud)

在这两种情况下,刻录都中止了,就好像它写了一个层,并在它应该移动到第二层时发出咝咝声。

成长:

 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
Run Code Online (Sandbox Code Playgroud)

光盘:

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.
Run Code Online (Sandbox Code Playgroud)

看看刻录后的媒体,它似乎从内到外写入了数据——给人的印象是它写满了一层,然后在该层结束时出错。在多次尝试中,每次失败大约是在以下过程中的 50%:

$ 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
Run Code Online (Sandbox Code Playgroud)

开始 2014/05/23 编辑:

cdrecord 手册页说:

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.
Run Code Online (Sandbox Code Playgroud)

在没有手动计算断点的情况下使用 layerbreak 给出:

cdrecord -v driveropts=layerbreak dev=ATAPI:1,0,0 SUU_14.03.00_A00.iso
...
cdrecord: Bad layer break value ''.
...
Run Code Online (Sandbox Code Playgroud)

经过一番研究,我发现了一个包含“最佳层中断计算”的旧 cdrecord 的补丁。通过一些实验,我发现我可以在 shell 中计算“最佳层中断”:

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

这给出了 2059216 的 layerbreak 值。实际上,对于咧嘴笑,我尝试上下调整该值。对于某些 layerbreak 值(如 2059215),cdrecord 会报告:

cdrecord: Layer break at 2059215 is not properly aligned.
Run Code Online (Sandbox Code Playgroud)

希望,我试过:

cdrecord -v driveropts=layerbreak=2059216 dev=ATAPI:1,0,0 SUU_14.03.00_A00.iso
Run Code Online (Sandbox Code Playgroud)

仍然有一个过山车和写错误:

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.
Run Code Online (Sandbox Code Playgroud)

2014/05/23 结束编辑。

此问题发生在未安装 GUI 工具的服务器上。我正在寻找一种从命令行刻录双层 DVD 的方法。

kbu*_*ien 3

  1. 尝试使用其他 DVD 刻录机。

    当与 USB 连接的 LG M/N GE24LU20 DVD 刻录机一起使用时,失败的命令可以正常运行。

  2. 检查 DVD 刻录机固件版本。如果有新版本可用,请升级固件。

    上述两个growisofs命令在 Plextor PX-750A-UF 1.01 刻录机上失败,但在将固件更新到PX-750A-UF 1.03cdrecord后,在同一驱动器上成功。

    /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
    
    Run Code Online (Sandbox Code Playgroud)

    固件升级可能还有其他好处。例如,PX-750A-UF 1.01 固件设备以大约 2.4 倍的速率写入双层 DVD,但 1.03 固件以 6 倍的速率写入介质。

关于层中断,有趣的是观察到cdrecord在 4023 MB 点(中间)和 4025 MB 点之前暂停了很长时间,当cdrecord使用具有旧固件的驱动器时,该点会失败。看起来延迟可能是由于层切换操作造成的。