CHKDSK /F /R to repair file system corruption
The integrity of files on a hard drive is an important component of a stable computer system. The appearance of various errors in the files and file structure, violation of the logical structure of the disk, the occurrence of bad sectors on the disk leads to incorrect PC operation, system malfunctions, glitches and freezes. To prevent such problems in the operating system, starting with the archaic MS DOS and ending with modern versions of Windows 10, a special tool is provided to check and restore the integrity of the file system, deal with logical and physical errors on the disk. We are talking about the CHKDSK system utility, and in this article I will tell you what this utility is, what it is for, and how the CHKDSK / F / R command can help to restore files on your PC.
What is CHKDSK?
CHKDSK(short for English “check disk” – check disk)is a system tool designed to check the hard disk for logical errors, bad sectors (bad sector), as well as fix the problems it finds.
The CHKDSK functionality allows you to restore the logical structure of a disk, including correcting incorrect MFT (master file table) entry points. When bad sectors are found, which come in two main forms – “soft” (appear when data was written incorrectly) and “hard” (bad sectors arose due to physical damage to the disk), CHKDKS usually restores “soft” bad sectors, and marks “hard” in such a way that they cannot be further used by the system.
The operation of this utility can take quite a long time, and for its operation, CHKDSK requires mandatory exclusive rights to write the disk. Therefore, if you, while in the Windows OS, want to check the system disk (usually C) using this tool, the system will prompt you to restart the computer, and, at the next start, CHKDSK will receive extended rights, and then it will check your disk for errors .
Functionality of the CHKDSK command
There are two main forms of activating this utility that allow you to run chkdsk:
- Activation in the standard way. Click on “My Computer”, select the desired disk to check, hover over it, and click the right mouse button. In the menu that appears, select “Properties”, go to the “Service” tab and click on “Perform verification” at the top.
- In the window that appears, check the boxes next to the two options available, and then click on “OK”.
- If the disk is not a system disk, then the check will be carried out immediately, but if the disk is a system one, then the computer will schedule a check of this disk, and upon subsequent reboot, your disk will be checked by the CHKDSK functionality;
- Command line activation. Launch command prompt as administrator, 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 name of the volume, /F and /R are the flags to use.
The command I gave starts CHKDSK, instructing the latter to check disk C for bad sectors and restore the data on them (the/F flagobliges CHKDSK to fix errors on the disk,the /R flagobliges CHDSK to look for bad sectors on the disk and try to recover data on them).
- Other flags (commands) for CHKDSK are:
- /V– during the check of the FAT/FAT32 file system, shows the path to the files on the disk and their names;
- /X– preliminary disabling of the volume (mandatory activation of the /F flag is required);
- /I– disables thorough check of indexes. Used only in the NTFS file system, allows you to speed up the disk check;
- /C– disables checking for cycles inside folders. Used only in NTFS, also allows you to speed up the check;
- /L:(size in kilobytes)– change the size of the log file to the specified size (only NTFS);
- /B– re-check of damaged disk clusters (only NTFS, requires the mandatory presence of the /R key)
If you simply enter the “CHKDSK” command (without quotes) on the command line, then the CHKDSK / F / R utility to get rid of bad sectors on the disk will scan your disk for errors in the “read only” mode, in no way correcting them.