Hi just a few words before the experts help you.
Before suspecting the motherboard, since you checked the HDD and memory, I would first suspect an
over temp condition of the cpu, and then suspect an intermittent power supply, both things much cheaper to check than replacing a mobo.
You say the power light stays on, so confirm if all the fans stay running, and if you think that the hard drive is still spinning. In other words, does it seem like the OS is still running ? Does keyboard input or mouse input make the hard drive seek or run etc. ?
If your cpu has a fan, check that it's turning.
Check that the heat sink assembly hasn't become loose (from the cpu).
It also may be an overtemp from the power supply fan not turning and it takes an hour to overheat. Check the cpu temperature if your hardware and software has this capability. You can find the normal operating range from the HP website.
Do you have any idea why the original OS became corrupted ?
It may be good to look along those lines too as to what is happening now.