Dealing with flaky optical drives on Linux.

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
linguofreak
Member
Member
Posts: 510
Joined: Wed Mar 09, 2011 3:55 am

Dealing with flaky optical drives on Linux.

Post by linguofreak »

I've got a DVD (or DVD drive, or both, I'm not sure which) that's a bit flaky, and it will sometimes take ejecting and reinserting the disk half a dozen times before it's presence is even detected. I've gotten tired of this and am looking for some way to automate the process, but after much Googling and man-ing and apropos-ing haven't had much success.

If my machine were a desktop with a fully motorized CD tray, it appears that putting:

Code: Select all

eject && eject -t
in a while loop in a shell script would do the trick, but unfortunately my CD drive can't retract the tray on its own.

Is there anything, short of physically opening and closing the drive, that will force the system to check for the presence of a disk again? My first instinct was to try mount, but that just returns "mount: no medium found on /dev/sr0". Somebody on another forum suggested

Code: Select all

blockdev -rereadpt
but that also returns "no medium found". They also suggested removing and reinserting the kernel module, but I have optical drive support compiled in directly, so I haven't tried that yet.

Can it be done with existing utilities, or will I have to whip something up in C?
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Dealing with flaky optical drives on Linux.

Post by Brendan »

Hi,
linguofreak wrote:Can it be done with existing utilities, or will I have to whip something up in C?
You can fix it with a screwdriver and less than $50 of cash. That's the quickest, easiest and most effective option.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Dealing with flaky optical drives on Linux.

Post by bluemoon »

linguofreak wrote:Can it be done with existing utilities, or will I have to whip something up in C?
There may be dust on the tray sensor, or the drive circuit is simply faults.
But any reason to mess with hacks solution but not just buy a replacement drive?
Oh wait, do you really need to fix something you may never use?
(I never needed that drive, and unplugged it to save power, most OS can be installed even with usb stick/disk, the only use case would be to hold my coffee mug :mrgreen: )
linguofreak
Member
Member
Posts: 510
Joined: Wed Mar 09, 2011 3:55 am

Re: Dealing with flaky optical drives on Linux.

Post by linguofreak »

bluemoon wrote:
linguofreak wrote:Can it be done with existing utilities, or will I have to whip something up in C?
There may be dust on the tray sensor, or the drive circuit is simply faults.
But any reason to mess with hacks solution but not just buy a replacement drive?
Oh wait, do you really need to fix something you may never use?
(I never needed that drive, and unplugged it to save power, most OS can be installed even with usb stick/disk, the only use case would be to hold my coffee mug :mrgreen: )
I said "flaky drives" in the subject line, but as I mentioned in the OP it may very well be a flaky disk, and it's one that I use fairly often. (Believe it or not, there are actually a few proprietary games for Linux that require a CD to run). I suppose the sensible thing to do would be to buy a case of DVD blanks and make a copy of the disk.
Post Reply