Checking disk integrity. CHKDSK - checking the hard drive for errors Results of chkdsk windows 7

CHKDSK used to scan disks and display reports on scan results. Command line format:

CHKDSK [volume:[[path]filename]] ]

Volume Specifies the mount point, volume name, or drive letter of the drive being checked, followed by a colon.

file name Files checked for fragmentation (FAT/FAT32 only).

/F Correcting disk errors.

/V Detailed mode output. For FAT/FAT32: Displays the full path and name for each file on this drive. For NTFS: also displays cleanup messages.

/R Search for bad sectors and restore their contents. (requires key /F).

/L:size For NTFS only: Changes the log file size to the specified size (in KB). If a size is not specified, the current size value is displayed.

/X If necessary, forced shutdown volumes All open handles to this volume will be invalidated. (requires parameter /F).

/I NTFS only: Less strict checking of index elements.

/C NTFS only: Skip checking for loops within the folder structure.

Keys /I or /C reduce CHKDSK execution time by skipping some volume checks.

Examples of using:

CHKDSK- check the current disk (volume) in read-only mode

Sample report:

Type file system:NTFS.

Volume label: DISK_C.

ATTENTION! Parameter F is not specified.

CHKDSK runs in read-only mode.

Checking files (step 1 of 3)...
File verification is complete.
Checking indexes (step 2 of 3)...
The index check is completed.
Checking security descriptors (step 3 of 3)...
The security descriptor check has completed.
CHKDSK checks the USN log..
USN log check completed

488384000 KB total on disk.
482155688 KB in 332072 files.
108552 KB in 14989 indexes.
0 KB in bad sectors.
1120884 KB is in use by the system.
65536 KB are occupied by the log file.
4998876 KB free on disk.

Cluster size: 4096 bytes.
Total clusters on disk: 122096000.
1249719 clusters on disk.

CHKDSK D:/F- check the disk D: in error correction mode.

If in this mode checks CHKDSK cannot obtain exclusive access to the volume being checked, the program will prompt you to set the mode to automatically start testing the specified disk the next time the system is rebooted. The check will be performed by the Windows Session Manager service, in accordance with the contents of the registry key
HKLM\System\CurrentControlSet\Control\Session Manager\BootExecute
The scan results can be viewed in the system event log - (Control Panel - Administrative Tools - Event Viewer - Application) service notifications Winlogon. Presence of a sign that the CHKDSK program will run the next time booting Windows can be checked using the command CHKNTFS, a link to the description of which can also be found on the page with a list of commands CMD Windows. In addition, it can be used to change some testing parameters.

CHKDSK's work is divided into three main passes, during which CHKDSK checks all metadata on the volume, and an optional fourth pass. The term "metadata" means "data about data." Metadata is a layer on top of the file system that keeps track of information about all the files stored on a volume. The metadata contains information about the clusters that make up the data volume of a particular file, which clusters are free, which clusters contain bad sectors, etc. On the other hand, the data contained in the file is referred to as "user data". In NTFS, metadata is protected using a transaction log. The process of changing metadata is divided into certain logical stages, or transactions, which are recorded in a log. If the sequence of actions to change metadata is not logically completed, then a rollback is performed using the transaction log data to the moment when this change has not yet been started. In other words, using a transaction log greatly increases the likelihood of metadata integrity.

This method is not used to protect user data (not metadata) in the NTFS file system.

Stage 1. Checking files

During the first pass, CHKDSK displays a message indicating that files are being scanned and the amount of file scans performed, expressed as a percentage (0 to 100). During this phase, CHKDSK checks the record segment of each file in the master file table ( MFT) volumes.

Stage 2. Checking indexes

Essentially, indexes are directories in the NTFS file system. CHKDSK checks that there are no "orphan" files and that all directory listings contain existing files. An orphaned file is a file for which a valid file record segment exists, but for which there is no data in any directory listing. A lost file can be recovered in its corresponding directory, if that directory still exists. If the corresponding directory no longer exists, CHKDSK creates a directory at the root of the disk and moves the file to it.

Step 3: Checking security descriptors

Security descriptors contain information about the owner of a file or directory, NTFS permissions for this file or directory, and about auditing for that file or directory. CHKDSK checks the structure of each security descriptor, but does not verify the actual existence of the listed users or groups or the validity of the permissions granted.

Stage 4. Checking sectors

This stage of CHKDSK execution is determined by the presence of the parameter /R when starting the program. Searches for bad sectors in volume free space. CHKDSK attempts to read every sector on the volume, and if an error is detected, the cluster that contains the sector is marked as bad and removed from the volume's logical structure. Even without using a key /R the program always reads the sectors related to the table MFT(to metadata). In addition, the sectors that are used for the user data area are checked in the previous stages of CHKDSK.

It is necessary to take into account the fact that the execution time of CHKDSK with the key /R may be significant. In addition, modern hard drives have a built-in self-test and parameter monitoring system (S.M.A.R.T), the presence of which makes it pointless to use the search mode for bad sectors using CHKDSK, since all modern drives constantly perform internal routines for monitoring technical condition and self-diagnosis, as well as procedures built into the firmware for reassigning poorly readable sectors (unstable sectors) to sectors from the reserve area (remap or remap procedure). These processes occur invisible to the computer user. Therefore, the presence of Bad Blocks is possible only if there is no free space in the reserve area for reassignment, or if failures occur while writing data to the sector, for example, during an emergency shutdown of the primary power supply.

When lost files are detected, the program CHKDSK creates them in the file system structure as files with the extension .CHK. In practice, information from such files can be recovered manually only in cases where it is presented in text form. In some cases, you can use software third-party manufacturers, such as the utility

CHKDSK- standard application for check hard drive for errors, detecting bad sectors on the hard drive, correcting file system errors. The CHKDSK application (short for Check Disk) is built into the operating system Windows system.

The Chkdsk.exe program finds file system errors, bad sectors on the hard drive, and eliminates detected problems. If checking the disk for file system errors reveals problems, the CHKDSK check runs when the computer is turned on.

When using Chkdsk.exe in different versions Windows, there are some differences:

  • IN operating system The Windows XP utility chkdsk finds file system errors and repairs bad sectors on the disk.
  • In Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista With default settings, CHKDSK finds file system errors but does not fix them. To correct file system errors and check disk sectors, you must manually set certain parameters.

Problems with the Windows operating system affect its performance. File system errors occur in the following situations:

  • Due to a power outage - if the computer suddenly turns off, an unexpected system failure may occur (to prevent such situations, use a UPS - uninterruptible power supply).
  • If the system is infected with malware.
  • Due to a computer hardware malfunction.

Bad sectors may appear on the surface of the hard drive. When checking a disk using chkdsk, bad bad sectors of the hard disk are marked as damaged, and the system no longer reads or writes information from bad sectors of the disk. The system will try to recover data from damaged sectors (clusters, directories), if possible.

The chkdsk disk scan runs in two modes:

If your computer does not boot due to a problem, check HDD You can use the installation DVD with the Windows operating system. After booting from removable media, in the system recovery options, select the command line to run a disk error check.

In this tutorial, I will show you how to use the CHKDSK application using the Windows 10 operating system as an example.

CHKDSK check for file system troubleshooting in GUI

The easiest option for checking the file system for errors is to run the CHKDSK program in the graphical interface using system tools.

Follow these steps:

  1. Launch Explorer.
  2. Right-click on the local disk on which you want to scan.
  3. In the “Properties: Local disk (X:)” window, go to the “Tools” tab.
  4. In the “Check for errors” section, click on the “Check” button.
  1. In the “Checking errors (Local disk (X:))” window that opens, select “Check disk”, despite the fact that the operating system writes that no errors were found when checking the disk.

In Windows 7, additional scanning options are available; to launch them, you need to check the boxes next to the items:

  • Automatically fix system errors.
  • Check and repair bad sectors.
  1. The scanning process begins and will take some time. Checking time depends on size local disk and the amount of data on the disk.

When checking file system errors, the status is scanned:

  • The basic structure of the file system is checked.
  • File name connections are checked.
  • Security descriptors are checked.
  • The USN log is checked.
  1. After completing the verification process, information about its result will open. In this case, the disk was successfully scanned and no errors were detected. If errors are found, you will be asked to fix them.

For detailed information, click on the "Show Details" link.

In the Event Viewer window, click Details.

In the “Event Properties” window, in the “General” and “Details” tabs, detailed information about the result of the disk scan is available.

The information obtained about checking the disk for file system errors can be copied to Notepad or another text editor for further study.

How to run CHKDSK (check disk) on the command line

The chkdsk command to check a hard drive with the specified parameters is executed from the command line:

  1. Run Command Prompt as Administrator. Read How to Find the Command Prompt in Windows
  2. To check the system partition (system drive) in the command line interpreter window, enter the command:
chkdsk c: /f
  1. Press the "Enter" key.
  2. A message appears in the Command Prompt window stating that the CHKDSK command cannot be run because specified volume used system process. To start checking the system disk after rebooting the system, press the “Y” key and then press the “Enter” key.
  3. During system reboot will be tested and restoring the system disk.

A sample command template looks like this: ["chkdsk" (application name)], space, [drive letter of the drive being checked followed by a colon ("c:", "d:", "f:", etc.), path, or filename], space, [command options].

Command parameters have the following meanings:

  • /F - checks the file system and automatically corrects errors found.
  • /R - search for bad sectors on the disk, restore the contents (the command requires the /F key, example: “chkdsk C: /F /R”).
  • /V - displays full file paths, displays file names on the disk, in the NTFS file system - displays cleaning messages.
  • /X - disconnect the disk before checking, descriptors of this disk will not be checked (the mandatory /F key must be set, example command: “chkdsk C: /F /X”).
  • /I - Performs a less stringent check of index items; CHKDSK performs a faster but less thorough check.
  • /C - skips checking cycles within the folder structure.
  • /L: size - Changes the log size to a value specified in kilobytes.
  • /B - reset the scan results, re-check previously found damaged ones sectors of hard disk (the /R key is required, example command: “chkdsk C: /F /R /B”).

In most cases, to check the file system and eliminate bad sectors on the hard drive, it is enough to use the “F” and “R” flags.

How to disable disk check in CHKDSK when Windows boots

In some cases, disk check runs when you turn on the computer, before loading the Windows operating system. In most cases, you need to wait until the check is completed; a restart will not follow.

Constantly checking the disk every time the system starts, indicates the presence of problems and the need to eliminate them. You may need to consider replacing your hard drive. There are programs, for example, that constantly monitor the status of computer disks.

To disable Chkdsk from starting when Windows boots, you can use 2 methods: changing values ​​in the operating system registry, or using the command line.

Disable Disk Check in command line:

  1. Run Command Prompt as Administrator.
  2. In the command line interpreter window, enter the command (“C:” is the name of the drive on which you want to disable the startup of Check Disk when the system boots), and then press the “Enter” key:
chkntfs /x with:
  • If you need to disable scanning on several drives, add the corresponding drive letters to the command separated by spaces, for example, “chkntfs /x c: d:”.
  • Using the command “chkntfs /d” you can return the original settings.

You can disable automatic disk check when loading the operating system in the following way:

  1. Launch Registry Editor (type “regedit” in the search field, run the command).
  2. Follow the path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
  1. Click on the “Session Manager” option.
  2. Find the “BootExecute” parameter, left-click on it.
  3. The Edit Multiline window displays the default value.

  1. To disable disk check during Windows startup, before the asterisk add the parameter:
autocheck autochk /k:C *
  1. To disable scanning on multiple partitions, add drive letters separated by a space. Example for drives “C:” and “D:”:
autocheck autochk /k:C /k:D *

Conclusions of the article

The CHKDSK system application, built into the Windows operating system, is used to check the file system for errors and to detect bad sectors on the computer's hard drive. Using the utility, you can fix system errors and eliminate the negative impact (disable writing and reading) on ​​the system due to the presence of bad sectors of the hard drive.

Check Disk Utility (Chkdsk.exe) used to check the disk for errors and bad sectors. This command utility Windows strings checks the integrity of both basic and dynamic disks. It is used to check and correct errors detected on NTFS volumes and older formats such as FAT, FAT32.

Check Disk able to find and correct many types of errors. The utility primarily looks for inconsistencies in the file system and associated metadata. One of the ways that Check Disk finds errors is by comparing the volume's bitmap to the disk sectors assigned to the files.

Many users have a question - How to run CHKDSK? To do this you need:

CHKDSK Command Options

CHKDSK [volume[[path]filename]] ] , where

  • Volume- Specifies the mount point, volume name, or drive letter of the drive being checked, followed by a colon.
  • file name- Files checked for fragmentation (FAT/FAT32 only).
  • /F- Correction of errors on the disk.
  • /V- For FAT/FAT32: display the full path and name of each file on the disk. For NTFS: display cleanup messages (if any).
  • /R- Search for bad sectors and restore surviving contents (requires /F).
  • /L:size- NTFS only: Set the log file size (in KB). If a size is not specified, the current size value is displayed.
  • /X- Preliminary shutdown of the volume (if necessary). All open handles to this volume will be invalidated (requires /F)
  • /I- NTFS only: less strict checking of index entries.
  • /C- NTFS only: skip checking for loops within the folder structure.
  • /B- NTFS only: re-evaluate bad clusters on disk (requires /R)
  • The /I or /C options reduce Chkdsk execution time by skipping some volume checks.

An example of disk analysis without Chkdsk error correction

You can check the integrity of the drive by entering the command name and the drive letter followed by a colon. For example, to check the integrity of drive C, enter:

If the index check finds lost files, Check Disk will restore them as they are. Typically, recovered files are stored with a .chk extension in the root directory of the corresponding drive. Finally, Check Disk displays a report telling you whether free space was incorrectly marked as in use and, if so, recommending that you correct the error by running Check Disk with /F key.

Example of fixing disk errors using Chkdsk

By analyzing the disk, you check it, but you don't actually fix anything. To check the disk and fix any detected problems, you need to specify the /f switch, after which Check Disk will search for and fix errors:

  • chkdsk /f From:

Check Disk cannot recover volumes that are in use. If the volume is in use, Check Disk asks if you want the volume to be checked the next time you boot your computer. Key /R specifies the search for bad disk sectors and restoration of readable information, and key /X- forced shutdown of an NTFS volume if necessary.

Check Disk may display more than detailed information about the progress of the check using key /V. For NTFS volumes, you can limit index checking by setting key /I, and skip checking for loops inside folder structures by specifying key /C.

The integrity of files on a hard drive is an important component of a stable computer system. The appearance of various errors in files and the file structure, violation of the logical structure of the disk, occurrence on the disk bad sectors leads to incorrect operation of the PC, system failures, glitches and freezes. To prevent such problems in the operating system, from archaic MS DOS to modern versions of Windows 10, there is a special tool designed to check and restore the integrity of the file system and deal with logical and physical errors on the disk. We are talking about the CHKDSK system utility, and in this material I will tell you what this utility is, what it is intended for, and how the CHKDSK /F /R command can help to repair file system damage on your PC.

Use CHKDSK /F /R to repair file system corruption

What is CHKDSK?

CHKDSK (short for “check disk” - disk check) is a system tool designed to check a hard drive for logical errors, bad sectors, and also correct the problems it finds.

CHKDSK functionality allows you to restore the logical structure of a disk, including correcting incorrect MFT (master file table) entry points. In the case of bad sectors, which come in two main forms - “soft” (appears when data was written incorrectly) and “hard” (bad sectors caused by physical damage to the disk), CHKDKS usually repairs “soft” bad sectors, and marks “hard” in such a way that they cannot be further used by the system.

The work of this utility can take quite a long time, and for its work, CHKDSK requires exclusive rights to write the disc. Therefore, if you, being in Windows OS, want to check system disk(usually C) using this tool, the system will prompt you to restart your computer, and upon next startup, CHKDSK will receive extended rights and then check your disk for errors.

Functionality of the CHKDSK command

There are two main forms of activation of this utility that allow you to run chkdsk:

Check the required boxes and click “Ok”
  • If the disk is not a system one, then the check will be carried out immediately, but if the disk is a system one, then the computer will schedule a scan of this disk, and upon subsequent reboot, your disk will be checked with the CHKDSK functionality;
  • Activation via command line. Run a command prompt as administrator and enter:

CHKDSK (volume name) / (flag)

For example, a commonly used form of activating CHKDKS is the command:

CHKDSK C: /F /R

where C: is the volume name, /F and /R are the flags used.

The command I gave runs CHKDSK, instructing the latter to check drive C for damaged sectors and restore the data on them ( flag /F forces CHKDSK to correct errors on the disk, /R flag forces CHDSK to search for damaged sectors on the disk and try to recover data on them).


Other CHKDSK flags (commands) are:

  • /V– while checking the FAT/FAT32 file system, shows the path to the files on the disk and their names;
  • /X– preliminary disabling of the volume (the /F flag must be enabled);
  • /I– disables thorough checking of indexes. Used only in the NTFS file system, it allows you to speed up disk scanning;
  • /C- disables checking cycles inside folders. Used only in NTFS, it also allows you to speed up scanning;
  • /L:(size in kilobytes)– changing the log file size to the specified size (NTFS only);
  • /B– re-checking damaged disk clusters (NTFS only, requires the /R key)

If you simply enter the command “CHKDSK” (without quotes) at the command line, then the “CHKDSK /F /R to repair file system corruption” utility will scan your disk for errors in “read only” mode, not at all correcting them.

Conclusion

Using the CHKDSK /F /R command at the command line as an administrator allows you to correct logical errors on the disk, as well as search for bad sectors on the disk and try to restore them. Use CHKDSK at the slightest suspicion of damage to the file system, its functionality, as well as functionality system utility SCANNOW is a useful tool in the hands of an experienced PC user.

Internet