Toshiba satellite A300 shutts off


Dec 4, 2016
I have a toshiba satellite A300-1G5 and it has been in top condition for a few years now. A few months ago i started getting this issue when the screen suddenly freezes and i am unable to tab-out or do anything. It requires me to shut it down by pulling it out of the socket (my battery is dead). I checked if its an overheating issue but its not, all the vents and fans are clean. I thought that it was a virus so i formated my hard drive and now i am up to the point where i have to install an OS. I tried windows but as soon as i get to the setup the laptop shuts off, i tried with linux, same thing happens. Can anyone help? Thanks in advance.