2

My laptop is a Thinkpad T400 and the OS is Ubuntu 12.04.

I find I have a problem where the CD-RW on my laptop sometimes doesn't read the CD, following some flashing light and sound, after I inserted the CD inside. I press the button to eject the CD, but there is no response. It happens especially when I have some external device using a USB port of the laptop. But sometimes it works as normal.

I wonder if there are some Linux commands to force the CD to be read and to be ejected?

What might be the problem? The OS, or the CD Reader?

Michael Mrozek
  • 91,316
  • 38
  • 238
  • 232
Tim
  • 98,580
  • 191
  • 570
  • 977
  • As a side note, you can lock/unlock the eject button feature using this: http://unix.stackexchange.com/questions/104791/how-can-i-disable-the-button-of-my-cd-dvd-drive. I constantly bump it on my T410. The tool ref'd in that post `cdctl` can also toggle the eject. – slm Jan 31 '14 at 20:22

2 Answers2

4

First of all you have to mount the device, using GUI or command mount.

# mount -t iso9660 -o ro /dev/cdrom /cdrom

or

# mkdir /mnt/cdrom
# mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom

eject is the command to eject the CD/DVD drive.

# eject
Oleksa
  • 141
  • 1
  • 3
    On some systems you have to specify the basename or full path to `eject` if `/dev/cdrom` is not the CD drive or a symlink to it. – Graeme Jan 31 '14 at 19:48
  • Thanks! The output to the first command is `mount: special device /dev/cdrom does not exist`, and the output to the second one is `eject: tried to use /mnt/cdrom as device name but it is no block device` and `eject: unable to find or open device for: cdrom` – Tim Jan 31 '14 at 20:25
  • Try to run the following: # cd /dev; ls cd* – Oleksa Jan 31 '14 at 21:39
2

On Ubuntu 12.04, for me this works:

eject /dev/sr0
Ramesh
  • 38,687
  • 43
  • 140
  • 215
  • Welcome to U & L SE. Can you please elaborate more on your answer? Also, the other answer has already discussed `eject` option. – Ramesh Sep 27 '14 at 14:48
  • 1
    I am running Ubuntu 12.04 on a Lenovo Z510 laptop. The command: "eject /dev/sr0" works. You do not need to mount. Using just "eject" does not work. – Helen Craigman Oct 07 '14 at 16:00