LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ejecting cd's (https://www.linuxquestions.org/questions/linux-newbie-8/ejecting-cds-189175/)

priller 06-03-2004 04:45 AM

ejecting cd's
 
Sometimes when unmounting or ejecting cd's I get device busy errors, only normally happens when looking inside a tar.gz file.

Other than not looking inside these's files is there a way to stop this.

Chris H 06-03-2004 04:47 AM

Linux uses a mounting system whereby if an app is using a cd then you won't be allowed to eject, remove or unmount that device. Tis common sense really, at least when compared to other systems which allow you to remove cds even when they're being used.

Basically, if you can't eject a cd then it's cos something or some process is accessing it.

zeropash 06-03-2004 05:12 AM

you can use lsof to find who is accessing the /mnt/cdrom and then take the appropriate action (for ex if a shell is using the same then just change the directory, if nautilius is the only guy using it then click on the cdrom icon on the desktop and eject) etc

priller 06-03-2004 05:20 AM

Nothing is using the cdrom.

Its something todo with looking inside tar.gz files, even when konqerour is closed it still wont eject.

I've tried logging off and logiing back in.

Chris H 06-03-2004 06:26 AM

Could be that if you've got an app running then rebooting may only cause it to restart when you login again.

Try what Zeropash recommends. Else do a ps aux and see what processes you have running that could be causing the problem and then kill it/them.

zeropash 06-03-2004 10:07 AM

are your tar.gz files on the cdrom? and you have opened those in file-roller or some such application?

priller 06-04-2004 03:40 AM

Quote:

Originally posted by zeropash
are your tar.gz files on the cdrom? and you have opened those in file-roller or some such application?
tar.gz files are on the cdrom, opened them with konquerour.

zeropash 06-04-2004 06:13 AM

so your konquerer is accessing those files from the CD. unless it stops that you cannot unmount tbe CD and hence eject it.
make sure those tar.gz files are closed and then try to do a eject/umount
to see who is accessing the files do this.
/usr/sbin/lsof | grep cdrom
if there are any process listed either close them or if you have trouble close them.

name_in_use450 06-04-2004 08:47 AM

follow the guys instructions above as it is correct. i would just like to simplify a few things for the newbie. First thing you do after inserting a cdrom is 'mount' many distors like redhat, fedora, etc do this for you (automount). This mounts the disk as a file, so 'cd' to the location usually /mnt/cdrom or /cdrom. Copy info or whatever you were going to do....Then change out of the dir /mnt/cdrom or /cdrom so it is not in use typing just 'cd' is an easy way to do this. then you type 'eject' at a terminal. Note: some distros dont have 'eject' so 'umount /dev/cdrom' first and then press the eject button on the cdrom. Also some distros require you to have root access to mount/umount devices.

hope that clears things up.

priller 06-07-2004 04:33 AM

Quote:

Originally posted by name_in_use450
.. Also some distros require you to have root access to mount/umount devices.


I've already changed fstab to allow users to mount cdroms.


All times are GMT -5. The time now is 05:03 AM.