XP Restarts on Boot

Written: 7th June 2008
Section: Windows

Over the past few days I've had a problem with my windows installation failing to boot. Because it was such an obscure rescue operation I've decided to document it in the hope that someone else will find my method recovers their installation where others have failed.

The basic symptoms are this: XP is working fine; next time it boots up the system restarts just before the Windows XP logo appears or shortly after (I experienced both at some point) and results in a continuous restart cycle. The facts are these: the drive is clean according to chkdsk; disabling automatic restart on boot doesn't have an effect (so no STOP error code and thus leaving the possibilities of what it could be wide open); it won't boot into safe mode. If you haven't tried these tasks or don't know what they mean, I'll explain from the beginning how to get to this point. If you're already here you can skip ahead.

The first thing you should do if you're having any problems with windows is to run a disk check. This goes by the name of chkdsk.exe (you might also know it as scandisk) and does exactly what it says on the tin. Because you can't boot, the disk check will never run so you must initiate it yourself. Grab your Windows CD, put it into the drive and boot from it. If you don't have your disc, download The Ultimate Boot CD and run Aviras NTFS for DOS. When you boot from your windows CD you should eventually be given some options. One of these will be 'Press R for recovery console', which is what you want. Follow the prompts and once you're in type:

chkdsk /r /p

This might take some time so go find something to do for half an hour or so. Once finished a brief report will be output and chances are you'll also see some other messages before it such as 'Removed Index ...' which means it fixed some problems. In the report, look to see if there any Bad Sectors. If you have bad sectors on your disk you need to recover the data you need off the drive as soon as possible. Continue on with these instructions as normal but once you're all up and running, backup your data and get a new hard disk. The bad sectors are what most likely caused the problem in the first place. With the disk check completed run the following commands:


These commands will replace the existing boot files and directives with ones from the CD that are guaranteed to be free from corruption. If you're running a multi-os system and have a boot loader such as grub installed, you won't want to run 'fixmbr' as it will effectively nuke it. 'Exit' will restart your computer and you'll see if any of the actions you performed made an impact. If they did and you can boot, great! If you're getting the same as before, continue on.

The key to discovering your problem is getting the STOP error to appear instead of the system rebooting. Once you have that, it's as easy as googling it and following the instructions you find. The value for making it show the STOP error is stored in the registry, but as I discovered changing it has no effect. It's time for something a little drastic. The next step is to install another copy of windows onto the same partition (hard drive if you've no idea what that means) and boot into that to make some headway. Note the following points:

  • Ingore the warnings you'll get. You do want to install alongside your existing installation.
  • When prompted, choose 'Leave filesystem intact' not 'Format'.
  • Give your windows folder a different name ('WINDOWS2' will do). Anything but WINDOWS.
  • When creating user accounts, use a different name from the one on your broken installation (otherwise it will probablies overwrite it).

This should be a fairly straightforward process. Install windows as you usually would, but ignore all the warnings and you'll be fine. If you have a boot loader such as GRUB, the windows installation will bypass this so you'll want to restore it again at some point. After installation you should be able to boot into Windows. This isn't the same as your original Windows installation but you will be able to see your existing files. Now might be a good time to back up what you need. Providing your previous install was up-to-date, you have one aim. Run windows update. If not, then you might aswell continue anyway unless you know exactly what updates you installed. You might need to install a driver or two to access your internet connection, but other than that don't install anything other than windows updates. You'll need to give it a kickstart by selecting 'Windows Update' from the All Programs menu. It will download the updates and ask to reboot. Upon rebooting, do the same again and repeat the process utnil there are no updates left to install. Now, open the drive with Windows in it inside My Computer (Usually C:\). Open 'WINDOWS' (the broken, original one) in one window and open the new windows folder (WINDOWS2) in another. Navigate to 'SYSTEM32' in both windows. In the new installation window (WINDOWS2) highlight every single file in the directory but no folders then copy and paste them into the original windows SYSTEM32 folder. Say 'Yes to all' to any messages that appear. Now reboot your PC.

You'll have noticed when booting that there is now a boot menu that has two different versions of Windows XP on it. The last thing we did should have been from the one on the top of the list. Now, you want to boot from the one on the bottom of the list. Immediately after selecting it press F8 and select 'Disable automatic restart on error'. You should now get a blue screen with a STOP error message. If your system boots skip ahead to the next paragraph. Make a note of the first hexadecimal error code (mine was 0x0000007B), boot into the new windows installation and search for it on Google. The top result will most likely be a link to the microsoft website which you should definately look at. If you want to skip that and try the solution that fixed my installation then boot into the broken installation again, press F8 and select 'Last Known Good Configuration'. Atfer that my system booted and I was reunited with all my programs, settings, etc.

Once you've got it working you will want to change the boot list that appears before booting to automatically boot into the version of windows you just fixed, not the new one. To do this, at the Run prompt type:

notepad c:\boot.ini

Under '[boot loader]' change the end of the line to read '\WINDOWS' instead of '\WINDOWS2' (or whatever you used). Also, change the timeout value to something faster. 2 seconds is fast enough to briefly show the options and choose the default installation quickly. By leaving the second version of windows installed and available you always have something to use should your curernt installation break again, so I recommend you follow the instructions I just gave you. However, if you want to remove it anyway, follow the instructions above and also delete the second line under '[operating systems]' which points to the windows installation you just installed. Afterwards, delete the 'WINDOWS2' folder from your drive and you're sorted.

From the above steps it appears that one of my system files was corrupt and that was causing the system to not boot. I believe it was due to a windows update gone wrong (I actually had this problem twice. The first time I formatted and it came back again about 12 hours later on the sparkling clean new installation). At least now with the second version of windows available I've something extremely useful to use should something go wrong again.

Javascript disabled!

Choose a theme

System Status #1

Javascript must
be enabled

System Status #2

Javascript must
be enabled

Monthly vote


Annoy me to hell
Are part of life
Are my forte
Are for facebook

© Daniel Richardson 2007 - 2018