Windows 8 on old MacBook
Boot Camp Assistant
Windows 8 on MacBook (13-inch, Aluminum, Late 2008, MacBook5,1)
I made a script that hack Boot Camp Assistant to make it work.
This will create an option to make Bootable USB to install Windows 8.
Edited: 2015-06-24
PS: Guide is finally finished, maybe xD.
The Script
BACKUP_DIR="." # Where the backup of "Boot Camp Assistant" exist
UTILITIES_DIR="/Applications/Utilities"
TEMP_DIR="/tmp"
PLIST="Info.plist"
APP="Boot Camp Assistant.app" # (editable) The name of "Boot Camp Assistant"
APP_CONTENTS="$APP/Contents"
APP_PLIST="$APP_CONTENTS/$PLIST"
ModelIdentifierMajor="MacBook5" # (editable) Model Name with a version major number and without minor number (not: 5,1; but: 5)
ModelIdentifier="MacBook5,1" # (editable) Model Identifier
BootROMVersion="MB51.007D.B03" # (editable) Boot ROM Version
echo "$APP_PLIST"
# cp "Boot Camp Assistant" to temporary dir
if [ -d "$TEMP_DIR/$APP" ]
then
rm -rf "$TEMP_DIR/$APP"
fi
cp -R "$BACKUP_DIR/$APP" "$TEMP_DIR"
# read out the plist
defaults read "$TEMP_DIR/$APP_PLIST"
# edits
# (OPTION 1)
# defaults write "$TEMP_DIR/$APP_PLIST" DARequiredROMVersions -array-add "$BootROMVersion"
# defaults write "$TEMP_DIR/$APP_PLIST" PreESDRequiredModels -array-add $ModelIdentifierMajor
# defaults write "$TEMP_DIR/$APP_PLIST" PreUEFIModels -array-add $ModelIdentifierMajor
# defaults write "$TEMP_DIR/$APP_PLIST" PreUSBBootSupportedModels -array-add "$ModelIdentifier"
# defaults write "$TEMP_DIR/$APP_PLIST" Win7OnlyModels -array-add "$ModelIdentifier"
# defaults rename "$TEMP_DIR/$APP_PLIST" PreUSBBootSupportedModels USBBootSupportedModels
# (OPTION 2)
defaults write "$TEMP_DIR/$APP_PLIST" DARequiredROMVersions -array-add "$BootROMVersion"
defaults write "$TEMP_DIR/$APP_PLIST" PreESDRequiredModels -array-add $ModelIdentifierMajor
defaults write "$TEMP_DIR/$APP_PLIST" PreUEFIModels -array-add $ModelIdentifierMajor
defaults write "$TEMP_DIR/$APP_PLIST" PreUSBBootSupportedModels -array "$ModelIdentifier" "MacBookAir3,2" "MacBookPro8,3" "MacPro5,1" "Macmini4,1" "iMac12,2"
defaults rename "$TEMP_DIR/$APP_PLIST" PreUSBBootSupportedModels USBBootSupportedModels
defaults delete "$TEMP_DIR/$APP_PLIST" Win7OnlyModels
### END OPTIONS
# sudo codesign
# XCode must be installed and opened new document
# before and already filled with your credentials.
# This make patched app to be yours and don't get
# any errors when opening it.
sudo codesign -fs - "$TEMP_DIR/$APP"
# Kill Boot Camp Assistant if it's running before replacing the modified
ps aux | grep Boot\ Camp | grep -v grep | awk '{print $2}' | xargs kill -9
# replace "Boot Camp Assistemp" from Utilities folder
sudo rm -rf "$UTILITIES_DIR/$APP"
sudo mv "$TEMP_DIR/$APP" "$UTILITIES_DIR"
# read out the "Boot Camp Assistant" plist from Utilities folder
sudo defaults read "$UTILITIES_DIR/$APP_PLIST"
sudo open "$UTILITIES_DIR/$APP"
Filename:
patch_boot_camp_assistant.sh
The Guide
XCode Exist?
Make sure you already installed XCode and open any new document from within and run/debug once, so you have to fill any info(Credentials) to make codesign
-ing work after a file being edited.
This
codesign
makes sure your app can be opened without errors
Install XCode from App Store
Make backup from the original file
Copy your original Boot Camp Assistant.app
in your backup directory for save keeping. For Example:
~\MYBACKUP\Boot Camp Assistant.app
If you haven't messed up the original file yet, run to create a backup directory and copy the file:
mkdir -p ~\MYBACKUP; cp "/Applications/Utilities/Boot Camp Assistant.app" ~\MYBACKUP\
What type of hardware are you running?
To check what hardware you're running we need some values.
Head to System Report
and look for:
Model Identifier
and Boot ROM Version
On menu bar: Apple Logo / About This Mac / Overview / System Report / Hardwares
I found mine to be:
Model Identifier: MacBook5,1
Boot ROM Version: MB51.007D.B03
So these variables would be that, shown below:
ModelIdentifierMajor="MacBook5" # (editable) Model Name with a version major number and without minor number (not: 5,1; but: 5)
ModelIdentifier="MacBook5,1" # (editable) Model Identifier
BootROMVersion="MB51.007D.B03" # (editable) Boot ROM Version
Read the comments and change when applicable
Create script with variables you’d found
Get the full script from above, change some variables and save it in your backup directory, like:
~/MYBACKUP/patch_boot_camp_assistant.sh
Let’s give executable permission:
chmod +x ~/MYBACKUP/patch_boot_camp_assistant.sh
So at this point you have 2 files, the script and the app in the backup directory
Let's run the magic script
cd ~/MYBACKUP
. patch_boot_camp_assistant.sh
When you run this script ‘Boot Camp Assistant’ will open up.
Hopefully you'll get an option to make Bootable USB Stick to install Windows 8.
It's possible to switch options by
set
/unset
some comments below(OPTIONS 1 & 2)
Troubleshoot
Try to switch some group of comments by uncomment #
before the lines.
Beer me!
Thank you!