cdrecord fails to burn cd's

Bug #54828 reported by mouhmouh
24
Affects Status Importance Assigned to Milestone
cdrtools (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: cdrecord

My ubuntu dapper fails when trying to burn cd's with nautilus-cd-burner and other software as well.

Here is the debug output from cdrecord when trying to burn an ubuntu image:

cdrecord debug=10 fs=16m dev=/dev/hda -dao driveropts=burnfree -v -data -nopad /home/mina/Desktop/ubuntu-6.06-desktop-i386.iso
dev: '/dev/hda' speed: -1 fs: 16777216 driveropts 'burnfree'
Cdrecord-Clone 2.01.01a01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Joerg Schilling
NOTE: this version of cdrecord is an inofficial (modified) release of cdrecord
      and thus may have bugs that are not present in the original version.
      Please send bug reports and support requests to <email address hidden>.
      The original author should not be bothered with problems of this version.

cdrecord: Warning: Running on Linux-2.6.15-26-386
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
TOC Type: 1 = CD-ROM
fs: 16777216 buflen: 16781312
cdrecord: shared memory segment attached at: B6E0C000 size 16781312
buf: B6E0C000 bufend: B7E0D000, buflen: 16781312
buf: B6E0C000 bufend: B7E0D000, buflen: 16781312 (align 0)
scsidev: '/dev/hda'
devname: '/dev/hda'
scsibus: -2 target: -2 lun: -2
scg__open(/dev/hda) -2,-2,-2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Error: Cannot gain SYS_RAWIO capability.Is cdrecord installed SUID root?
: Operation not permitted
Using libscg version 'debian-0.8debian2'.
cdrecord: Warning: using inofficial version of libscg (debian-0.8debian2 '@(#)scsitransp.c 1.91 04/06/17 Copyright 1988,1995,2000-2004 J. Schilling').
Driveropts: 'burnfree'
Target (0,0,0): DMA max 129024 old max: 64512
SCSI buffer size: 64512
Target (0,0,0): DMA max 129024 old max: 64512
scgo_getbuf: 64512 bytes
atapi: 1
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
Device type : Removable CD-ROM
Version : 0
Response Format: 1
Vendor_info : 'PLEXTOR '
Identifikation : 'DVDR PX-712A '
Revision : '1.06'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
ioctl ret: 0
host_status: 00 driver_status: 00
Current: 0x0009
Profile: 0x001B
Profile: 0x001A
Profile: 0x0014
Profile: 0x0013
Profile: 0x0011
Profile: 0x0010
Profile: 0x000A
Profile: 0x0009 (current)
Profile: 0x0008

Revision history for this message
mouhmouh (fungus-mbnet) wrote :

Kernel upgrade to linux-image-2.6.15-26-386 (Aug 4 2006) seems to have changed something (of course all the other related packages were also upgraded). Now nautilus-cd-burner succeeds in writing a cd. The following messages are displayed by syslog...

Aug 4 17:50:05 sieni kernel: [17179644.992000] scsi: unknown opcode 0xe9
Aug 4 17:50:05 sieni kernel: [17179644.992000] scsi: unknown opcode 0xed
Aug 4 17:50:06 sieni kernel: [17179645.472000] scsi: unknown opcode 0x01
Aug 4 17:50:15 sieni kernel: [17179654.584000] scsi: unknown opcode 0xf5
Aug 4 17:50:37 sieni kernel: [17179676.152000] hda: packet command error: status=0x51 { DriveReady SeekComplete Error }
Aug 4 17:50:37 sieni kernel: [17179676.152000] hda: packet command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
Aug 4 17:50:37 sieni kernel: [17179676.152000] ide: failed opcode was: unknown
Aug 4 17:52:58 sieni kernel: [17179817.896000] scsi: unknown opcode 0xeb

Revision history for this message
Kenny Duffus (kduffus) wrote :

This problem is present in edgy and causes k3b to fail as well (it uses cdrecord to write the cd)

kd@napier-01:/store/tmp$ ls -l /dev/hdc
brw-rw---- 1 root cdrom 22, 0 2006-08-07 11:13 /dev/hdc
kd@napier-01:/store/tmp$ groups
people root cdrom floppy sudo audio

kd@napier-01:/store/tmp$ cdrecord -v dev=/dev/hdc edgy-alternate-i386.iso
cdrecord: No write mode specified.
cdrecord: Asuming -tao mode.
cdrecord: Future versions of cdrecord may have different drive dependent defaults.
cdrecord: Continuing in 5 seconds...
Cdrecord-Clone 2.01.01a03 (i686-pc-linux-gnu) Copyright (C) 1995-2005 Joerg Schilling
NOTE: this version of cdrecord is an inofficial (modified) release of cdrecord
      and thus may have bugs that are not present in the original version.
      Please send bug reports and support requests to <email address hidden>.
      The original author should not be bothered with problems of this version.

cdrecord: Warning: Running on Linux-2.6.17-5-k7
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
TOC Type: 1 = CD-ROM
scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Error: Cannot gain SYS_RAWIO capability.Is cdrecord installed SUID root?
: Operation not permitted
Using libscg version 'debian-0.8debian2'.
cdrecord: Warning: using inofficial version of libscg (debian-0.8debian2 '@(#)scsitransp.c 1.91 04/06/17 Copyright 1988,1995,2000-2004 J. Schilling').
SCSI buffer size: 64512
atapi: 1
Device type : Removable CD-ROM
Version : 0
Response Format: 1
Vendor_info : 'SAMSUNG '
Identifikation : 'CDRW/DVD SM-352B'
Revision : 'T805'
Device seems to be: Generic mmc2 DVD-ROM.
Current: 0x000A
Profile: 0x000A (current)
Profile: 0x0009
Profile: 0x0008
Profile: 0x0002
Profile: 0x0010
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 : 1959936 = 1914 KB
FIFO size : 4194304 = 4096 KB
Track 01: data 590 MB
Total size: 677 MB (67:09.58) = 302219 sectors
Lout start: 678 MB (67:11/44) = 302219 sectors
cdrecord: Operation not permitted. Cannot send SCSI cmd via ioctl

Revision history for this message
none (ubuntu-bugs-nullinfinity-deactivatedaccount) wrote :

I can confirm this. I have exactly the same problem on Edgy/AMD64 that Kenny reported, with cdrecord version 2.01+01a03-5ubuntu1 and kernel 2.6.17-5-amd64-k8.

Changed in cdrtools:
status: Unconfirmed → Confirmed
Revision history for this message
Kenny Duffus (kduffus) wrote :

this seems like something was changed in the kernel but i can't see anything in the ubuntu changelog, feel free to bounce back to cdrtools

Revision history for this message
Ben Collins (ben-collins) wrote :

The message I see last says that it didn't have perms. Is this because cdrecord is not running as root?

Changed in linux-source-2.6.17:
status: Confirmed → Needs Info
Revision history for this message
Kenny Duffus (kduffus) wrote :

yes, previously the user being a member of the cdrom group, which had write perms on the device, was enough to be able to burn cds

Revision history for this message
Luka Renko (lure) wrote :

Could SCSI command filtering be the root cause:
http://lwn.net/Articles/193516/

Revision history for this message
none (ubuntu-bugs-nullinfinity-deactivatedaccount) wrote :

I think the line "Error: Cannot gain SYS_RAWIO capability.Is cdrecord installed SUID root?" may be significant here. I tried making cdrecord SUID root, but that didn't help. Running cdrecord as root worked.

This is what the kernel says about my drive, btw:

hdc: DV-W28EW, ATAPI CD/DVD-ROM drive
hdc: ATAPI 24X DVD-ROM DVD-R CD-R/RW drive, 2193kB Cache, DMA

I previously had trouble with software eject on this drive, so it seems to be picky about which commands it accepts.

Revision history for this message
Kenny Duffus (kduffus) wrote :

yes it is already known that if you make cdrecord suid root that it will work, however suid root is bad and you didn't need to do this until recently

Revision history for this message
Kenny Duffus (kduffus) wrote :

fixed in cdrtools (4:2.01+01a03-5ubuntu2):

   * Add debian/patches/41_revert_sg_io_eperm_failure.dpatch:
     - Between 2.01+01a01 and 2.01+01a03, upstream changed the behaviour of
       SG_IO ioctl()s failing with EPERM; earlier releases ignored it, while
       the current one aborts the program. While in principle, EPERM checking
       is a good thing, it breaks burning for non-root users, so revert this
       test for now.
     - See also http://bugs.debian.org/374685.

Changed in linux-source-2.6.17:
importance: Untriaged → High
status: Needs Info → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.