The laptop is a sony vaio pcg-frv27. I already replaced the harddrive.
It seems if I go into the power management options and change the turn
off if battery power is critical option i can run it on the battery.
As soon as I change that back to shutdown or suspend if power is
critical when I switch to battery it shuts down.