Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

brianmay27

macrumors newbie
Original poster
Oct 20, 2009
1
1
Disclaimer: This is only for backup/personal use. You are only allowed to use the disk on one computer at a time. This tutorial is only to help save you time if you are upgrading a hard drive etc.

Now that that's over with, Last night I had to reinstall snow leopard onto my mac because I installed a larger hard drive. So that got me to thinking there must be a way to allow you to install it in one swoop instead of to install it with the disk that orig came with the computer blah blah -- that takes forever! So I started looking through the disk and I found a way to make the disk a full version.

To start off:
Open disk utility and insert your disk. Select the disk and hit new image. Save the image as cd/dvd master. (don't know if the others work, ive only tried this).

While its backing up, you have to enable showing hidden folders/files. So open terminal and type
Code:
defaults write com.apple.finder AppleShowAllFiles TRUE
Then type
Code:
killall Finder
Once the backup is complete, mount the image and go into the system/Installation/CDIS/
In there right click the Mac OS X Installer.app and select show package contents. Then navigate to Contents/Resources and delete the file CheckforOSX.

Thats the first part. Exit out until your back at system/instillation. go into the Packages folder and find OSInstall.mpkg Copy this to a new folder on your desktop called install or what ever you want. Open terminal again and cd into that folder
Code:
cd Desktop/install
Now you have to extract the .mpkg. to do that we are going to use xar. type in terminal
Code:
xar -x -f OSInstall.mpkg
This should leave you with three files Distribution, Scrips and a folder Resources. We are interested in the Distribution file. From what I hear you can use a XML editor but i just used vi in terminal.
Anyway in that file we need to delete 2 large chunks of script. The file should look like this: (I cut the end part off because the top is the only part we need to do anything with)
Code:
<?xml version="1.0"?>

<installer-gui-script minSpecVersion='1'>

	<options
		eraseOptionAvailable='true'
		hostArchitectures='i386'
		allow-external-scripts='yes'
	/>
	
	<title>MacOSX_Title</title>
	<license file="License.rtf" sla="EA0560"/>
	<welcome file='Welcome.rtfd'/>

	<script>
        var minRam = 1024;
	
	function checkSupportedMachine(machineType){
		// Fail on G3
		if (1 != system.sysctl('hw.vectorunit') ) {
			return false;
		}

		var badMachines = ['iMac','PowerBook1,1','PowerBook2,1', 'AAPL,Gossamer', 'AAPL,PowerMac G3', 'AAPL,PowerBook1998', 'AAPL,PowerBook1999'];
		
		if(machineType){
			var length = badMachines.length;
			
			// Fail if any of the compatible values match the list of badMachines
			for( var j = 0; j < length; j++ ){
				if(machineType == badMachines[j]){
						return false;
				} 

			}
			
		}
	
		// require 867Mhz+
		if (system.sysctl("hw.cpufrequency") < 866000000) {
			return false;	
		}
			
		return true;
	}
	
	function checkSupportedBootRom(machineType){
		var machinesNeedingROMUpdate = new Array();
		machinesNeedingROMUpdate['PowerMac2,1'] = 'f2';
		machinesNeedingROMUpdate['PowerMac2,2'] = '$0003.30f3';
		
		try{
			var bootROMEntry = system.ioregistry.matchingName('boot-rom','IODeviceTree');
			var bootROM;
			if ( bootROMEntry.length > 0 ) {
				var bootROM = bootROMEntry[0]['BootROM-version'];
			} else {
				return true;
			}

			// Fail if any of the compatible values match the machine/ROM pairs that need updating
			for( k in machinesNeedingROMUpdate ){
				if((machineType == k) && (bootROM == machinesNeedingROMUpdate[k])){						
					return false;
				}
			}
		} catch(e) {
			system.log('checkSupportedBootRom threw exception ' + e);
		}
		
		// if we can't find it, assume it's supported
		return true;
	}

function hasAtLeastRam(RAM) {
        var requiredRAM = (RAM * 1024 * 1024);
        var actualRAM = system.sysctl('hw.memsize');

        return (actualRAM > (requiredRAM - 1));
}


[color=red]	function earlyMachineCheck(machineType) {
		var earlyIntelMachines = [ "iMac4,1", "iMac4,2", "iMac5,1", "iMac5,2", "iMac6,1", "iMac7,1",
							  "MacBook1,1", "MacBook2,1", "MacBookPro1,1", "MacBookPro1,2",
							  "MacBookPro2,1", "MacBookPro2,2", "MacBookPro3,1", "Macmini1,1",
							  "Macmini2,1", "MacPro1,1", "MacPro2,1",
							];
	
		if(machineType){
			var length = earlyIntelMachines.length;
			
			for( var j = 0; j < length; j++ ){
				if(machineType == earlyIntelMachines[j]){
					return true;
				} 

			}
			
		}
	}[/color]

	function installCheckScript(){
			
			try{
				var machineType = system.ioregistry.fromPath('IODeviceTree:/')['compatible'];
				
				if ( typeof(machineType) == "string") {
						if(!checkSupportedMachine(machineType)){
							my.result.message = system.localizedStringWithFormat('IC_Machine_message');
							my.result.type = 'Fatal';
							return false;
						}
			
						if(!checkSupportedBootRom(machineType)){
							my.result.message = system.localizedStringWithFormat('IC_Firmware_message');
							my.result.type = 'Fatal';
							return false;
						}
				}
				else {
					for(var i = 0;i < machineType.length; i++){		
						if(!checkSupportedMachine(machineType[i])){
							my.result.message = system.localizedStringWithFormat('IC_Machine_message');
							my.result.type = 'Fatal';
							return false;
						}
			
						if(!checkSupportedBootRom(machineType[i])){
							my.result.message = system.localizedStringWithFormat('IC_Firmware_message');
							my.result.type = 'Fatal';
							return false;
						}
					}
				}
				if(!hasAtLeastRam(minRam)){
					my.result.message = system.localizedStringWithFormat('IC_RAM_message');
					my.result.type = 'Fatal';
					return false;
				}
				
[color=red]				if (system.compareVersions(system.version.ProductVersion, '10.6') >= 0) {
					if (earlyMachineCheck(machineType)) {
						var checkResult = system.run('./OSCheck.pl');
		                if(0 != checkResult){
		                       my.result.message = system.localizedStringWithFormat('IC_Upgrade_message', '10.5');
		                       my.result.type = 'Fatal';
		                       return false;
		                }
					}
				}
				
				findBJPrinters();[/color]
				
			}catch (e){
				system.log('installCheckScript threw exception ' + e);
			}
			
			return true;
	}

	function volCheckScript(){
			var target = my.target;
			var destSystemVersion = target['systemVersion'];
						
			if(system.files.fileExistsAtPath(my.target.mountpoint + "/Backups.backupdb")) {
				my.result.message = system.localizedString('VC_Backup_message');
				my.result.type = 'Fatal';
				return false;
			}
						
			if(destSystemVersion){
							
				if( typeof(isFNI) == "undefined" )
				{
					if(destSystemVersion.isServer){
						my.result.message = system.localizedString('VC_ServerVersion_message');
						my.result.type = 'Fatal';
						return false;
					}
				}
			}			
			
			return true;
	}

Find the lines in red and delete them from the file. Then save the file and quit. Now move the OSInstall.mpkg file out of the install folder and now its time to re compress it. In terminal type
Code:
xar -c -f OSInstall.mpkg *
You should now see a new OSInstall.mpkg file appear. Simply delete the one from the Cd backup and move the new one in its place.

And your DONE! now just eject the disk and open disk utility. Insert a DL DVD and hit burn. IMPORTANT: burn it at the LOWEST speed possible. Ive had many disks not work because i burned it too quickly

Enjoy your new time saving dvd!
 
  • Like
Reactions: Aii

hutchwilco

macrumors newbie
Feb 22, 2013
2
1
Alternate method for 10.6.7 upgrade disc mod

I tried to follow brianmay27's hint, where editing the Distribution file inside OSInstall.mpkg removes checks for the mac model type.

However, My particular install DVD (or external USB version of one), didn't have the section of code referred to, but it did have this:

Code:
var hwbeSupportedMachines = [
	
		'MacBookPro8,1',
		'MacBookPro8,2',
		'MacBookPro8,3',
];

I simply inserted my model 'MacBook1,1' into this list so I got:

Code:
var hwbeSupportedMachines = [
	
		'MacBook1,1',
		'MacBookPro8,1',
		'MacBookPro8,2',
		'MacBookPro8,3',
];

...saved the Distribution file, repacked the .mpkg file, and copied back to my installer partition (as instructed by brianmay27) and viola, the installer now passes the initial check, and allows me to install on my macbook.

Hope this helps someone else, thanks brianmay27.
 
  • Like
Reactions: Aii

benwiggy

macrumors 68020
Jun 15, 2012
2,386
207
I'm not sure what the intention is for this hint. Is it to use a "non-retail" installer disk on another machine?

Note that most non-retail installers do not contain all the necessary drivers for all models of Mac, so even if the installer proceeds, the installation may not entirely work.
 

MichaelLAX

macrumors 6502a
Oct 31, 2011
843
23
I'm not sure what the intention is for this hint. Is it to use a "non-retail" installer disk on another machine?

Note that most non-retail installers do not contain all the necessary drivers for all models of Mac, so even if the installer proceeds, the installation may not entirely work.

Who knows what the original intent was back in 2009; however, many Macs were introduced in 2011 with Snow Leopard and came with restore discs that were of a version higher than 10.6.3 (the last "retail" version of Snow Leopard available); usually 10.6.7.

Many people have now acquired these Macs but either lost their original restore discs or purchased them used without them or purchased them when Lion was simply provided instead of Snow Leopard.

For these people who want to restore Snow Leopard or more likely, partition their HD or add an external HD with SL so as to be able to "dual-boot" to regain access to PowerPC apps, they need a version of SL greater than 10.6.3.

One way to achieve this is to install SL into an external HD on another Mac, update it with Software Update, and then clone it and restore it to the original Mac.

The other way is to have a "retail" Mac OS X Snow Leopard Install DVD that installs 10.6.7 or 10.6.8.
 
  • Like
Reactions: Aii

MichaelLAX

macrumors 6502a
Oct 31, 2011
843
23
The highest retail version was 10.6.3 and the highest machine specific version was 10.6.7 (i have the discs). 10.6.8 is only available as an update.

Hence, the purpose of this post: to create a "retail" (i.e., non-machine specific) version that boots and installs 10.6.8...
 

richmond62

macrumors 6502
Mar 12, 2020
275
86
Time to pray that someone does what the Sorbet Leopard Hero did for MacOS Leopard PPC for MacOS Snow Leopard Intel: some of us, however kinky it sounds, really do like to be able to run apps like Bryce & that goes "tits up" on 64-bit Macs.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.