• The /i
  • Autochk
  • Prevent Autochk from Running
  • Using the /c and /i Command-Line Switches to Run an Abbreviated Chkdsk

    Download 191.2 Kb.
    Hajmi191.2 Kb.
    1   2   3   4   5   6   7   8   9   10

    Using the /c and /i Command-Line Switches to Run an Abbreviated Chkdsk

    The /c Command-Line Switch

    The /c option (NTFS only) directs Chkdsk to skip the checks that detect cycles in the directory structure. Cycles are a rare form of corruption in which a subfolder points back to itself as its root folder.

    Using the /c option can speed up Chkdsk by about 1 to 2 percent, but using this option can also leave directory “loops” on an NTFS volume where one folder points back to itself. Such loops might be inaccessible from the rest of the directory tree, and some files might be orphaned in the sense that Win32 programs, including backup programs, cannot see the files.

    The following Chkdsk /c example runs an abbreviated Chkdsk on drive D and skips the checking of cycles within the folder:

    chkdsk d: /c

    The /i Command-Line Switch

    The /i option directs Chkdsk to skip the checks that compare directory entries to their corresponding file record segments. When you use this option, directory entries are still checked for internal consistency. However, the directory entries are not necessarily consistent with the data that is stored in the corresponding file record segments.

    How much time you save by using the /i command-line switch is difficult to predict. Typically, the /i option reduces Chkdsk times by 50 to 70 percent, depending on factors such as the ratio of files to directories and the speed of disk I/O relative to the CPU speed.

    Using the /i command-line switch has these limitations:

    • You may have directory entries that refer to incorrect file record segments. In this case, any program that tries to use such an entry will encounter errors.

    • You may have file record segments that are not referred to by a directory entry (another way that orphaned files occur). Therefore, some Win32 programs, including backup programs, may not be able to see a file that is actually intact, as represented by the file record segment.

    Note For more information about the /c and /i command-line switches, see the following Microsoft Knowledge Base articles:

    187941 “An Explanation of CHKDSK and the New /C and /I Switches (Windows 2000 and Windows NT 4.0)”

    314835 “An Explanation of the New /C and /I Switches That Are Available to Use with Chkdsk.exe (Windows XP)”


    Every time Windows 2000 starts up, Autochk.exe is called by the Kernel to scan all volumes and check whether any volume’s dirty bit is set. If the dirty bit is set, Autochk immediately runs chkdsk /f on that volume to verify file system integrity and try to fix any problems with the volume.

    The dirty bit is a byte on the physical disk that is stored in the $volume metadata file in the MFT. There is no way to manually clear the dirty bit after it has been set from an unclean shutdown and prevent Autochk from running, other than to run Chkdsk in repair mode.

    Autochk 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). It then writes an associated message in the Application event log. It does this by looking at 1) the dirty bit on each volume, and 2) for registry settings set by either the chkdsk /f command and the chkntfs /x command or the chkntfs /c command to determine whether a volume will be checked or skipped.

    Note Using chkdsk /f or chkntfs /c to schedule a Chkdsk against a volume and using chkntfs /x to exclude a volume from being checked override each other. This gives you complete control over whether Chkdsk is run against a particular volume unconditionally, conditionally, or not at all during the startup process. The last command that you issue sets or resets the registry entries accordingly.

    If you schedule Chkdsk to run the next time the system starts, Chkdsk does not set the dirty bit on an in-use volume to check the volume during the next start-up process. Instead, Chkdsk sets a registry entry to tell Autochk to run against that volume. The dirty bit is only set by the file system when it detects a problem.

    If you schedule Chkdsk to run during the start-up process against a volume, and during the startup process, you decide to bypass Autochk by pressing any key, Autochk does not run against that volume, and it removes the registry entry so that Autochk is no longer scheduled to run against that volume in the future. In certain situations, it may be helpful to bypass running this Chkdsk.

    To change the length of time that Windows waits before running Autochk so that you have enough time to bypass running it by pressing any key, locate the following registry subkey:

    \Session Manager \AutoChkTimeOut

    If the subkey does not exist, the default countdown of 10 seconds is used. If the subkey exists, and it is set to 0 seconds, there is no countdown. If it is set to more than three days (259,200 seconds), the default value is used.

    If Autochk runs against a volume during the start-up process, 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 that is 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.

    Note Volumes that are shared between server cluster nodes that run the Cluster service do not allow Autochk access to the volume during the start-up process. When the volumes are brought online, the Cluster service performs a function that is similar to running Chkntfs to see whether the dirty bit is set and to see whether the volume is dirty. If it is, the chkdsk /f command 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.

    Prevent Autochk from Running

    When you run the chkdsk /f /r command, Windows prompts you to state whether you want to schedule Chkdsk to run the next time the system is started. To prevent the chkdsk /f /r command from running, follow these steps:

    1. Start Registry Editor.

    2. Locate the following subkey:

    \Control\Session Manager

    1. Change the BootExecute entry from

    autocheck autochk * /p \??\C: autocheck autochk *

    to the following:

    autocheck autochk *

    If you scheduled Chkdsk for multiple volumes, there is an autocheck entry for each volume. Repeat steps 2 and 3 of this procedure for each volume that you do not want checked. If you want to determine which volumes will be checked during the next startup process, view the entries in the BootExecute registry key.

    Note “autocheck autochk *” is the default setting for Autochk and also the result of using the chkntfs /d command to have all volumes checked during the start-up process.

    Download 191.2 Kb.
    1   2   3   4   5   6   7   8   9   10

    Download 191.2 Kb.

    Bosh sahifa

        Bosh sahifa

    Using the /c and /i Command-Line Switches to Run an Abbreviated Chkdsk

    Download 191.2 Kb.