Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ejecting cd rom

Posted on 2004-10-29
11
Medium Priority
?
601 Views
Last Modified: 2010-04-20
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?
0
Comment
Question by:sree01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 2

Expert Comment

by:mmartha
ID: 12444726
try typing "eject"
0
 
LVL 2

Expert Comment

by:mmartha
ID: 12444727
at the console, that is.
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 12444757
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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 2

Expert Comment

by:mmartha
ID: 12444769
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
 
LVL 38

Accepted Solution

by:
wesly_chen earned 375 total points
ID: 12445201
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
 
LVL 2

Expert Comment

by:Matt_Avery
ID: 12445206
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
 
LVL 2

Expert Comment

by:w00pie
ID: 12445981
umount /dev/cdrom
or type mount and see if there is a cd mounted
after its unmounted you can press button
0
 
LVL 10

Expert Comment

by:Luxana
ID: 12449098
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
 
LVL 2

Expert Comment

by:hoonexpert
ID: 12451001
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
 
LVL 5

Expert Comment

by:pbhj
ID: 12451037
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
 
LVL 8

Expert Comment

by:pjcrooks2000
ID: 12454429
Make sure your logged in as root and do

umount /mnt/cdrom


Hope this helps

pjcrooks2000
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question