Monday, January 3, 2011

How to stop a CHKDSK at boot time

Scenario - A Windows platform is starting a CHKDSK at boot time and if you interrupt it, it tries again the next time you boot.

Well, the first thing is - do you really want to stop it? Its running CHKDSK for a reason, it is strongly advisable to allow it to complete. Be prepared! On a server that could be a long time. I server with millions of files could well take 8, 12, 24 even 48 hours to complete. If you really want to interrupt it and prevent it from running, there is a way. This is achieved using the command line tool CHKNTFS. In it's simplest form CHKNTFS will tell you the state of the 'dirty flag' this is the flag that you have set if you are in this situation. It can get set a number of ways and it is a reliable measure if whether something is wrong with the NTFS table of a drive.

CHKNTFS D:

Will give you the status of the drive.

Now, there is no way to reset that flag other than by allowing a CHKDSK to complete, but you can mark a drive so that it will not run a CHKDSK even if the flag is set. (That's an important difference). Here is an example for the syntax:

CHKDSK D: /x

The rest of the functionality is easy to pickup using /? for help

Cheers!

No comments:

Post a Comment