Well this is what I think. When trying to boot off the disc (while holding down the "C" key) it will see if Leopard is installed. If it is, you're free to do whatever if not, well you can't install. I just think everything is done during that 2 minute wait while the computer boots off the disc.
Yes, but also it MUST surely check hardware ID, otherwise how was I able to install fresh, from UPGRADE disc with NO PREVIOUS LEOPARD INSTALL?!. I see your point, but there is no reason for the DVD to NOT check IDs.
[EDIT] I *KNEW* my hunch had something in it!!. See the attached file, unZIP it, and open in Textedit.app or nano/Textmate. The text is too large to copy/paste ALL of it, so I shall only include pertinent portion. This file is located on the UTD DVD @ location: /Volumes/Mac OS X Install DVD /System/Installation/Packages - the file is located inside the installed called OSInstall.mpkg, and is called "Distribution" and you have to unarchive it (using xar -x -v -f OSInstall.mpkg, but not now, because I have done it FOR you, ZIPped it and attached here!).
The installer IS checking hardware IDs, somehow, somewhere - LOOK:
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));
}
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;
}
}
}
}
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;
}
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();
}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;
}
function language_running(langKey){
var appleLanguages = system.defaults['AppleLanguages'];
if(!appleLanguages || (appleLanguages.length == 0))
return ((langKey == 'English') || (langKey == 'en'))
return (langKey == appleLanguages[0]);
}
gLanguageRequired = {
};
//Function returns true if the langKey is required, it uses a cache so that the logic doesn't
//have to be run hundreds of times
function language_required(langKey){
if(! (gLanguageRequired[langKey])){
var required = false;
if(language_running(langKey)){
required = true;
}
gLanguageRequired[langKey] = required;
}
return gLanguageRequired[langKey];
}
function language_enabled(langKey){
var enabled = !(language_required(langKey));
if(false == enabled){
my.choice.tooltip = system.localizedString('TT_Language_Required_message');
}
return enabled;
}
function language_selected(langKey){
var selected = my.choice.selected || language_required(langKey);
return selected;
}
function verCompare(checkVer){
var sysVer = my.target['systemVersion'];
if (sysVer) {
return system.numericalCompare(sysVer['ProductVersion'],checkVer);
}
return -1;
}
function upgrade_allowed(){
var argv = upgrade_allowed.arguments;
var upgradable = true;
var upgradeAction = my.choice.packageUpgradeAction;
if(argv.length > 0) {
upgradeAction = eval('choices.' + argv[0] + '.packageUpgradeAction');
}
if((upgradeAction == 'downgrade') || (upgradeAction == 'mixed')){
my.choice.tooltip = system.localizedString('TT_Newer_Package_Installed_message');
upgradable = false;
}
return upgradable;
}
function isServer(){
if(!my.target['systemVersion'].isServer){
return false;
}
return true;
}
function systemHasDVD(){
var obj = system.ioregistry.matchingClass("IODVDBlockStorageDriver");
if (obj) {
return true;
}
var obj2 = system.ioregistry.matchingName("ApplePlatformEnabler","IOService");
if (obj2 ) {
if ( obj2[0]['DVDSupported'] ) {
return true;
}
}
return false;
}
function hasNetInfo() {
var path = my.target.mountpoint + "/private/var/db/netinfo/local.nidb";
if (system.files.fileExistsAtPath(path)) {
return true;
}
return false;
}
Once you un-XAR the files from OSInstall.mpkg, you will see that the "Distribution" file is calling another PERL script, called "OSCheck.pl" which must be uncompressed somehow, at install time. You'll find that other PERL file inside the archive named "Scripts" in the same DIR.