DIGIT-ARC read-only archive · snapshot: July 23, 2026

Ejecting CD/DvD drive

8 posts · originally from https://geek.digit.in/community/threads/ejecting-cd-dvd-drive.3629/

B
BONZI Original post #1
Dec 13, 2004 at 11:35 PM
My first problem was solved thankx to nixcraft. I have another problem. How can I make redhat eject the cd/dvd drive by pushing button?? At times it will be ridiculous to unmount it and then eject?? Can a tweak in fstab help to solve this problem. I tried it myself b4 but found no success :(

Another thing just forget that redhat has an option to create a link to device (by right clicking). How can I create a link to a device? By just linking to /mnt/cdrom there will be nooption to mount and unmount.
C
Dec 14, 2004 at 2:11 PM
right click the cdrom icon on the desktop and then click eject, that way it will unmount and eject the cd, about creating link to device, loggin as root, right click the folder eg: /mnt and then make link to the / (the same folder) cut that link and paste somewhere (maybe desktop)!
B
BONZI #3
Dec 14, 2004 at 4:38 PM
Unfortunately that wasnt the answer I needed. That could probably be my mistake of explaining the problem. What I want is to open the drive by pressing the button in the drive. Regarding the second problem (which is not very important): Leave it I will find by myself(hopefully) :)
N
Dec 18, 2004 at 2:17 PM
eject command may help you.

eject -t will close try!
C
Dec 18, 2004 at 2:52 PM
bonzi, the cd cannot be eject directly, because it should me unmounted first in order to eject it. :)
B
BONZI #6
Dec 19, 2004 at 12:16 AM
ejecting with commands are ok but I think you can do it otherwise. I think in one version of pcq(7.1) that was possible without any commands. I dont remember exactly because I wasnt a gr8 linux fan then.
N
Dec 19, 2004 at 11:08 AM
curvenger said:
bonzi, the cd cannot be eject directly, because it should me unmounted first in order to eject it. :)

:p eject does both try out yourself!
Why to type umount /mnt/cdrom;and press button or type eject after :!:
G
Guest #8
Dec 19, 2004 at 4:36 PM
In linux, the cdrom device is locked by default once it is mounted. So, to eject the cd just by using button on drive, you have to remove the lock. Use the following command :

echo "0" > /proc/sys/dev/cdrom/lock

This command will remove the lock. Now you can eject the cdrom even if it is mounted as long as the value in /proc/sys/dev/cdrom/lock is 0. But this is not the standard way of changing the cds.