Monday, May 3, 2010

Checkdisk, and why it's a pain

Checkdisk, also known as chkdsk, is a Windows tool that scans your hard drive and checks for, and attempts to fix, problems with it. Generally speaking it can only be run after you restart, since it requires exclusive access to the drive in question.

The main way people use tend to use chkdsk is to right click on the drive in Windows Explorer, go to Tools and then click the button for Error checking. This will schedule a chkdsk for the next time your computer starts.

The problem with this is what happens when something goes wrong. For example, my computer was suffering from freezes that I suspected were related to my accidentally pulling out the power cord when plugging my external hard drive (ironically to back up my stuff).

Upon restart, it performs a chkdsk. When that finishes after several hours, it blue screens. When it restarts, it does a chkdsk again.

See the problem? If a chkdsk isn't completed successfully the drive stays "dirty", indicating that a chkdsk should be run on the next startup. This continues only a chkdsk succesfully completes, which is likely to be never unless you do something about it.

This is why you should do chkdsk from a safe mode command prompt so that if something goes wrong, you don't get into an infinite loop of chkdsk.

I can't boot into safe mode with command prompt, but that's another problem...

You also can't cancel a chkdsk that's already in progress short of restarting. Ctrl-c doesn't work.

No comments:

Post a Comment