hi guys,
this is me into my second week of trying to get a working OS onto my iMac
as you can imagine i have tried all sorts of moves but still no further forward except i have got a fair bit of knowledge i didn't have before so that's always good,

(the comp i want to fix is white 17inch core duo 160 gb hdd i say this as there is some small differences in these models that are not apparent to the eye)

so i have figured out that getting an iso on-line burning it just don't seem to work then today i read after a few searches here that in the "OSinstall.dist" file there should be reference to the machines it can be installed onto, so i extracted the iso i have that i rate as being the best one and find the OSInstall.dist file and find

Code:
<?xml version="1.0"?>

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

	<options
		mpkg="com.apple.mpkg.OSInstall.FatUserDVD"
		eraseOptionAvailable='true'
	/>
	
	<title>MacOSX_Title</title>
	<license file="License.rtf"/>
	<welcome file='Welcome.rtfd'/>

	<script>
	
	function checkSupportedMachine(machineType){
		var badMachines = ['iMac','PowerBook1,1','PowerBook2,1', 'AAPL,Gossamer', 'AAPL,PowerMac G3', 'AAPL,PowerBook1998', 'AAPL,PowerBook1999'];
		
		try{
			var cpuFreq = system.sysctl('hw.cpufrequency');
		} catch(e) {
			system.log('checkSupportedMachine threw exception ' + e);
		}
		
		if(machineType){
			var length = badMachines.length;
			
			// Fail if any of the compatible values match the list of badMachines
			for( var j = 0; j &lt; length; j++ ){
				if(machineType == badMachines[j]){
						return false;
				} 

			}
			
		}
		
		// if we can't find it, assume it's supported
		return true;
	}
	
	function checkSupportedBootRom(machineType){
		var machinesNeedingROMUpdate = new Array();
		machinesNeedingROMUpdate['PowerMac2,1'] = 'f2';
		machinesNeedingROMUpdate['PowerMac2,2'] = '$0003.30f3';
		
		try{
			var bootROM = system.ioregistry.matchingName('boot-rom','IODeviceTree')[0]['BootROM-version'];

			// Fail if any of the compatible values match the machine/ROM pairs that need updating
			for( k in machinesNeedingROMUpdate ){
				if((machineType == k) &amp;&amp; (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 installCheckScript()
thats not all of the file there's another bit like this that will fail me tooi think, (as i know the version on the iMac is newer) but i want to make a clean install so this may not matter i dunno
Code:
//Fail if system on disk is greater than what is being installed
				if(-1 == system.numericalCompare(system.version['ProductVersion'],destSystemVersion['ProductVersion'])){
					my.result.message = system.localizedString('VC_Newer_message');
					my.result.type = 'MustNotUpgrade';
so instead of having a whitelist of allowed machines ( like some must have as that's what I read on here somewhere) it has a black list of disallowed machine types.
so my question is can I just remove(delete) the reference to iMac from the very first function and remake the ISO will it work?
or do I need to edit more than deleting "iMac"
I would just go ahead and do it and see but I am on my last 2 dvd disks (not dual layer hence using a version that fits on 1 dvd-r) so would appreciate it if anyone can help me out,

I just thought this second (bang lol) if i replace this file with one with that allows iMac would that work? or can i just edit out the reference to imac in the first function?

also there is a nearly complete OS on the thing i just ruined it in error when trying to uninstall some bits and pieces that were of no use to me,and when i contacted the people who sold me the thing they said there is no such thing as a install disk for this machine??? ( obviously a lie)

oh yeah another brainwave, can i burn a working install disk for an iMac from within hackintosh as you can from within a working mac. i would reformat and install it in 3 seconds flat if i could. but i am too para to end up with an expensive pc paperweight and a more expensive mac paperweight and 2 blank dvd-r's.

any help pointers suggestions would be great. i have root available in single user mode but in my lack of wisdom i had got the machine to a state where it would boot as far as the login screen then show the login box for like 3 seconds and then drops to a Darwin prompt which i cannot log into ( i think i cant login because i deleted the sudoers file thinking it would make the machine boot to a desktop) and the reason i wanted that to happen is i could not input any characters from the keyboard to login though it knew the keyboard was there as some non alphanumeric keystrokes were recognised ( backspace etc. ) and its works fully in single user mode. at some point thru the week i deleted the AppleSetupDone file to get the first run user experience and when i get to select keyboard there is no default choices in the box at all and when i check the show all tickbox it shows me 5 langs 2 or 3 i have never heard of the other 2 are Chinese, and even if i choose Chinese and click continue it hangs there forever.

as you can probably guess this is a total SOS and probably very badly punctuated etc but i have done my best to explain what i have done and what i am trying to do.

got to laugh at my self really as in my many years of pc wisdom i always heard from various sources that Macs were far far superior to PC's so for some reason i just assumed that a re-install would be a pure breeze.

which it is if you have a 200 quid disk that i would need to save up for. it took a year to save to buy the computer and i actually let it come with no disks as i was confident i wouldn't need any. what a fool i know, but i just never knew and went with the macs are better than PC's ( i hear) so must be easier to fix way of thinking i had in my brain.

so guys any help more than appreciated
peace
d_c