Power supplies have low voltage sensors. Without any other monitoring
your power supply if working properly will shut down. Another story
however on the output supply. Many power supplies in cut rate computers
are specked out to small for the hardware in the box. To trouble shoot
you may disconnect extra drives and should see positive results.
If in fact the box shuts down while booted up an improper shut down of
the system may cause problems with the OS.
You can also have a faulty card that is drawing to much power. Trying to
trouble shoot, remove the extra cards that may be installed, one at a
time, then reinstall them to look for a difference. If you find a bad
card or drive replace it because a new power supply will not fix the
problem. A UPS will not fix an internal problem. One can monitor the
voltage and if it dips when problems occur this would be a good avenue
to take.
For the record. An OS relies on proper running hardware, it is not a
cure for a bad hardware.