Apologies in advance, this is going to be a long story ;)
Today a friend brought me his computer to fix because it no longer boots, it freezes up while the Windows 7 logo and "starting windows" is still on screen. For what it's worth, it's an HP Slimline, not sure exactly which model.
First thing I did was try to boot in safe mode, this showed the computer hangs while or just after loading DISK.SYS. This is the last line safemode shows before it stops responding.
Second since the computer is fairly new I tried reinstalling Win7 from the CD. This also hangs while "starting windows". Trying the install in safe mode shows it hangs while loading CLASSPNP.SYS which is the next line after DISK.SYS.
Suspecting a hardware problem I tried replacing the HD and DIMMs, neither of which make any difference. With the new HD the install process still hangs on CLASSPNP.SYS.
Oh and I ran memcheck86 and the hardware tests built-in to the bios (HDD and mem) none of which report any problems. I'm running the build in SMART HDD check now but considering I also tried a different drive that I know is good that is unlikely to turn up anything new.
Finally to make sure this isn't a problem with Windows 7, I tried installing XP SP3 from an old disk instead, but this also hangs while "Setup is starting windows" (I couldn't get into safe mode or find any way to enable logging to see exactly what causes the freeze.)
The ONLY thing I got to boot was an old Ubuntu 8.04 live CD. I can get the live CD to boot to desktop and all is well. I tried installing it to the harddisk but that also hangs. I can't see exactly why because the screen just goes blank and stops responding after I select "install" from the menu.