I wanted to use Apple’s USB SuperDrive on my Dell XPS laptop that runs Debian Linux, but turns out that it is not just plug and play, so I had to search up a little trick to be able to use it.
I found this excellent post and because I am may need to do this again in the future, here is a brief summary how to get it done.
First, install SCSI Generic Driver as root:
root@m:~# apt-get install sg3-utils
Check that the drive appears when it is plugged in:
root@m:~# ls /dev/|grep sr
sr0
Add custom udev rule for the drive:
root@m:~# cd /etc/udev/rules.d/
root@m:/etc/udev/rules.d# echo "# Apple's USB SuperDrive" > 60-apple-superdrive.rules
root@m:/etc/udev/rules.d# echo 'ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw /dev/$kernel EA 00 00 00 00 00 01"' >> 60-apple-superdrive.rules
root@m:/etc/udev/rules.d# cat 60-apple-superdrive.rules
# Apple's USB SuperDrive
ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw /dev/$kernel EA 00 00 00 00 00 01"
For the new udev rule to take effect either run the following, or just reboot the box:
root@m:~# udevadm trigger
Quick hack without the udev rule to get the drive working is to run as root:
root@m:~# sg_raw /dev/sr0 EA 00 00 00 00 00 01
And that’s it.
Comments
comments powered by Disqus