
This will trigger the “superdriveEnabler” app with the device path as parameter (e.g /dev/sr0) each time a SuperDrive device is connected. # Initialise Apple SuperDriveĪCTION="add", ATTRS="05ac", DRIVERS="usb", RUN+="/home/pi/superdrive-enabler/superdriveEnabler /dev/$kernel" Sudo nano /etc/udev/rules.d/lesĪdd following rule definition. Please check out this very good guide for further instructions. Older Macs with built-in optical drives for reading and writing CDs or DVDs lack an external. Another option is to add a CD/DVD Eject menu to the Mac menu bar. You can use a Mac's Boot Manager utility to force it to eject a CD or DVD. Unlike other methods, it doesn't require a shutdown and a restart. Furthermore, it features an extensible rule set for easy customising. You can use the Terminal app to eject a disc. It runs as a deamon and receives events each time a device is initialised or removed. We’ll make us of the udev device manager. For now the last step is necessary each time the drive is unplugged, so let’s automate it! Custom udev rule Try to insert a disc, the drive should be awake now and start initialising the disc. Check the output of following command to get a list off all device paths: ls /devĪfter you’ve the SuperDrive identified, we’ll send the magic sequence to the device. Lookup the device, it should be sr0 or sr1 by default depending on how many USB disc drives are currently attached. Unlock with SCSI Generic (sg) driverįor communicating with the SCSI device directly we need the Linux SCSI Generic (sg) driver packages. In this post I’d like to unveil two of them. You have several options for making this work. I got this byte sequence from a source I no longer can find on the web. It’s required to send a “magic” byte sequence after the drive was connected.

How to outsmart Apple’s firmwareįortunately, with a little hack, we can awake the drive from its deep slumber. You do not need to be root.I’m really surprised and disappointed that Apple prevents us from using their USB SuperDrive with non Apple devices.

bash_aliases file) to pull the tray back in from the command line. Sysctl -w =0 # Ensure drive doesn't auto pull tray back in.įor completeness, you can add this alias to your. (This can be ignored if you remove/comment out all lines where rm -r "$" does not exist. your mount point is automatically created when you insert a disk into the drive.you setup a permanent mount point for your drive /dev/sr0 (same thing as /dev/cdrom, which is just symbolically linked to /dev/sr0).

I wrote a function that can be called by simply typing opentray on your command line. You can override this with eject -l /media/mountpoint or ( /mnt/mountpoint). Sometimes they don't want to eject, because they are mounted etc.
