Microsoft KB Archive/218461

= Description of Enhanced Chkdsk, Autochk, and Chkntfs Tools in Windows 2000 =

Article ID: 218461

Article Last Modified on 2/24/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Datacenter Server

-



This article was previously published under Q218461





SUMMARY
The Chkdsk.exe, Autochk.exe, and Chkntfs.exe tools are enhanced in Windows 2000 to allow administrators more precise control over when a file system check is performed on a volume.

Note that a volume is defined as a partition containing a file system that can be addressed using a drive letter/volume mount point or a Globally Unique Identifier (GUID).



MORE INFORMATION
Autochk.exe in Windows 2000 distinguishes between a volume check that has been manually scheduled and one that is automatically scheduled because the file system found the volume to be in a "dirty" state, and then write an appropriate message in the application event log.

The following list of enhancements included in Windows 2000 is not a complete list of all switches available for each tool. Chkdsk /F: If Chkdsk cannot lock the volume to run at the time of command execution, it presents the following dialog box before the prompt to schedule the command the next time the system restarts:

Chkdsk cannot run because the volume is in use by another process. Chkdsk may run if this volume is dismounted first. ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID. Would you like to force a dismount on this volume? (Y/N)

If the administrator schedules the command to run the next time the system restarts, Chkdsk does not set the "Dirty Bit" on an in-use volume in order to check the volume at the next boot. Instead, it sets a registry entry to tell Autochk to run against that volume. The "Dirty Bit" is set by the file system itself only if it detects a problem.

Chkdsk /X: A new command parameter that runs Chkdsk /F and forces a volume dismount to close open file handles on non-system volumes so it can be checked immediately. This eliminates the need of a potential reboot in order to perform the Chkdsk and repair the volume.

Chkntfs volume: Displays the file system type, the status of the file system dirty bit, and whether or not Chkdsk is manually scheduled to run against the volume at boot time.

Chkntfs /C: Schedules a volume to be checked at boot time (which it would do anyway if chkntfs /x had not been run against the volume previously). Chkdsk run only if the volume is found to be dirty.

Chkntfs /D: Restores the computer to default behavior and removes registry settings invoked by Chkdsk /F or Chkntfs /X. This means all drives are checked at boot time and Chkdsk is run against those found to be dirty.

Chkntfs /T:time: Changes the Autochk time-out value to the specified amount of time in seconds. If the time is not specified, displays the current settings. For additional information about this feature, please see the following article in the Microsoft Knowledge Base:

191603 Modifying the Autochk.exe Time-out Value

For additional information about Chkntfs, please see the following article in the Microsoft Knowledge Base:

160963 CHKNTFS.EXE: What You Can Use It For

Autochk: Looks both at the dirty bit on each volume and for registry settings set by Chkdsk /F and Chkntfs /X or /C to determine if a volume will be checked or skipped.

NOTE: Chkdsk /F or Chkntfs /C to schedule a Chkdsk against a volume and Chkntfs /X to exclude a volume from being checked override each other. This gives the administrator complete control over whether or not Chkdsk is run against a given volume unconditionally, conditionally, or not at all during boot. The last command issued sets/resets the registry entries accordingly.

If you schedule a Chkdsk to run at boot time against a volume, and at boot time decide to bypass Autochk by pressing any key, Autochk does not run against that volume and removes the registry entry so Autochk is no longer scheduled to run against that volume in the future.

When Autochk runs against a volume at boot time it records its output to a file called Bootex.log in the root of the volume being checked. The Winlogon service then moves the contents of each Bootex.log file to the Application Event log. One event log message for each volume checked is recorded as follows:

Event ID: 1001

Source: Winlogon

Description: This includes file system type; drive letter or GUID, and volume name or serial number to help determine what volume Chkdsk ran against.

Also included is whether Chkdsk ran because a user scheduled it or because the dirty bit was set.

The registry entries used by Autochk to determine which volumes get checked at boot time are:

Hkey_local_machine\System\CurrentControlSet\Control\Session Manager\ BootExecute:REG_MULTI_SZ: autocheck autochk *

NOTE: This is the default setting for Autochk and also the result of using Chkntfs /d to have all volumes checked at boot time.

Additional entries that can be found in BootExecute are:

Because Autochk can be controlled by setting or resetting registry settings, it is possible to programmatically schedule volumes for repair using Regini scripts.

NOTE: Volumes that are shared between server cluster nodes running the Cluster service do not allow access to the volume at boot time to Autochk.exe. When the volumes are brought online or moved from one node to another, the Cluster service checks to see if the volume is dirty. If it is, Chkdsk runs against the volume before being brought online. This does not check the BootExecute registry value so it does not take these values into account.

For information about running Chkdsk manually on a shared cluster disk, please see the following article in the Microsoft Knowledge Base:

176970 Chkdsk /f Does Not Run on the Shared Cluster Disk

Keywords: kbinfo KB218461

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.