View previous topic :: View next topic |
Author |
Message |
Reformist Guru
Joined: 06 Oct 2002 Posts: 323
|
Posted: Thu Jan 23, 2003 11:32 pm Post subject: How to stop CDRom lockups |
|
|
Just wondering if there is a way with linux to free one's CD rom drive after it has been taken over by the system. What I mean is, if a cdrom has an error, or whatever program is reading the cd rom crashes, or the disc is scratched, the programs etc. can be killed but the cd reader will contiually spin/blink forever until the system is restarted. The cdrom cannot be unmounted because "the device is busy". This is very frustrating and has resulted in about 15 restarts for me today, very unusual for my otherwise stable linux system.
I used to get around such errors in windows by pressing the button located on the cdrom drive marked "eject", the logical step, but that seems to have no effect in linux >=( _________________ -Phil Crosby |
|
Back to top |
|
|
compu-tom Guru
Joined: 09 Jan 2003 Posts: 415 Location: Berlin, Germany
|
Posted: Fri Jan 24, 2003 4:47 pm Post subject: |
|
|
Have you usedto see which program still uses your drive (see lsof(8))?
If you just closed/killed a GUI window it is likely still running. With Code: | kill <signal> <pid> | you can get rid of a programm (see kill(1)). |
|
Back to top |
|
|
Reformist Guru
Joined: 06 Oct 2002 Posts: 323
|
Posted: Mon Jan 27, 2003 3:28 am Post subject: |
|
|
I usually know exactly what is using the cdrom, and a kill command from user or root does nothing. I accidentally hit the eject button without unmounting the disk and after that, trying to umount it yields the dreaded device busy error message. The only thing using cdrom from lpoc is "/mnt/cdrom" by root. Umounting from root yields device busy. If I mess up in any area of scratched disks, or accidently touching the eject button (with my knee sometimes!) to free the cdrom drive I need a reboot. _________________ -Phil Crosby |
|
Back to top |
|
|
compu-tom Guru
Joined: 09 Jan 2003 Posts: 415 Location: Berlin, Germany
|
Posted: Mon Jan 27, 2003 8:32 am Post subject: |
|
|
If lsof shows "/mnt/cdrom" are you sure you aren't in this dir? "cd" out first. |
|
Back to top |
|
|
Reformist Guru
Joined: 06 Oct 2002 Posts: 323
|
Posted: Tue Jan 28, 2003 12:23 am Post subject: |
|
|
Hey hey
Your suggestion (above me) solved the eject cdrom problem. I had a terminal open and was in that dir doing random things. After switching out of the dir, I still could not unmount it, but closing the entire termianl solved the problem.
Such an occurance was not immediatley obvious, and I've been using linux for a little more than a year. Perhaps that behavior should be changed. _________________ -Phil Crosby |
|
Back to top |
|
|
Matje l33t
Joined: 29 Oct 2002 Posts: 619 Location: Hasselt, Belgium
|
Posted: Tue Jan 28, 2003 12:30 pm Post subject: |
|
|
It is normal behaviour if you ask me. You don't tear down a house when someone is in it either now do you do? At least... Normal people don't do that _________________ Life is like a box of chocolates... Before you know it, it's empty... |
|
Back to top |
|
|
|