|Failing power supplies are common and can cause your symptoms.|
Check your PS.
See response 4 in this:
Try this first BEFORE you try doing a Repair "install" - if your computer is having problems reading the ram, running a Repair "install" will TRASH your existing Windows installation because you won't be able to complete it sucessfully:
A common thing that can happen with ram, even ram that worked fine previously, is the ram has, or has developed, a poor connection in it's slot(s).
This usually happens a long time after the ram was installed, but it can happen with new ram, or after moving the computer case from one place to another, and I've had even new modules that needed to have their contacts cleaned.
See response 2 in this - try cleaning the contacts on the ram modules, and making sure the modules are properly seated: