Cannot install windows 7 or ubuntu

I'm having a strange issue. My laptop was running on windows 7 previously and sometimes it was restarting and getting stucked. So I tried to reinstall windows 7.
When I try to install windows it goes with the first phase (loading from the CD and copying files). And then always get stuccked in the starting windows phase. It stops when the windows logo arrives (I can only see start of the windows logo animation).
Then I tried to install Ubuntu, but no success. It again stucked in the middle.

But for some reason I can install windows XP. After that I have installed all the drivers and all the devices are working correct.

I'm not sure what is happening please help me ...
Laptop version : Acer Aspire 4738z
Ubuntu version : 12.10


I have experienced the same problem before, multiple times actually and have different solutions to them all. Some requires a hardware fix, some requires an ISO fix.

  1. You might want to check your copy of Windows, that you burn onto a CD. It might be a faulty ISO, or you might have burn it at a faster speed (say 32x) causing some bad writes onto the CD.

1.1 Your DVD Burner might be faulty. (Hardware Issue)

  1. Check if your Hard disk drive is still spinning during the installation. If it stops spinning, there's a chance that the installation is actually stuck, this maybe due to problem (1) as above.

2.1 It might also be a good idea to check if your Hard disk drive is faulty.

  1. Doing a memtest86 to see if you have a faulty ram. If you have one, that might be the problem. From my experienced, I took out one ram from my laptop and tried to re-install Windows, everything worked out great. All I have to do is get a new pair or stick of RAM.

Possible reasons :

  • Your CPU is getting over heated and the processor stops abruptly leaving your screen frozen.
  • The power supply (Battery ->equivalent of a PSU) is not delivering enough amps consistently to your HD
  • RAM is faulty

Solutions:

  • Download a diagnosis/monitoring software like Everest and memtest and see if any of the components give bad values.