First of all I'll explain all the actions that I perform on the iMac 6,1 that does the same as starting up, the hard drive stops making noises and shut down after the loading circle disappears.
1. I try to install Leopard, Snow Leopard, Mountain Lion, Maverick, and Yosemite (several versions of each one). All the installation process failed, it always turns off, sometimes before the installation process or after when it reboots (I used DVD and USB).
2. I install a hacked version of Snow Leopard, it boots but it fails when you want to shut it down, it enters a weird state of sleep mode.
3. I check the HDD with the Disk Utility in the hacked OS. The disk is fine, no error found.
4. I upgraded Snow Leopard from the installed OS, everything worked fine, until reboot. The iMac turns off again like before.
5. I reinstall the hacked OS into a USB hard drive, it boots like the internal HDD, and the weird sleep mode...
6. I downloaded the AppleHardwareTest, I can't make boot at startup, and I don't know how to boot from the OS.
Any idea about a hardware test once the OS is loaded (Snow Leopard OS).
Best regards to all...