Chosen Solution

For some reasons, my iMac G5 20" Model A1076 turns on only for about 30 seconds after the Apple logo appears, then shuts down automatically, wondering what’s the problem.

The symptoms you report are very common, usually due to a failed power supply module. Inspect the logic board of the unit for any obvious signs of swollen or leaking capacitors to rule out the logic board as the cause of the issue. a good picture of bad caps: http://www.flickr.com/photos/manuelmarte… Also, follow this procedure to help isolate the power supply as the cause of your issues: http://support.apple.com/kb/HT2173 Good Luck!

Try the AHT (Apple hardware test) startup with the Install disk in the computer and hold down D. If you are running 10.5 or above you should use the install disk 2 - The applications disk. IF that doesn’t help, you may want to backup your files by running it in Target Disk mode (hold down T at startup) and do a fresh reinstall of OSX

The problem is solved, what i did was to boot with single mode (command+s) and follow the instructions below from NUMBER 6 Reset certain privileges in Your Mac won’t start up in Mac OS X (Mac OS X 10.3.9 or earlier) at http://support.apple.com/kb/TS1411?viewl

  1. Start up the computer in Single-User Mode.
  2. Check the volume with fsck.
  3. Type: mount -uw /
  4. Press Return.
  5. Type: chmod 1775 /
  6. Press Return.
  7. Type: reboot
  8. Press Return.