Mac 换上SSD硬盘
给Mac换上的SSD硬盘步骤
[前期准备]
- 支持SATA的移动硬盘盒
- 一套电子维修专用改锥
[第一步:安装克隆软件]
- 在mac上安装Carbon copy cloner软件(简称CCC,请支持正版)
[第二步:克隆磁盘]
- 将SSD装入移动硬盘,接到mac上
- 使用CCC将HDD的内容克隆到SSD,一切按提示操作,注意要创建恢复分区,否则SSD无法引导
- 等待30~60分钟
- 重启电脑,并按住option,选择从SSD启动,检查是否成功启动
[第三步:安装SSD]
- 将SSD装入mac,外面10颗螺丝,里面6颗螺丝,注意硬盘上有四颗内五角螺丝需要专用改锥
- 启动电脑,体验非一般的感觉吧
all: TRIM SMS noatime reboot
checkroot:
@echo -n checking privilege...
@touch / &>/dev/null || ( echo error!;exit 1; )
@echo ok!
SMS: checkroot
@echo -n disabling Sudden Motion Sensor...
@pmset -a sms 0 || ( echo error!;exit 1; )
@echo done!
TRIM: checkroot
@echo -n enabling TRIM...
@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.bak
@perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\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
- @kextcache -system-prelinked-kernel &>/dev/null
@kextcache -system-caches
@echo done
noatime: checkroot
@echo -n disabling atime...
@echo '<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.noatime.root</string> <key>ProgramArguments</key> <array> <string>mount</string> <string>-uwo</string> <string>noatime</string> <string>/</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>' > /Library/LaunchDaemons/com.noatime.root.plist || ( echo error!;exit 1; )
@echo done!
reboot: checkroot
@echo Finished !
@echo CAUTION: we are going to reboot, press Ctrl-C to abort and you can reboot manually later.;sleep 5;
@for i in `seq 10 1`; do clear; echo CAUTION: we are going to reboot in $$i seconds;sleep 1; done;
@reboot
执行方式为:sudo make -f ssd_opt.makefile
####执行优化包括:
- 打开TRIM
- 禁用atime
- 禁用磁盘保护
####注意:
- 打开TRIM时,会误报segment fault,忽略即可
- 由于系统版本原因,TRIM可能打开失败,如何检测成功与否,以及失败了怎么办,请参见:http://www.cnbeta.com/articles/219752.htm