Mac開啓SSD的TRIM
在Mac OS X 10.9.5 (Mavericks) 上面想用terminal直接開啟非Apple原廠SSD的TRIM功能:
- 備份原來的driver
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-backup
- 修改driver的內容
sudo perl -pi -e 's|(^\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
- 更新系統的快取、讓系統用新的driver
- sudo kextcache -system-prelinked-kernel
- sudo kextcache -system-caches
- sudo touch /System/Library/Extensions/
- 重新開機後,用指令確認有沒有TRIM support
system_profiler SPSerialATADataType | grep 'TRIM'
參考文獻
_EOF_
沒有留言:
張貼留言