Wednesday, December 7, 2011

Windows 7 CHKDSK /R: Corrupt MFT: False Alarm

I was using Windows 7.  I rebooted with the Windows 7 program DVD, went into the System Recovery Options, and selected Command Prompt.  At the prompt, I checked each partition on my drive with CHKDSK /R.

There were five partitions.  For the first two, no problem.  On the third one, CHKDSK ran into problems partway through.  I don't remember the exact problem or wording, but as I recall it happened in the first of the five stages of partition checking.  It would give me an error message after getting partway through, and then quit.  I ran it again and noticed that it seemed to be progressing further through the partition, so I kept running it.  Once or twice, it seemed to regress, but I figured it was cleaning up something from the previous round.  Eventually it did complete the partition check.

So I moved on to the fourth partition.  Now, however, I got an error message.  I didn't write it down, but according to the multiple webpages I consulted for information on how to resolve it, from a Google search, the message was something like this:

Corrupt master file table. Windows will attempt to recover master file table from disk.

Windows cannot recover master file table. CHKDSK aborted.

And it wasn't just on that one partition.  I was now getting that error message on every partition on that drive -- including the ones that had just passed CHKDSK with no problems -- but I wasn't getting any such message on the other drive that I had in that computer.

If I hadn't made a backup just before running CHKDSK, the suggested solution would apparently have been to try recovering my data with something like TestDisk.  But before doing that, or wiping the drive and recreating my partitions and restoring the data from backup, I took a look with GParted, which I usually ran by booting from an Ubuntu live CD.  It didn't see any problems.  I rebooted with the Windows 7 CD and ran CHKDSK /R again.  Now it didn't see any problems either, on any of the five partitions.  So wiping the drive and recovering or restoring data would apparently have been unnecessary.  I wondered whether the process of retrying multiple times (or the condition that made it necessary to retry) on that third partition had somehow confused CHKDSK or my drive.

I hadn't experienced this before.  Possibly it was something unusual about my Windows 7 DVD, or about that particular bootup.  Another possibility was that maybe I should not have been running two separate sessions of CHKDSK at the same time.  That is, the System Recovery Options dialog would let me keep clicking on the Command Prompt option to open additional windows.  (I used Alt-Tab to switch between them.)  So I was running CHKDSK /R in each of two separate command windows.  I had one session working on the partitions on the first drive, and the other session working on the partitions on the second drive.  I figured they were independent of each other.  I had done this before without a problem, but only once or twice.  This time, the problem had emerged only in the second command window.

Was that the cause of the problem?  It seemed that I'd have to wait until the next time I ran CHKDSK /R to see if I got the same issue again.  At present, the solution seemed to be that, if I got that weird crashing in the first stage of disk checking, or if a partition that had just passed CHKDSK was now being reported as corrupt, I should just reboot and take another look, using either GParted or the Windows 7 DVD.