After being locked-out from my own admin account, I tried to do a clean install with the Win 8 disc post-bios. However, few mins into the disc installation, then the mouse and keyboard freezes. Seems that it was functioning well for 2 minutes. If I'm fast, I'll be able to get to cd-key window and it freezes there.

I tried with Windows 7 disc, I just managed to get to the screen which asks me to choose the language. Tried with Ubuntu, did not even finished loading. I also tried removing the SSD and just mound the 2 TB WD Black, same results as before. This leads me to think that this is not a Windows 8/7/Ubuntu issue and is something to do with the hardware. I don't know which one is causing the problem.

However, if I boot normally, which I can, everything is fine. I do notice that sometimes when I try restart the pc when I'm in windows, it does not boot but just shuts down. Happens often especially when I try to update the computer. However, if I restart the pc, just before putting the password for the windows 8 account-after turning the pc on, I can restart the pc normally. I have a suspicion that the BIOS is not responsive after sometime I've turned on the pc. This is also causing all the other problems. However, I am not sure what is causing the problem.

Any ideas?