Ejecting optical media

Sometimes the “Eject Button” to eject optical media like cd or dvd doesn’t work.

This can happen due to a bad media inserted or else.

How to get the damn thing out without opening the case? In the ol’ days – where cds and such used to rest on a mechanical slider – there was a small hole to insert a <bueroklammer>. That would open the tray. This doesn’t apply to iMacs or Macbooks:

  1. Reboot the mac.  When you hear the bootup chime press the moue button and keep it pressed until the cd / dvd is ejected.

You dont’t always want to do that – try solution #2

  1. Use command line: a) identifiy your optical drive, b) tell os x to eject the media

a) identifying the optical drive

volkers-imac:shopper mupfel$ sudo diskutil list
 0: GUID_partition_scheme *1.0 TB disk0
 1: EFI EFI 209.7 MB disk0s1
 2: Apple_HFS Macintosh HD 999.3 GB disk0s2
 3: Apple_Boot Recovery HD 650.0 MB disk0s3
 0: Apple_partition_scheme *4.1 GB disk1
 1: Apple_partition_map 127.0 KB disk1s1
 2: Apple_MDFW 98.6 MB disk1s2
 3: Apple_HFS MupfelPod 3.9 GB disk1s3
 0: Apple_partition_scheme *4.4 GB disk2
 1: Apple_partition_map 32.3 KB disk2s1
 2: Apple_HFS Hueter des Lichts 4.4 GB disk2s2
 0: Apple_partition_scheme *2.0 TB disk4
 1: Apple_partition_map 32.3 KB disk4s1
 2: Apple_HFSX Time Machine-Backups 2.0 TB disk4s2
volkers-imac:shopper mupfel$ sudo diskutil eject /dev/disk2
Disk /dev/disk2s2 ejected
volkers-imac:shopper mupfel$

In my case disk2 represents the optical drive. With your hardware and setup the result may be different.

A subsequent call of “sudo diskutil eject /dev/disk2” shall kick the disk out.

Remember you need the admin password because of the sudo call.

If this doesn’t work for you try the first approach with rebooting your machine

About javavolker71

when i do not write posts on this blog, don't work on or try to break my code i'm spending a reasonable amount of time
This entry was posted in OS X, shell and tagged , , , , , , . Bookmark the permalink.

1 Response to Ejecting optical media

  1. Ansas says:

    welcome to tomorrow 😉 – why use containers with limited size in times of the big dumpster….
    nearly as good as : http://metzmichael.de/wp-content/uploads/tape.jpg


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s