Monday, April 07, 2008

How To Recover from "Windows could not start because the following file is missing or corrupt"

Or "How I Spent My Weekend".

Myron turned on the home PC Saturday morning and was greeted with this:
Windows could not start because the following file is missing or corrupt

C:\windows\system32\config\system missing or corrupt

You can attempt to repair this file by starting windows setup using the original setup CD-Rom. Select "r" at the first screen to start repair.

Luckily I have a laptop, so I Googled the error and found what looked like a very nice writeup at Help2Go. As I started reading it I got bogged down in the links that kept getting deeper and deeper, eventually going back to an article about backing up your hard drive using a Knoppix Live CD. Here's what I did that eventually fixed the issue. This is the abridged version, I tried lots of other things and didn't finally get the computer up and running until around 8:00 Sunday night.
  1. Insert the Windows XP CD and boot from it. I'm using an ASUS motherboard so this meant pressing F8 for the boot menu, then selecting my DVD drive. Another option is to go into your BIOS settings and change your boot order, if it's not already set to boot from CD.
  2. Start the Recovery Console by pressing R from the Welcome screen.
  3. Select your installation of Windows XP. Unless you're using dual boot there should only be one.
  4. Wait for the console to load, then enter chkdsk /p /f . The article on Help2Go says to just use the /p switch, but after looking at the parameters of chkdsk I realized that only tells you if there are problems. You need /f to fix them.
  5. Reboot the computer from the XP CD again. At the screen where you pressed R before (for the recovery console), press Enter.
  6. Accept the license agreement. Now you should see a list of Windows XP installations. Again, unless you have a dual boot configuration there should only be one. Make sure it is selected, then press R to start the repair.
  7. IF REPAIR IS NOT AN OPTION, STOP! Read this. I had to use the tip from Alex Nichol, but I'm not going to post it here because it's definitely an edge case.
After I did all this I was able to boot into Windows XP, but I was still curious what had happened. The chkdsk utility said it found and corrected errors, but what exactly? My PC was powered off, so what caused it to fail during startup? I'm using Seagate hard drives, so I downloaded the SeaTools utility, burned it to a CD from my laptop, and booted from it. I ran their long tests and that turned up no errors on my C drive, but 31 errors on my D drive. It also said that my D, which is where I keep my Windows page file, had hit a temperature in excess of 70C. I'm not sure how that's possible when the two drives are millimeters apart and the other one is perfectly fine. I'm also not sure how a failure of my D drive would cause my C drive to go wonky, either. Perhaps something was being written to the page file, the second drive died, and it caused data corruption on the first drive.

Needless to say I'll be replacing both drives as soon as I can. In all the time I've been using Windows this is the first time anything like this happened to me. I can't say it's entirely Windows' fault, either.

1 comment:

  1. Hello!
    I'm Robert from Hungary. I just came to say thank you for this article!
    It was very useful! My computer went wrong and it was the only solution that worked for me!

    ReplyDelete