ejecting cd rom

i have fedora linux installed in my system , when ever i try to unmount or eject  my cdrom error message comes that  "the device is busy" . it is not possible to  take it by pressing the button why? is it possible to take it out by killing the process ,if possible which process is associated with the cdrom?
sree01Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mmarthaCommented:
try typing "eject"
0
mmarthaCommented:
at the console, that is.
0
PsiCopCommented:
A device is busy when something is accessing it. Try making sure that you have closed all programs that are using the CD-ROM. Also, make sure any terminal/command-line sessions do nto have a path on the CD-ROM as their current working directory.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

mmarthaCommented:
am... sorry, I think you already tried that.

Check that the folder isn't in use too (like you're inside it when you are trying to do unmount or eject)
0
wesly_chenCommented:
Hi,

   run "fuser -k /mnt/cdrom" as root to kill whatever process access /mnt/cdrom
or use "lsof" to check which process access cdrom and kill that process. Then you should be able to eject cdrom.

Wesly
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Matt_AveryCommented:
This exact problem happens to me a lot. There are two common variations:

1. Pop a CDROM into the drive, GNOME / KDE destop mounts the CDROM automatically and brings up a navigator window showing the contents of the CDROM. Need to remember to close that window before ejecting the CDROM or it will refuse to eject (because the navigator window has the CDROM as it's working directory)

2. Insert a CDROM, mount it manually with a "mount" command, "cd" into the CDROM filesystem, do some stuff. Need to remember to "cd" *out* of the CDROM filesystem or it will refuse to eject (becuase my shell has the CDROM as it's working directory).

Less common variation is that some other user or process is using the CDROM. In that case, need to read up on the "fuser" command.
0
w00pieCommented:
umount /dev/cdrom
or type mount and see if there is a cd mounted
after its unmounted you can press button
0
LuxanaCommented:
that is just because some of your processes are still using your cdrom.

easy help, Lets say that you have mounted your cdrom to /mnt/cdrom and now you can't unmout it and device is always busy so you can use this commnad:

# fuser -mk /mnt/cdrom
then
#eject
or
# unmout /mnt/cdrom
This command will find all processes using you /mnt/cdrom and kill them.

but please do not use this commnad to you mounted partitions use it just in case that you can't unmont your cdrom otherwise it can cause damage to your system.

LUXANA
0
hoonexpertCommented:
Very simple in 2 steps

1. Change directory to anything else than cd #cd will take u to ur home directory
2. #eject

Done

Manish.
0
pbhjCommented:
I get this a lot, KDE seems to keep a device open even when you navigate away from it in the directory structure.

What I do is run something like

"lsof | grep cdrom"

This will list all open files which include the word cdrom, usually you'll get some KDE programs (kdeinit I think) - if you use KDE. Now, lsof lists the pid (process ID) of the processes accessing the file, just kill the process (eg "kill 1204") and you should then be able to "eject /dev/cdrom".

I'd not come across tha fuser util though, will check it out.

Sorry for the "me too" will read the thread more closely next time!!

pbhj
0
pjcrooks2000Commented:
Make sure your logged in as root and do

umount /mnt/cdrom


Hope this helps

pjcrooks2000
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.