Acidanthera
proposed modified installers from 10.6.7 Images for MacBookPro8x
and iMAc12x
here, but they hang on ethernet
(most probably driver) on the cMP5,1.I have modified this script (originally created for a DVD installer creation) for a SL USB universal installer creation. The created installer from the link in the first post (please convert
.toast
to DMG as described here) works fine in cMP5,1 , but I have no way of testing it on other machines.All the script does is changing:
Code:
for ( var i = 0; i < machineCount; i++ ) {
if ( modelProp == hwbeSupportedMachines[i] ) {
return true;
}
}
With this:
Code:
for ( var i = 0; i < machineCount; i++ ) {
if ( 1 ) {
return true;
}
}
Code:
#!/bin/bash
clear
destination=~/Desktop/Mac\ OS\ X\ Install\ DVD
#make destination folder
[ ! -d "$destination" ] && mkdir "$destination"
#make sure disc is in drive
while [ ! -d /Volumes/Mac\ OS\ X\ Install\ DVD ] ; do
echo Please mount Mac OS X Install DVD image and press Enter
read
done
#get device node for block copy
device=$(diskutil info /Volumes/Mac\ OS\ X\ Install\ DVD/ | grep Node | cut -f2 -d:)
#create disk image from device (retains Finder window custom background)
echo "Creating Disc image at $destination, please wait..."
/usr/bin/hdiutil create -srcdevice $device -format UDRW "$destination"/Mac\ OS\ X\ Install\ DVD.dmg
#disk image using source folder (loses custom Finder background)
#/usr/bin/hdiutil create -srcfolder /Volumes/Mac\ OS\ X\ Install\ DVD/ -format UDRW "$destination"/Mac\ OS\ X\ Install\ DVD.dmg
#eject media
hdiutil eject /Volumes/Mac\ OS\ X\ Install\ DVD/
echo "Modifying Image"
#mount r/w image
hdiutil attach "$destination"/Mac\ OS\ X\ Install\ DVD.dmg
#expand OSINstall.mpkg
/usr/sbin/pkgutil --expand /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.mpkg /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.expanded
#modify Distribution script in place with no backup
/usr/bin/sed -i '' "s/modelProp\ \=\=\ hwbeSupportedMachines\[i\]/1/g" /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.expanded/Distribution
#modify Distribution script in place with backup (for sissies)
#/usr/bin/sed -i '.original' "s/modelProp\ \=\=\ hwbeSupportedMachines\[i\]/1/g" /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.expanded/Distribution
#remove original OSInstall.mpkg package
/bin/rm -rf /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.mpkg
#flatten new package
/usr/sbin/pkgutil --flatten /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.expanded /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.mpkg
#remove expanded folder
/bin/rm -rf /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.expanded
### image is now ready to be burned ###
echo "Ejecting the original Image"
#eject disk image
hdiutil eject /Volumes/Mac\ OS\ X\ Install\ DVD/
#convert the RW image to Read Only for restore
echo "Convering RW to RO image"
/usr/bin/hdiutil create "$destination"/Mac\ OS\ X\ Install\ DVD\ Converted.dmg -format UDZO -srcdevice "$destination"/Mac\ OS\ X\ Install\ DVD.dmg
echo "Deleting RW image"
#delte the RW image
/bin/rm -rf "$destination"/Mac\ OS\ X\ Install\ DVD.dmg
echo 'Please type in separate terminal window "diskutil list" and make sure that there is only one "external" device and it is the USB you intend to reformat. Press Enter'
read
#get external usb device
usb=$(diskutil list | grep external | cut -c 1-10)
echo "erasing USB"
#Erase the USB
diskutil eraseDisk JHFS+ Untitled $usb
echo Restoring to usb
sudo asr restore --source "$destination"/Mac\ OS\ X\ Install\ DVD\ Converted.dmg --target /Volumes/Untitled --erase -noverify
Last edited: