shadyabhi@shadyabhi-desktop:~$ eject -v
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/media/cdrom'
eject: `/media/cdrom' is a link to `/media/cdrom0'
eject: `/media/cdrom0' is not mounted
eject: `/media/cdrom0' is not a mount point
eject: tried to use `/media/cdrom0' as device name but it is no block device
eject: unable to find or open device for: `cdrom'
shadyabhi@shadyabhi-desktop:~$

The tray doesnt open.. How do I open tray using command line?

I am using Ubuntu 9.10 64bit and I have no dvd inserted in the DVDROM...

link|improve this question

Please post details about the DVD-ROM drive in this computer. – Broam Apr 5 '10 at 20:45
feedback

3 Answers

up vote 2 down vote accepted

eject /dev/cdrom
eject /dev/cdrw
eject /dev/dvd
eject /dev/dvdrom
eject /dev/dvdrw

depending on your device and how it is set up one of those commands should work

you can also specify the raw device:

eject /dev/sda
eject /dev/hdd

link|improve this answer
eject: unable to find or open device for: ******.. For all of them, same errors... And I want to make a point that I dont have any DVD loaded in the DVDROM. – shadyabhi Mar 28 '10 at 10:21
Do you know to wich device node your drive is bound? – lajuette Mar 28 '10 at 10:26
try this: ls -l /dev | grep '\->' if your dvd device is properly recognized by your system it will be on that list. On my system I get, along with some junk: 'dvd -> hda' and 'cdrw -> hda', eject /dev/dvd, eject /dev/hda, and eject /dev/cdrom all work – Justin Smith Mar 28 '10 at 17:01
the absence of a dvd in the drive will not affect any of these commands at all – Justin Smith Mar 28 '10 at 17:02
cdrom2 -> sr0, cdrw2 -> sr0, core -> /proc/kcore, dvd2 -> sr0, dvdrw2 -> sr0... is the output.. I now did "eject /dev/dvd2"... And now it works.. Thanx.. – shadyabhi Mar 30 '10 at 20:48
show 1 more comment
feedback

Try $ eject -t

link|improve this answer
not working.. same error... – shadyabhi Mar 27 '10 at 22:34
feedback

Try eject -T.

Edit:

You may need to name the device or mount point. It may be something other than the ones that it automatically tried. Look at the output of mount to see which ones might be it.

link|improve this answer
not working. same error – shadyabhi Mar 27 '10 at 22:35
Actually, I have no DVD inserted, so there isnt anything mounted.. So, what can I do now? – shadyabhi Mar 28 '10 at 10:20
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.