Skip to content

Instantly share code, notes, and snippets.

@fcicq
Last active February 7, 2019 07:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fcicq/3438740 to your computer and use it in GitHub Desktop.
Save fcicq/3438740 to your computer and use it in GitHub Desktop.
Trim Enabler for Mountain Lion 10.8.1 (via http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# for revert instructions please see http://digitaldj.net/2011/07/21/trim-enabler-for-lion/
# \x51 is changed to \x4d in the script
sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original
# this is for 10.8.1-10.8.2(?)
# sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x4d)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
# this is for 10.8.3
sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x54)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
sudo touch /System/Library/Extensions/
@euler0
Copy link

euler0 commented Nov 5, 2012

Thank you, it works perfectly!

@counterpoke
Copy link

Yeah, thanks! This enabled Trim support for me in 10.8.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment