Thursday, November 19, 2009

Chkdsk keeps running every time I restart my computer

From a forum user;

Problem:

On XP pro 32 bit, I un-installed some programs, and now chkdsk runs every time I restart the computer.

Explanation:

Click below to see a long explanation

When you do a chkdsk and ask it to “/f” or “/r”, it should state that it needs to un-mount the drive to do a chkdsk unless it's in read-only mode (That means no /fixing or /repairing) - It asks you if you want to do it after reboot. If you say yes, it switches around the bootexecute value in your registry, under “HKLM\system\currentcontrolset\control\session manager”. (We’ll be getting back to the bootexecute value at the bottom of the article.)

This change (on the next reboot), calls a program just like chkdsk but that operates earlier in the boot-up and doesn't require windows be loaded. This module is called autochk.exe, and it is what's responsible for un-mounting and scanning the drive before you boot up. This also happens when a drive is found to be “dirty” by the system.

When you say "yes, do this on my next reboot" by typing “Y” and pressing enter when chkdsk asks you, you're basically 'marking' the drive as 'dirty' manually. This is what calls autochk.

(NOTE: Autochk, unlike chkdsk, can't write to the system logs directly because windows hasn't booted up yet, so it will instead wait until it's finished and write a log file to the root of the C: drive, which is then written into the application event logs by winlogon.exe - so if you want to see the resultant logs of an autochk scan, look in the error logs for any entries made by winlogon.exe)

The command (the context of which I'll research whilst I type this sentence... done!) to UN-mark the drive as "dirty" is "chkntfs":
So here's what you do...


Solution:


First, you need to open a command prompt with Administrative privileges.
-In xp, simply click the start menu, then RUN, then type "cmd" and hit enter.
-In Vista and 7, click the start menu, then type “cmd”. Right-click the icon at the top of the search field, and click “Run as Administrator”, then accept the user account control prompt.
Once you’ve got command prompt open, just type one of these commands (in bold, below) depending on what you’d like to do. (Click "Read more" for more information.)

Disclaimer

Neither Tim's Tech Tips [T3] n'or the representative you speak to directly, via e-mail or otherwise, are responsible for anything that happens to your computer or your data as a result of technical support. Any advice supplied and any action taken is at your own risk. Unless the tech support agent is negligent, or knowingly endangers your valuable data, you are solely responsible for any action taken.
...This is a free service, and you are fully entitled to a refund if it doesn't work...