AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 550571
Accepted
il mietitore
il mietitore
Asked: 2019-11-06 15:25:26 +0800 CST2019-11-06 15:25:26 +0800 CST 2019-11-06 15:25:26 +0800 CST

如何正确擦除和使用 CD-RW

  • 772

有这张 CD-RW,我一直用它来刻录发行版的 CD。突然之间,它就像一张普通的 CD。

当我安装它时,它以这种方式安装:

 - Proprietary: Root
 - Access: Read only
 - Group: Root
 - Access: Read only
 - Other: Read only

我想我可以手动将它安装为读写。这些是结果:

alex@Sargon:~$ sudo mount -o rw '/media/cdrom0'
mount: /dev/sr0 is write-protected, mounting read-only

我读到这个“写保护”是写在 CD-RW 上的东西,以防它在刻录时被“最终确定”,但应该可以通过擦除 CD 来消除它。想,如果我尝试这样做 via wodim,就会发生这种情况:

alex@Sargon:~$ wodim --devices
wodim: No such file or directory. 
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.

关于如何进行的想法?

编辑 2019 年 11 月 1 日至 6 日

我按照@telcoM 的说明进行操作,得到了一些结果。

我能够安装lsscsi并得到这个输出:

alex@Sargon:~$ lsscsi -g
[0:0:0:0]    disk    ATA      ST500LT012-1DG14 SDM1  /dev/sda   /dev/sg0 
[1:0:0:0]    cd/dvd  HL-DT-ST DVDRAM GUA0N     1.00  /dev/sr0   /dev/sg1 

所以wodim能够得到一些结果。在我看来,它将它识别为正确的 CD-RW 光盘:

alex@Sargon:~$ wodim dev=/dev/sg1 --prcap
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'HL-DT-ST'
Identification : 'DVDRAM GUA0N    '
Revision       : '1.00'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.

Drive capabilities, per MMC-3 page 2A:

  Does read CD-R media
  Does write CD-R media
  Does read CD-RW media
  Does write CD-RW media
  Does read DVD-ROM media
  Does read DVD-R media
  Does write DVD-R media
  Does read DVD-RAM media
  Does write DVD-RAM media
  Does support test writing

  Does read Mode 2 Form 1 blocks
  Does read Mode 2 Form 2 blocks
  Does read digital audio blocks
  Does restart non-streamed digital audio reads accurately
  Does support Buffer-Underrun-Free recording
  Does read multi-session CDs
  Does read fixed-packet CD media using Method 2
  Does not read CD bar code
  Does read R-W subcode information
  Does return R-W subcode de-interleaved and error-corrected
  Does read raw P-W subcode data from lead in
  Does return CD media catalog number
  Does return CD ISRC information
  Does support C2 error pointers
  Does not deliver composite A/V data

  Does play audio CDs
  Number of volume control levels: 256
  Does support individual volume control setting for each channel
  Does support independent mute setting for each channel
  Does not support digital output on port 1
  Does not support digital output on port 2

  Loading mechanism type: tray
  Does support ejection of CD via START/STOP command
  Does not lock media on power up via prevent jumper
  Does allow media to be locked in the drive via PREVENT/ALLOW command
  Is currently in a media-locked state
  Does not support changing side of disk
  Does not have load-empty-slot-in-changer feature
  Does not support Individual Disk Present feature

  Maximum read  speed:  4234 kB/s (CD  24x, DVD  3x)
  Current read  speed:  4234 kB/s (CD  24x, DVD  3x)
  Maximum write speed:  1764 kB/s (CD  10x, DVD  1x)
  Current write speed:  1764 kB/s (CD  10x, DVD  1x)
  Rotational control selected: CLV/PCAV
  Buffer size in KB: 512
  Copy management revision supported: 1
  Number of supported write speeds: 1
  Write speed # 0:  1764 kB/s CLV/PCAV (CD  10x, DVD  1x)

Supported CD-RW media types according to MMC-4 feature 0x37:
  Does write multi speed       CD-RW media
  Does write high  speed       CD-RW media
  Does write ultra high speed  CD-RW media
  Does write ultra high speed+ CD-RW media

我仍然不确定此时该做什么。

与此同时,我尝试使用k3b,它也无法擦除磁盘并得到以下输出:

Devices
-----------------------
HL-DT-ST DVDRAM GUA0N 1.00 (/dev/sr0, CD-R, CD-RW, CD-ROM, DVD-ROM, DVD-R, DVD-RW, DVD-R DL, DVD+R, DVD+RW, DVD+R DL) [DVD-ROM, DVD-R Sequential, DVD-R Dual Layer Sequential, DVD-R Dual Layer Jump, DVD-RAM, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW] [SAO, TAO, RAW, SAO/R96P, SAO/R96R, RAW/R16, RAW/R96P, RAW/R96R, Restricted Overwrite, Layer Jump] [%7]

System
-----------------------
K3b Version: 2.0.3
KDE Version: 4.14.26
QT Version:  4.8.7
Kernel:      4.9.0-11-amd64

Used versions
-----------------------
cdrecord: 1.1.11

cdrecord
-----------------------
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
SCSI buffer size: 64512
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
TOC Type: 1 = CD-ROM
Driveropts: 'burnfree'
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'HL-DT-ST'
Identification : 'DVDRAM GUA0N    '
Revision       : '1.00'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x000A (CD-RW)
Profile: 0x0015 (DVD-R/DL sequential recording) 
Profile: 0x0016 (DVD-R/DL layer jump recording) 
Profile: 0x002B (DVD+R/DL) 
Profile: 0x001B (DVD+R) 
Profile: 0x001A (DVD+RW) 
Profile: 0x0014 (DVD-RW sequential recording) 
Profile: 0x0013 (DVD-RW restricted overwrite) 
Profile: 0x0012 (DVD-RAM) 
Profile: 0x0011 (DVD-R sequential recording) 
Profile: 0x0010 (DVD-ROM) 
Profile: 0x000A (CD-RW) (current)
Profile: 0x0009 (CD-R) 
Profile: 0x0008 (CD-ROM) 
Profile: 0x0002 (Removable disk) 
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 362208 = 353 KB
Speed set to 1764 KB/s
Current Secsize: 2048
ATIP info from disk:
  Indicated writing power: 2
  Reference speed: 6
  Is not unrestricted
  Is erasable
  Disk sub type: High speed Rewritable (CAV) media (1)
  ATIP start of lead in:  -11077 (97:34/23)
  ATIP start of lead out: 359849 (79:59/74)
  1T speed low:  4 1T speed high: 10
  2T speed low:  2 2T speed high: 10
  power mult factor: 2 6
  recommended erase/write power: 5
  A1 values: 24 2C DC
  A2 values: 14 A4 4A
  A3 values: 04 C4 80
Disk type:    Phase change
Manuf. index: 11
Manufacturer: Mitsubishi Chemical Corporation
Starting to write CD/DVD at speed  10.0 in real BLANK mode for single session.
Last chance to quit, starting real write in    2 seconds.
   1 seconds.
   0 seconds. Operation starts.
Performing OPC...
Blanking PMA, TOC, pregap
Errno: 5 (Input/output error), blank unit scsi sendcmd: no error
CDB:  A1 01 00 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 71 00 03 00 00 00 00 0A 00 00 00 00 51 00 00 00
Sense Key: 0x3 Medium Error, deferred error, Segment 0
Sense Code: 0x51 Qual 0x00 (erase failure) Fru 0x0
Sense flags: Blk 0 (not valid) 
cmd finished after 17.009s timeout 9600s
/usr/bin/wodim: Cannot blank disk, aborting.
/usr/bin/wodim: Some drives do not support all blank types.
/usr/bin/wodim: Try again with wodim blank=all.

cdrecord command:
-----------------------
/usr/bin/wodim -v gracetime=2 dev=/dev/sr0 speed=10 -tao driveropts=burnfree blank=fast

我尝试更改权限k3bsetup并尝试将刻录组设置为alex,但它没有改变任何内容。

编辑 2 - 那天晚些时候......

我尝试wodim按照以下建议擦除磁盘:

alex@Sargon:~$ wodim dev=/dev/sg1 blank=all -force
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'HL-DT-ST'
Identification : 'DVDRAM GUA0N    '
Revision       : '1.00'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Speed set to 1764 KB/s
Waiting for drive to calm down.
Starting to write CD/DVD at speed  10.0 in real force BLANK mode for single session.
Last chance to quit, starting real write in    0 seconds. Operation starts.
Errno: 5 (Input/output error), blank unit scsi sendcmd: no error
CDB:  A1 00 00 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 71 00 03 00 00 00 00 0A 00 00 00 00 51 00 00 00
Sense Key: 0x3 Medium Error, deferred error, Segment 0
Sense Code: 0x51 Qual 0x00 (erase failure) Fru 0x0
Sense flags: Blk 0 (not valid) 
cmd finished after 24.064s timeout 9600s
Starting to write CD/DVD at speed  10.0 in real force BLANK mode for single session.
No chance to quit anymore. Operation starts.
Errno: 5 (Input/output error), blank unit scsi sendcmd: no error
CDB:  A1 00 00 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 71 00 03 00 00 00 00 0A 00 00 00 00 51 00 00 00
Sense Key: 0x3 Medium Error, deferred error, Segment 0
Sense Code: 0x51 Qual 0x00 (erase failure) Fru 0x0
Sense flags: Blk 0 (not valid) 
cmd finished after 16.381s timeout 9600s
wodim: Cannot blank disk, aborting.

我也尝试过使用root权限,但方法相同。

data-cd
  • 2 2 个回答
  • 1692 Views

2 个回答

  • Voted
  1. telcoM
    2019-11-06T17:19:22+08:002019-11-06T17:19:22+08:00

    你有lsscsi可用的命令,或者你可以安装它吗?如果可能,运行lsscsi -g并从列表中识别您的 CD-RW 驱动器。

    您的 CD-RW 驱动器可能是/dev/sr0,但它也会有一个/dev/sg*与之关联的设备。这是“通用 SCSI 设备”,允许向驱动器发送更专业的命令。lsscsi -g输出应指示哪个通用 SCSI 设备对应于您的 CD-RW 驱动器。

    一旦您知道您的 CD-RW 驱动器可以访问,例如/dev/sg1,您可以尝试wodim dev=/dev/sg1 --prcap。如果该命令生成一长串 CD/DVD 功能以及您的驱动器对它们中的每一个的支持,那么您已经dev=为您的驱动器找到了正确的参数。

    似乎某些更改导致wodim无法自动检测设备:在我的 Debian 10 系统上,同样的事情发生了,但如果我手动指定/dev/sg*设备,它就可以工作。wodim您可以使用/etc/wodim.conf将特定设备参数设为 的默认值wodim,这样您就不必继续输入它了。

    将 CD-RW 挂载为常规可写文件系统需要写入数据包,您可以使用/dev/pktcdvd/pktcdvd0而不是常规/dev/sr0CD 设备。但是,该pktcdvd驱动程序已被 Linux 内核开发人员标记为已弃用,因为显然很少有人使用它。该驱动程序尚未从内核源代码中删除,但在弃用通知之后,某些发行版可能已将其从其标准内核配置中删除。

    wodim即使看起来无法擦除,也要擦除(空白)您的 CDRW :

    wodim dev=/dev/sg1 blank=all -force
    

    为了摆脱指定dev=参数的需要,您可以编辑/etc/wodim.conf以制作/dev/sg1默认设备,分两步:

    1.) 通过将此行添加到文件末尾来为设备添加一个昵称“刻录机”:

    burner=    /dev/sg1 -1  -1  burnfree
    

    2.) 编辑CDR_DEVICE文件开头附近的设置以使用昵称:

    #CDR_DEVICE=cdrom  # this line commented out and the next line added
    CDR_DEVICE=burner
    
    • 2
  2. Best Answer
    il mietitore
    2019-11-11T05:49:15+08:002019-11-11T05:49:15+08:00

    在尝试了几个程序、gui,甚至切换到 Windows 之后,我想知道问题是否与驱动器有关。

    啊啊啊……原来如此。我只是去了另一台电脑,并能够在 30 秒内将其擦除。

    不知道为什么我可以刻录但不能通过这个擦除。去搞清楚。

    尽管如此,感谢@telcoM 的努力。

    • 0

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve