Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to stop CDRom lockups
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Thu Jan 23, 2003 11:32 pm    Post subject: How to stop CDRom lockups Reply with quote

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
View user's profile Send private message
compu-tom
Guru
Guru


Joined: 09 Jan 2003
Posts: 415
Location: Berlin, Germany

PostPosted: Fri Jan 24, 2003 4:47 pm    Post subject: Reply with quote

Have you used
Code:
lsof
to 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
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Mon Jan 27, 2003 3:28 am    Post subject: Reply with quote

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
View user's profile Send private message
compu-tom
Guru
Guru


Joined: 09 Jan 2003
Posts: 415
Location: Berlin, Germany

PostPosted: Mon Jan 27, 2003 8:32 am    Post subject: Reply with quote

If lsof shows "/mnt/cdrom" are you sure you aren't in this dir? "cd" out first.
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Tue Jan 28, 2003 12:23 am    Post subject: Reply with quote

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
View user's profile Send private message
Matje
l33t
l33t


Joined: 29 Oct 2002
Posts: 619
Location: Hasselt, Belgium

PostPosted: Tue Jan 28, 2003 12:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum