• Contact Me
  • Archives
  • Categories
  • Posts Tagged ‘TRIM’

    Installing an SSD into a Macbook Pro


    2011 - 11.09

    Upgrading your Mac’s hard drive with an SSD can significantly increase your Mac’s performance.   Installing an SSD is the same process as any other hard drive.   The hard drive I choice is the OCZ 240 GB Vertex 2 Series SSD.

    Once you install the hard drive and have installed OS X you then have to enable TRIM support for the drive.  TRIM support allows the drive to maintain optimal performance over the life of the drive.  Officially, Apple only supports TRIM with Apple branded SSD’s.  We will need to run a couple of Terminal commands to enable TRIM support for the OCZ drive.

    Backup the files

    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

    Enable TRIM support

    sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})
    [^\x00]{9}(\x00{1,20}\x51)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg'
    /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

    Clear kernel cache

    sudo kextcache -system-prelinked-kernel
    sudo kextcache -system-caches

    Now restart your computer!