Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Sometimes when I try to burn an ISO image, the message that "/dev/sr0" cannot be open exclusively appears. lsof does not shows any program that opens "/dev/sr0" (I checked for aliases too).

share|improve this question
1  
What is the exact error message? Please copy-paste (in an English locale, i.e. LC_MESSAGES=C burning_command /dev/sr0). –  Gilles Feb 25 '11 at 22:30
1  
(I use en_GB locale anyway). I'll post it as soon as I reproduce it. –  Maciej Piechotka Feb 25 '11 at 22:32
    
@MaciejPiechotka: Did you ever figure out what this error was about? –  Caleb Jul 27 '11 at 21:34
    
@Caleb: No, I didn't. –  Maciej Piechotka Jul 28 '11 at 17:09

3 Answers 3

fuser -a /media/cdrom

Usually that tells you which process is accessing or locking the resource.

share|improve this answer
1  
cdrom is not mounted. It is blank CD. –  Maciej Piechotka Feb 25 '11 at 14:58

You may be using a bad fork of the CD writing software. It seems that Debian forked the cdrecord tools five years ago, and one fork does not work well, including emitting errors about exclusive locks on the CD device.

Get a copy of the real software by going to http://cdrecord.berlios.de/

Also (even though you may not be using ubuntu) the following may be informative: https://bugs.launchpad.net/ubuntu/+source/cdrkit/+bug/149076

share|improve this answer
    
Even if cdrkit is unrelated to your problem, I would replace it with the proper official cdrtools. cdrkit is buggy and very outdated, all its programs included. I want an updated mkisofs, even on my cdromless netbook. There is a really good ppa located launchpad.net/~brandonsnider/+archive/cdrtools I actually was able to use those packages in Debian, with no problems. –  TechZilla Nov 26 '11 at 8:39

Also, lsof can be a great help in determining who's using a filesystem.

sudo lsof | grep /media/cdrom

share|improve this answer
    
The second sentence of the question says he already tried lsof –  Michael Mrozek Mar 30 '11 at 16:12
    
Sorry, I was not clear, he said he tried checking lsof against the device name of the cdrom, I was suggesting checking lsof against a mount point where the cdrom might be mounted, however, I did fail to realize it was a blank CD. –  penguin359 Mar 30 '11 at 16:26
1  
In previous question I commented also that cdrom is not mounted... –  Maciej Piechotka Mar 31 '11 at 5:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.