Difference between revisions of "ejecting reluctant CDs in Linux"
Jump to navigation
Jump to search
(→Overview: note on where to find lsof) |
(→Overview: more tips) |
||
Line 8: | Line 8: | ||
{{linuxcmd|umount}} -f <u>/dev/name</u> | {{linuxcmd|umount}} -f <u>/dev/name</u> | ||
− | * {{linuxcmd|lsof}} (might be in /usr/sbin) lists processes which have files open on the device, so you can {{linuxcmd|kill}} them: | + | * {{linuxcmd|lsof}} (might be in [[/usr/sbin]]) lists processes which have files open on the device, so you can {{linuxcmd|kill}} them: |
{{linuxcmd|lsof}} <u>/dev/name</u> | {{linuxcmd|lsof}} <u>/dev/name</u> | ||
Line 16: | Line 16: | ||
* And finally, if the drive seems completely unmounted but the door still won't open, try: | * And finally, if the drive seems completely unmounted but the door still won't open, try: | ||
{{linuxcmd|eject}} <u>/dev/name</u> | {{linuxcmd|eject}} <u>/dev/name</u> | ||
+ | ==More Tips== | ||
+ | If the door won't open but {{linuxcmd|eject}} says it can't open the device, try ''attempting'' to {{linuxcmd|mount}} the drive, then try manually ejecting again. |
Latest revision as of 16:58, 14 July 2006
computing: software: Linux: ejecting reluctant CDs in Linux
Overview
Linux tends to lock CD and DVD drives, which prevents the drive from ejecting their media even if you press the drive's "eject" button.
Some useful commands for this situation – execute these as root or using sudo, where /dev/name is the name of the device name (this can be found using KDiskFree, but there are probably better ways):
- This command forces the device to umount, even if busy (but it may not work even so):
umount -f /dev/name
- lsof (might be in /usr/sbin) lists processes which have files open on the device, so you can kill them:
lsof /dev/name
- This command kills processes that don't want to die (where pid is the process ID number):
kill -9 pid
- And finally, if the drive seems completely unmounted but the door still won't open, try:
eject /dev/name
More Tips
If the door won't open but eject says it can't open the device, try attempting to mount the drive, then try manually ejecting again.