Turns on then off

If the fan is loud then shuts off, try to replace the fan.

If the fan is not loud then shuts off, try to replace the HDD.