iMac 20inch early 2008 ssd harddrive replacement (ssd硬碟更換)
參考:
http://forums.macrumors.com/threads/spotlight-not-indexing-ssd-content-os-x-yosemite.1811080/
http://c9s.blogspot.tw/2014/04/mac-os-x-ssd-macbook-air-macbook-pro.html
(換後要記得做:reset pram、重作spotlight indexing、啟動trim、noatime設置、休眠設置、time machine重做、ramdisk設置)
關閉 Mac。
在鍵盤上找到下列按鍵:Command(⌘)、Option、P 和 R。
開啟 Mac。
在聽到開機啟動音效之後,立刻按住 Command-Option-P-R 組合鍵。
按住這些鍵,直到電腦重新啟動且再次聽到開機啟動音效。
放開這些鍵。
重置 NVRAM 後,可能必須重新設定揚聲器音量、螢幕解析度、選擇的啟動磁碟和時區資訊。
如果桌上型 Mac(如 iMac、Mac mini 或 Mac Pro)仍然有與這些功能有關的問題,則可能需要更換主機板電池。桌上型 Mac 電腦被拔掉電源線時,其主機板電池可協助保存 NVRAM 設定。您可以把 Mac 交給 Apple Store 或 Apple 授權維修中心,更換主機板電池。
休眠設置:
sudo pmset -a hibernatemode 0
輸入 「sudo rm /var/vm/sleepimage」 指令刪除休眠映像檔,就完成了。
noatime設置:
在桌面建立一個名為"com.SSD.noatime.plist"的文件,用文字編輯器打開,貼上:
<?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.SSD.noatime</string>
<key>ProgramArguments</key>
<array>
<string>mount</string>
<string>-vuwo</string>
<string>noatime</string>
<string>/</string>
</array>
<key>RunAtLoad</key>
<true />
</dict> </plist>
存檔。打開終端機:
sudo mv ~/Desktop/com.SSD.noatime.plist /Library/LaunchDaemons/
sudo chown root:wheel /Library/LaunchDaemons/com.SSD.noatime.plist
接著重新開機,讓系統加載這個文件。
再次打開終端機: (輸入)
mount (Enter)
重作spotlight indexing
sudo mdutil -E /
time machine設置:
sudo tmutil disablelocal
重做一次time machine設置(刪除外接碟,再重納入time machine的備份碟,再重新備份)
開啟 trim:
在終端機中輸入『sudo trimforce enable』, 按下兩次 y ,重開機
http://www.macuknow.com/node/72908
刪除重覆的開啟程式:
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"
do shell script "
if ! test -e /Volumes/RamDisk ; then
diskutil erasevolume HFS+ RamDisk `hdiutil attach -nomount ram://$((1*512*1024*2))`
#上面一行指的是劃出512MB的ramdisk。
#mkdir -p /Volumes/RamDisk/Windows/Chrome
# Chrome Cache
mkdir -p /Volumes/RamDisk/Chrome/Default
rm -rvf ~/Library/Caches/Google/Chrome/*
ln -v -s /Volumes/RamDisk/Chrome/Default ~/Library/Caches/Google/Chrome
# Safari Cache
mkdir -pv /Volumes/RamDisk/Apple/com.apple.Safari
rm -rvf ~/Library/Caches/com.apple.Safari
ln -v -s /Volumes/RamDisk/Apple/com.apple.Safari ~/Library/Caches
# iTunes Cache
mkdir -pv /Volumes/RamDisk/Apple/iTunes
rm -rvf ~/Library/Caches/com.apple.iTunes
ln -v -s /Volumes/RamDisk/Apple/iTunes ~/Library/Caches/com.apple.iTunes
# Spotify Cache
mkdir -pv /Volumes/RamDisk/Spotify
rm -rvf ~/Library/Caches/com.spotify.client
ln -v -s /Volumes/RamDisk/Spotify ~/Library/Caches/com.spotify.client
fi
"
http://blog.roodo.com/jason1204/archives/25366852.html
開啟應用程式->工具程式->AppleScript編寫程式
貼上上面的程式碼,記得儲存為"應用程式"。(不然會無法直接執行)
製作完將它放在"應用程式"裡,再來是讓它隨開機啟動。