(linux_command_line)-> (Parent)->other hdparm options, Force eject
submited by Russell Tue 31 Jan 06
Edited Thu 09 Mar 06
From time to time I have a CD drive that is locked up, such that I can not mount it and I can not eject it.
It seemed that the only solution is to reboot the computer, and as a linux user I *HATE* rebooting, I mean why should I have to reboot for something so minor.
eject: unable to eject, last error: Invalid argument
The Work around for this issue I found is to use hdparm
hdparm -w /dev/hdd
Where /dev/hdd is the device name of the cdrom drive. After this eject should work, ( usualy the eject button on the drive works for me after this)
From the hdparm manpage
-w Perform a device reset (DANGEROUS). Do NOT use this option. It exists for unlikely situations where a reboot might otherwise be required to get a confused drive back into a useable state.
Sometimes I have done this and not had any problems. Other times I was unable to mount anything on the drive until after the next reboot.
This should also answer:
How to linux manualy unlock cdrom drive:
bash: hdparm: command not found fedora4 (Russell)
Add comment or question...: