Have you ran a check on the hard drive yet?
The system locking up during shutdown or even during an install of an OS normally means bad hardware, either bad memory or bad sectors on the hard drive.
If you are able, open a cmd.exe window as administrator and put in
chkdsk c: /r
when you run it it will say the drive is in use, hit Y to have it run at next boot, then have it do it and let me know the results
Shane