I had a machine do that. Keep in mind that my encounter does not mean it's the same issue. In my case the hard drive had begun to fail.
-> Your post about "managed to get it working" sounds like there are issues with this machine. Here on a good Mac I just load the OS from the DVD and it smiles.
I had os x 10.5.8 and upgraded it with a DVD install of os x 10.6.3. I managed to get it working but there was no sound so i restarted it but now when i restart, i get the restart sound and the apple appears with the spinning gear and after a grey message comes down from the top of he screen and tells me in five different languages that the computer needs to restart. To hold down the power button until it closes and to press it down again to open it. I do that and the message just comes back over and over again. Anyone ?