cdrecord has no permission to open the device

Bug #510505 reported by david38840
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cdrtools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: k3b

I am trying to add an iso image to my multi session dvd disc, but I have the above problem. This is the bug report if anybody can please help me.

Devices
-----------------------
HL-DT-ST DVDRAM GE20NU10 EE06 (/dev/sr1, 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]
HL-DT-ST DVD-RAM GSA-H54N 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]

K3b::IsoImager
-----------------------
mkisofs print size result: 1010368 (2069233664 bytes)

System
-----------------------
K3b Version: 1.68.0
KDE Version: 4.3.2 (KDE 4.3.2)
QT Version: 4.5.2
Kernel: 2.6.31-14-generic

Used versions
-----------------------
mkisofs: 1.1.9
cdrecord: 1.1.9

cdrecord
-----------------------
/usr/bin/wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.scsidev: '/dev/sr1'
devname: '/dev/sr1'
scsibus: -2 target: -2 lun: -2
Error trying to open /dev/sr1 exclusively (Device or resource busy)... retrying in 1 second.
=== last message repeated 4 times. ===
Error trying to open /dev/sr1 exclusively (Device or resource busy)... giving up.
WARNING: /dev/sr1 seems to be mounted!
/usr/bin/wodim: Device or resource busy.
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.
TOC Type: 1 = CD-ROM
Waiting for data on stdin...

cdrecord command:
-----------------------
/usr/bin/wodim -v gracetime=2 dev=/dev/sr1 speed=16 -sao driveropts=burnfree -waiti -data -tsize=1010368s -

mkisofs
-----------------------
NO Rock Ridge present
Disabling Rock Ridge / XA / AA
Warning: Neither Rock Ridge (-R) nor TRANS.TBL (-T)
name translations were found on previous session.
ISO-9660 file names have been used instead.
1010368
I: -input-charset not specified, using utf-8 (detected in locale settings)
NO Rock Ridge present
Disabling Rock Ridge / XA / AA
Warning: Neither Rock Ridge (-R) nor TRANS.TBL (-T)
name translations were found on previous session.
ISO-9660 file names have been used instead.

mkisofs calculate size command:
-----------------------
/usr/bin/genisoimage -cdrecord-params 16,1213488 -prev-session /dev/sr1 -gui -graft-points -print-size -quiet -volid DVDVIDEO -volset -appid K3B THE CD KREATOR (C) 1998-2007 SEBASTIAN TRUEG -publisher -preparer -sysid LINUX -volset-size 1 -volset-seqno 1 -sort /tmp/kde-david/k3bz10951.tmp -no-cache-inodes -full-iso9660-filenames -iso-level 3 -path-list /tmp/kde-david/k3bm10951.tmp

mkisofs command:
-----------------------
/usr/bin/genisoimage -cdrecord-params 16,1213488 -prev-session /dev/sr1 -gui -graft-points -volid DVDVIDEO -volset -appid K3B THE CD KREATOR (C) 1998-2007 SEBASTIAN TRUEG -publisher -preparer -sysid LINUX -volset-size 1 -volset-seqno 1 -sort /tmp/kde-david/k3bw10951.tmp -no-cache-inodes -full-iso9660-filenames -iso-level 3 -path-list /tmp/kde-david/k3bD10951.tmp

Thanks if anyone can help.

affects: k3b (Ubuntu) → cdrtools (Ubuntu)
Revision history for this message
Schily (schilling-fokus) wrote :

This bug report is not against cdrecord but against a broken fork.

The specific problem mentioned in the bug report has never been
in cdrtools (the original software). The problem mentioned in the
bug report results from incorrectly interfacing to hald in the fork.

I recommend you to install recent original software to fix the problem:

ftp://ftp.berlios.de/pub/cdrecord/alpha/

http://cdrecord.berlios.de/

Make sure to install cdrecord/cdda2wav/readcd suid root, as features
from Linux that could help to avoid the need for suid root binraies
have been disabled in Ubuntu.

Revision history for this message
david38840 (dridleypto) wrote : Re: [Bug 510505] Re: cdrecord has no permission to open the device

Thanks for your reply, but unfortunately I am a newbie and don't really
understand the solution.
I have downloaded cdrtools, but its a beta.tar.gz file and I dont know
the command line instructions to install it.
Can I actually solution the problems with cdrtools? You mention I cannot.
its incorrect interfacing to hald in the fork? What does this mean and
how do you think I can solution.
Many thanks for your help and assistance.

Schily wrote:
> This bug report is not against cdrecord but against a broken fork.
>
> The specific problem mentioned in the bug report has never been
> in cdrtools (the original software). The problem mentioned in the
> bug report results from incorrectly interfacing to hald in the fork.
>
> I recommend you to install recent original software to fix the problem:
>
> ftp://ftp.berlios.de/pub/cdrecord/alpha/
>
> http://cdrecord.berlios.de/
>
> Make sure to install cdrecord/cdda2wav/readcd suid root, as features
> from Linux that could help to avoid the need for suid root binraies
> have been disabled in Ubuntu.
>
>

Revision history for this message
david38840 (dridleypto) wrote :

Sorry Jonathan, but I really don't understand your message?
Thanks
David

Jonathan Thomas wrote:
> ** Package changed: k3b (Ubuntu) => cdrtools (Ubuntu)
>
>

Revision history for this message
Vik (bclarky12) wrote :

hey David, the solution to your problem is to go to cdrecord's website and download the newest version of cdrecord. Lets say you download it to your Downloads folder. Unzip it, and in the terminal type (without quotes) "cd /home/david(you're user name I'm assuming)/Downloads/(the name of the cdr-tools folder, ex. cdrtools-2.01a)
then type "sudo make", hit enter, it'll ask for your password, type it and hit enter. Then type "sudo make install".
Now type these commands, enter after each line. This will move out of the way the useless wodim files previously on your computer, you can copy and paste these lines to your terminal.
sudo mkdir /opt/schily/replacedfiles
sudo mv /usr/bin/cdrecord /opt/schily/replacedfiles
sudo mv /usr/bin/genisoimage /opt/schily/replacedfiles
sudo mv /usr/bin/mkisofs /opt/schily/replacedfiles
sudo mv /usr/bin/readom /opt/schily/replacedfiles
sudo mv /usr/bin/wodim /opt/schily/replacedfiles
next you'll link your new files to where k3b will look, hit enter after each line, you can copy and paste
sudo ln -s /opt/schily/bin/cdrecord /usr/bin/cdrecord
sudo ln -s /opt/schily/bin/mkisofs /usr/bin/genisoimage
sudo ln -s /opt/schily/bin/mkisofs /usr/bin/mkisofs
sudo ln -s /opt/schily/bin/readcd /usr/bin/readom
sudo ln -s /opt/schily/bin/cdrecord /usr/bin/wodim
sudo ln -s /opt/schily/bin/readcd /usr/bin/readcd
sudo ln -s /opt/schily/bin/mkhybrid /usr/bin/mkhybrid
sudo ln -s /opt/schily/bin/cdda2wav /usr/bin/cdda2wav
now install k3b and write in RAW mode. You'll be able to write cds now. The whole reason you had this problem was because Ubuntu does not come with an original version of cdrecord, but an inferior modified version. Please Ubuntu, in 10.04 please please please use the full original version of cdrecord.

Revision history for this message
Vik (bclarky12) wrote :

ps. for Cd's if I were you I wouldn't use any faster than 8x raw. For DVD's you can should be able to use dao mode or automatic and i wouldn't go higher than 4 speed. What I outlined in the last post is just a work around, but it should help

Revision history for this message
Vik (bclarky12) wrote :

sorry, last correction, I just tried the new cdrtools beta released in febuary, i can now burn at all speeds in any mode. Hope it works for you if your still following this thread!

Revision history for this message
Philou (debrabantphilippe) wrote :

I've installed Ubuntu 9.10 for the second time one week ago and I've search some times why K3b displays this error message "Error trying to open /dev/sr1 exclusively (Device or resource busy)... retrying in 1 second" and can't start burning.

Thanks to Schily and Vik for their explanations. Now it works fine. But I don't understand why Ubuntu don't correct this mistake in the package !!! (Yes I've read http://cdrecord.berlios.de/private/linux-dist.html#packages). It's incredible.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cdrtools (Ubuntu):
status: New → Confirmed
Revision history for this message
Thomas Mayer (thomas303) wrote :

I've just seen this issue after upgrading from 16.04 to 18.04. Burning DVDs worked but burning CDs didn't.

I worked around it via https://askubuntu.com/questions/1032903/problem-with-k3b-in-18-04-releases-cdrecord-has-no-permission-to-open-the-devi/1034927 with a

sudo chmod 4711 /usr/bin/wodim; sudo chmod 4711 /usr/bin/cdrdao

That did the trick and now allows me to also burn CDs.

Revision history for this message
TFrog (stgparris) wrote :

I'll second Thomas Mayer's solution as to fixing CD burning in K3b and 18.04. Though I run KDE Neon User Edition (based on Ubuntu 18.04, I ran into this very same issue. I found the link that Mr. Mayer provided (without finding this bug report first) and it corrected the issue. To me this is a packaging problem and not a problem with wodim or cdrdao itself.

Revision history for this message
Schily (schilling-fokus) wrote :

Be careful: cdrdao is a security risk if installed suid root and wodim is full if Debian specific bugs (there is e.g. no support for BluRay and 50% of all DVD writes fail).

Also note that cdrdao and wodim et. al are unsupported and unmaintained since a really long time.

The original software is here http://sourceforge.net/projects/cdrtools/files/alpha/ and frequent snapshots are here: http://sourceforge.net/projects/schilytools/files/

The original software is under constant maintenance.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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