Jump to content

How to patch any Mac OS X Restore DVD (gray disc) to work on any computer


  • Please log in to reply
3 replies to this topic

#1
PookyMacMan

PookyMacMan

    InsanelyMac Legend

  • Moderators
  • 1,459 posts
  • Gender:Male
  • Location:Earth–Western Hemisphere, specifically
  • Interests:Computer science, engineering, trumpet performance, and a host of others. :D
Considering it is such an obstacle, and I have been asked this many times, I think it would be worthwhile for this to finally be written down. :) This guide requires an existing installation of Mac OS X; for 10.4 and earlier, you can use any OS X release, but for 10.5 and 10.6 you need 10.5 or higher.

In short, there are basically three methods: one for 10.3 and earlier, one for 10.4, and one for 10.5 and 10.6. For 10.5 and 10.6, you need the Developer Tools (which are on the disc and are not machine specific.)

For all three, you first need to make a read/write image of your disc. This can easily be done by opening Disk Utility, selecting the DVD, clicking New Image, and selecting read/write for the format.

If you have 10.5 or 10.6, you also will need something to show hidden files, such as TinkerTool, to locate the System folder.

Next, go in the the Installation folder inside the System folder on the image. Locate OSInstall.mpkg.

Now, for 10.3 and earlier, right-click OSInstall.mpkg and choose Show Package Contents. Open Info.plist with TextEdit or a .plist editor. Near the bottom, there will be something like OSModelCheck that will have a model underneath it (in TextEdit) or beside it (in most other .plist tools), such as PowerMac3,1. Delete the whole thing (the key and the model), save the .plist file, and you're good to go. You may, though, want to check the Info.plist files of some bundled software such as AppleWorks to make sure that others don't have the model check, as some packages on my 10.3 disc did.

For 10.4, right-click OSInstall.mpkg and choose Show Package Contents. Now, right click OSInstall.dist, choose Open With -> Other..., and choose TextEdit. Basically the .dist is a Javascript file, so you will have to cipher through a junkload of code until you come to a model like PowerMac6,1. Above it, you will see the following code:

	try {
		var modelProp = system.sysctl('hw.model');
	}
	catch(e) {
		system.log('hwbeInstallCheck threw exception ' + e);
	}
	var machineCount = hwbeSupportedMachines.length;
	for ( var i = 0; i < machineCount; i++ ) {
		if ( modelProp == hwbeSupportedMachines[i] ) {
			return true;
		}
	}
  
	return false;
}
function hwbeInstallCheck() {
	if ( !hwbeModelCheck() ) {
		my.result.message = system.localizedStringWithFormat('hwbe_machine_message');
		my.result.type = 'Fatal';
		return false;
	}
	return installCheckScript();
}
</script><script>
var hwbeSupportedMachines = ['PowerMac4,4','PowerMac6,4'];

change it to:

	try {
		var modelProp = system.sysctl('hw.model');
	}
	catch(e) {
		system.log('hwbeInstallCheck threw exception ' + e);
	}
	var machineCount = hwbeSupportedMachines.length;
	for ( var i = 0; i &lt; machineCount; i++ ) {
		if ( modelProp == hwbeSupportedMachines[i] ) {
			return true;
		}
	}
  
	return true;
}
function hwbeInstallCheck() {
	if ( !hwbeModelCheck() ) {
		my.result.message = system.localizedStringWithFormat('hwbe_machine_message');
		my.result.type = 'Fatal';
		return true;
	}
	return installCheckScript();
}
</script><script>
var hwbeSupportedMachines = ['PowerMac4,4','PowerMac6,4'];

Another option is to change the hwbeSupportedMachines to your Mac model (of your real Mac you will use it on or of your smbios.plist you will use), such as PowerMac2,2 instead of PowerMac4,4 and PowerMac6,4 in this example. However, I prefer the other method.

For 10.5 and 10.6, the editing process is the same as for Tiger, but with a twist: you need to open OSInstall.mpkg with PackageMaker, which is why you need the Developer Tools. When you open it, hit the tab called Requirements and double-click the top Javascript. Edit it the same way as described with Tiger and hit OK (or Save or whatever). If you are concerned about cosmetics, change the name from MacOSX_Title to Mac OS X; otherwise it will say "Select which disk to install MacOSX_Title on". :) Build the package (don't worry about all the other packages) and rename it to OSInstall.mpkg. Drag it to the Packages folder on the image, choose Replace, and you're done.

#2
fusion71au

fusion71au

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 357 posts
  • Gender:Male

I found a slightly different method on gc0d3r's blog and tried it for myself on an OEM 10.6.3 Snow Leopard Disk for MBP 6,1 & 6,2.

 

Procedure outlined:

1. Extract Flat Package Editor.app from the Developer Tools.pkg using Pacifist (the pkg is found on the Mac OS X Install DVD/Optional Installs/Packages)---->copied to your Applications folder:

 

Attached File  DeveloperTools.png   153.28KB   1 downloads

Attached File  Flat Package Editor.png   225.46KB   2 downloads

 

2. Restore the contents of the Snow Leopard DL-DVD onto a 8GB USB thumb drive with Disk Utility.

3. Modify the OSInstall.mpkg file which is located in the System/Installation/Packages folder on the USB

  • Copy OSInstall.mpkg to the desktop
  • Open Flat Package Editor, choose File->Open and select OSInstall.mpkg ---->you will now see a Distribution file

Attached File  OSInstall_mpkg.png   23.04KB   2 downloads

  • Drag the Distribution file to your Desktop (do not close Flat Package Editor, we still need it) and open it with TextEdit.  We are searching for the following string:
<installation-check script="installCheckScript()"/>
<volume-check script="volCheckScript()"/>

Attached File  Distribution1.png   57.72KB   1 downloads

 

  • Remove installCheckScript() and volCheckScript(), so the above lines now look like
<installation-check script=""/>
<volume-check script=""/>
  • Save the modification in TextEdit, delete the original Distribution file in the FPE window & drag the modified Distribution from the desktop back to Flat Package Editor.  Save the now patched OSInstall.mpkg in FPE.

Attached File  Distribution2.png   106.03KB   1 downloads

Attached File  Distribution3.png   30.46KB   1 downloads

Attached File  Distribution4.png   151.76KB   1 downloads

  • Finally, rename the original OSInstall.mpkg in /System/Installation/Packages----> OG.OSInstall.mpkg and replace with your hacked version from the desktop

Attached File  Restore OSInstall_mpkg.png   178.2KB   1 downloads

 

The USB can now be used to install Snow Leopard on any Mac or Hackintosh (after installing a bootloader) :).  This method is also applicable to OSInstall.mpkg in OSX 10.7-10.9 install media (thus bypassing machine install checks).



#3
Promatics

Promatics

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
  • Gender:Male
  • Location:India

Good discussion topic, I got new information from this discussion. Thanks



#4
Nervbeutel

Nervbeutel

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts

Hi,

 

I know this works for PowerPC-Macs, too, so I have a question.

 

I used my ibook G4's (last model before the Intel transition) discs and made the changes like in post one. If I remember right, I got it to install on a PowerMac G4 Sawtooth. Later I tried it on my G5 late 2005 and it didn't work. So I tried adding all model names to the true-list, but that didn't help either.

Maybe I made a mistake.

 

NOW MY QUESTION

Can I perhaps send one of you guys the Text-Edit files and you change it for me, to work on all PowerPCs?

 

Thanks in advance...

 

 

Edit: I am refering to Tiger (10.4) and the G5 came with 10.3. so it should definitely be able to install.







1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy