LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   CDRom Won't eject! (https://www.linuxquestions.org/questions/linux-hardware-18/cdrom-wont-eject-376932/)

SentralOrigin 10-25-2005 10:02 PM

CDRom Won't eject!
 
I keep getting this error when I try to eject or unmount:

umount: /cdrom: device is busy
umount: /cdrom: device is busy
eject: unmount of `/dev/hdc' failed

nilleso 10-25-2005 10:10 PM

cd / first
or try umount -l

SentralOrigin 10-25-2005 10:11 PM

cd / didn't work

umount -l gives me these...

Usage: umount [-hV]
umount -a [-f] [-r] [-n] [-v] [-t vfstypes] [-O opts]
umount [-f] [-r] [-n] [-v] special | node...

bb002 10-25-2005 11:01 PM

i think nilleso meant mount -l and not umount -l

but that will merely mount all of the mounted partitions.

nilleso 10-26-2005 01:55 PM

no I did mean umount -l which is...

-l Lazy unmount. Detach the filesystem from the filesystem hierar-
chy now, and cleanup all references to the filesystem as soon as
it is not busy anymore. (Requires kernel 2.4.11 or later.)
Code:

(u)mount version-2.12r
works great for problematic USB mass-storage. Not sure about this one though

Spankin Partier 10-30-2005 03:11 PM

I've been experiancing simular problems but I know what's causing it. I've still got a program accessing the CDROM for some reason. SentralOrigin, to find out which application is interfering with the ejection, type this command:

fuser -v /dev/cdrom

When I do it, this is what I get:

Code:

l# fuser -v /dev/cdrom

                    USER        PID ACCESS COMMAND
/dev/cdrom          mikevl    5852 f....  kdeinit

Which means that kdeinit is interfering with the CDROM. Now I don't know how to properly fix this. So in the mean time, I've been killing the offending application just prior to ejecting:

kill 5852

The number will change each time, hence you have to use the fuser command to determine the proper ProccessID (PID) before using the kill command.

But this is not a pretty way of doing things. Is there a fix to this? :confused:

PS: This is only on my Debian box.

carspidey 03-24-2006 12:13 AM

the same problem i had and now i type umount -l and it does unmount it, however, i can not get my cdrom ejected...any suggestions?????

AwesomeMachine 03-24-2006 12:42 AM

Here's the thing:

mount /dev/hdd /media/drive
cd /media/drive
now you are in the filesystem you mounted. That means the file system is busy. If you:
cd /
then you will be in the root, and out of the mounted file system in /media. So, do that, and then issue umount /dev/hdd.
And use the same terminal window. You can't do:
cd /
in a different terminal window. It has to be the same one you cd'ed into the file system with. Ok, now after you get OUT of the file system you want to umount:
umount /dev/hdd
and it won't be busy anymore. Even if you have a file manager, like Konquerer, showing that file system, it will not umount.

I just had this problem today. I had so many terminals open I forgot what was going on. I wanted to umount a loopback device and one of my terminals was still in it. I was sure I was out of it, but low and behold, I looked at every terminal window and I was still inside it.

carspidey 03-30-2006 11:35 PM

but the problem i am having is not unmounting... is ejecting....????
Any suggestions with this????


All times are GMT -5. The time now is 10:24 PM.