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

ID: Q218461


The information in this article applies to:
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server


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:
Q191603 Modifying the Autochk.exe Time-out Value
For additional information about Chkntfs, please see the following article in the Microsoft Knowledge Base:
Q160963 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:

Registry value Function
/P \??\Volume: Schedules an unconditional Chkdsk against the volume.
/p \??\VOLUME{GUID} Schedules an unconditional Chkdsk against a volume mount point.
/k:Volume * Excludes Chkdsk from running against the volume.
/m \??\Volume: Tells Autochk to look only at the dirty bit on the volume, and if set, run Chkdsk.


Sample command Resulting registry entry
Chkdsk C: /F Autocheck autochk /p \??\C:
Chkdsk C:\mountpoint /F Autocheck autochk /p \??\VOLUME{GUID}
Chkntfs D: E: /X Autocheck autochk /k:D /k:E *
Chkntfs G: /C Autocheck autochk /m \??\G:


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:
Q176970 Chkdsk /f Does Not Run on the Shared Cluster Disk

Additional query words:

Keywords : kbtool
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: December 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.