Chkdsk on the command line. chkdsk options

If you encounter any problems with hard drive many immediately have a question about how to run chkdsk.

These problems can be very different - from banal braking, which cannot be fixed in any way, to complete failure downloads operating system.

The point is that this The best way solve everything possible problems with HDD or even SSD. Most experts advise using it in such situations.

We will look at all the really working methods that help you run the Windows HDD recovery tool.

Method number 1. With the help of "Computer"

This option assumes that your system is somehow booting, that is, there is no complete refusal to boot. Yes, it can slow down, reboot spontaneously from time to time, and so on, but you can still, albeit with attempts, still see the desktop and other elements of the system. If so, do this:

  • Open Computer.
  • On the main (system), and most often it is on C, right-click and select "Properties" in the drop-down menu.
  • In the window that opens, go to the "Service" tab at the top. In the "Verification" block, click on "Perform verification ...".
  • Next, a new window will appear, smaller. Check the boxes next to "Automatically fix system errors" and "Scan for and repair bad sectors." However, you don’t have to do this, but it’s better to check these boxes, since you won’t be able to correct all the errors yourself. Click the "Launch" button.

After that, it remains only to wait until the tool completes its main task.

In some cases, after performing all the above operations, another window appears with the text: “Windows cannot check which this moment is used."

This means that some kind of error has occurred (another one), or you do not have access rights to certain files. AT different versions operating system, this window may look different.

Without going into details, let's say that it will have the ability to click the "Yes" or "OK" button. So, you just need to do this and continue to quietly observe the work of the recovery tool.

Important! In some cases, you will need to restart your PC in order to continue. So if nothing happens after all the steps above, restart your PC or laptop. It happens that the computer will restart automatically. You shouldn't be afraid of this.

Method number 2. Using the Execution Window

In addition, the recovery tool in question can be launched using the standard execution of commands or programs, which is found in all Windows versions.

Tip: You can run programs by going to the Start menu and clicking Run. You can also do this by simultaneously pressing the "Win" and "R" buttons.

  1. Enter the command in the following format: "chkdsk [drive letter]: /[command]". That is, for example, to check C, you need to enter "chkdsk c: / f". The one that fixes errors on the disk ("/f") is used here. In addition, you can enter the following options:
  • /f - checking and automatic correction of errors;
  • /i - no analysis of the so-called index parts (if you don't know what you mean, don't use given parameter);
  • /v – display messages with scanned files (and their paths on the hard drive) along the way, as well as other messages about the progress of cleaning and analysis;
  • /c - no cycles inside folders (again, if you don't know what that means, don't take it);
  • /x - disconnect the disk before starting (the system will automatically check if this is necessary and perform the appropriate action);
  • / r - search for "broken" sectors and, of course, their automatic recovery;
  • /l:[size] – to change the file size, the size must be specified in kilobytes.

In most cases, it all comes down to typing a simple "chkdsk c: /f" command and clicking "OK".

  • After that, the verification process will begin. It looks like the one shown in Figure 5. All that's left to do here is wait until it's all over.

In newer versions, this process looks almost the same, but the interface is slightly different.

Again, after following the steps above, another one may appear stating that the drive "cannot be locked".

The meaning of this message comes down to the same as we talked about above - the disk is currently in use, which means that another failure has occurred or you do not have access to certain elements. In any case, here it remains to enter the command "Y" and press the "Enter" button.

Important! To use both methods, you must have administrator rights on the computer. The best way to do this is by opening cmd as administrator. In Windows 7 and below, there is a corresponding item in the Start menu - "Command Prompt (Administrator)". In later versions, in order to see this option, you must click on the Start menu or the Windows menu. In the line that opens, enter "net user Administrator / active: yes".

Method number 3. Using the Windows installation disc

This happens differently in different versions. In the very simple version already when the system boots from the installation file, several options appear, among which there is also the launch of an error correction program.

Here, for example, in Windows XP, you can simply press "R" and wait until the console starts. This is shown in Figure 8.

Hint: To see this menu, it is not enough just to insert the disk with the operating system, you also need to put the boot from it into the BIOS. How to do this, read the documentation for your PC. In the simplest case, you need to go to the "Boot" section and select the appropriate device next to the inscription "1st Boot Device".

After the console is launched, do the following:

Select the version of the operating system with which you will work, that is, enter its number and press "Enter" on the keyboard. If you have only one OS installed on your computer, just type "1" and press "Enter". In any case, below will be indicated full list systems installed on the PC. In our example, there is only one OS, so we enter "1" and press "Enter".

And then enter in the same format as we considered in the previous method, that is, "chkdsk [drive letter]: / [command]". The list is exactly the same. So enter this manual, press "Enter" and watch the progress.

In this case, the program may require an administrator password. If you have one, enter it.

If not, then you either don’t know that it is still there (since the program requires it), or it’s a glitch and you can just press “Enter” to continue.

In the first case, you will need to contact the person who installed the operating system or someone else who may know this same password.

Thanks to these simple method everyone can safely run the checker hard drive and watch him work.

One of the above methods is clearly shown in the video below.

CHKDSK is an internal utility routine of the Windows 7 operating system that is used to verify local disks that were created during hard disk defragmentation for errors in the selected file system (NTFS, FAT32). The name itself is an abbreviation of two English words"check" and "disk", which together are translated into Russian, as "check the disk". Not all users know how to run CHKDSK on Windows 7. Therefore, consider detailed instructions about how to do it.

Note that this subroutine allows not only to find, but also to fix the found errors of the file system. It can also repair bad sectors of the local disk. It can be launched in two different ways.

Directly via Computer

To run this subroutine in this way, you must do the following in order:

  1. It is necessary to double-click the left mouse button, hovering over, on the "Computer" icon on the desktop or through the "Start" menu:

  1. As a result of clicking, a dialog box will open, which will show the existing local drives, each of which can be checked using the subroutine in question:

  1. Next, move the cursor over it, click the left mouse button to select the disk. Then we right-click without removing the selection from the disk. As a result of clicking, the following context menu will appear:

  1. Next, in this menu, you must click on the "Properties" item:

  1. After clicking, a dialog box will appear in which you need to go to the "Service" tab and click the "Perform verification" button:

  1. On clicking, another dialog box will appear in which you can check the checkboxes in additional options disk check, and then click the "Start" button:

Note! If you are checking the local disk where Windows 7 is installed, then the check will start only at the next power-on or reboot, since all OS processes access this disk during operation.

As a result of the actions taken, the selected disk will be checked for errors, which will be corrected if the appropriate option is selected.

How to run CHKDSK from the command line?

To run a subroutine in this way, follow these steps in sequence:

  1. We go to the "Start" menu and in the "Search programs and files" field we type the string "cmd" on the keyboard (without quotes):

  1. As a result of the input, the corresponding service internal OS subroutine will be found:

  1. Next, right-click on the found subroutine and select "Run as administrator" from the menu that appears:

  1. At this step, the following functional window will be displayed on the monitor screen:

  1. In this dialog box, use the buttons on the keyboard to type the line " chkdsk c: /f” (without quotes), where c is the name of the local drive being checked, /f is a built-in command that initiates the elimination of found errors. After entering, press the "Enter" button on the computer keyboard:

  1. As a result of clicking, the corresponding process will start.

Note! If an OS is installed on the local disk being checked, the check will be interrupted and you will be prompted to perform it upon reboot. If the disk is normal, then the check will start and in this dialog box it will display the entire check process.

Crashes in Windows, emergency power off of the computer, experiments with software for managing disk space, the consequences of virus penetration - these and other problems can lead to the automatic launch of the regular Windows Chkdsk utility, designed to fix errors in the hard disk file system. Incorrectly completed work of the operating system with files leads to file system errors, and sometimes even to its damage.

In emergency cases, the Chkdsk utility itself turns on before Windows starts, scans disk partitions and fixes errors. However, the fact that there are problems with the file system may not make itself felt when normal use computer and only show up when you try to manage disk space. So, for example, when trying to reduce a disk partition using regular Windows tools, we can receive such a notification: “It is possible that the volume selected for compression is damaged. Use Chkdsk to troubleshoot, and then try shrinking the volume again."

In this case, the disk check does not start automatically. How to run Chkdsk manually in Windows 7, 8.1 and 10? How can I fix disk errors using Chkdsk if this particular problem caused the operating system to be unable to boot?

Inside Windows, the Chkdsk utility can be run in several ways.

1. Run Chkdsk using the Windows GUI

To run Chkdsk, in the system explorer on the C drive, right-click and open "Properties".

In the window that opens the properties of the disk partition, go to the "Service" tab, and in it click the "Check" button (or "Run a check" for Windows 7).

In versions of Windows 8.1 and 10, if everything is in order with the file system of the disk, in the window that appears next we will see a notification that verification is not required. But if you wish, you can start checking the disk with the Chkdsk utility by clicking "Check disk".

If the system suspects file system errors, this window will contain a button to start checking and repairing the disk.

For Chkdsk to work on drive C, you must restart your computer. You can do this immediately or postpone the start of the scan until the next reboot.

After restarting the computer, we will be able to observe the work of Chkdsk.

In Windows 7, running Chkdsk is a little different: in addition to the pre-installed automatic error correction option, you can add another possible option - checking and repairing bad sectors on your hard drive. When activating this option, it is worth considering that in this case, Chkdsk may take longer to complete.

As in the case of Windows 8.1 and 10, in version 7 the system drive C cannot be checked as part of a running operating system. To start the scan, you need to restart your computer. Click "Schedule disk check".

When checking a non-system disk partition, if it is used by some programs, the situation is simpler than with the system partition. In the window with a notification that the disk is currently in use, you just need to click the "Disable" button to, accordingly, disable this partition for the duration of the scan.

2. Run Chkdsk using the command line

To run Chkdsk using the command line, first, respectively, run the latter.

In the command line, enter the command by type:

In this command, instead of drive C, each time we substitute the letter of the desired partition on which verification is required. If Chkdsk is to check the system partition C, as with the graphical interface, a restart of the computer will be required. After the message appeared in command line about the impossibility of blocking the specified disk, you need to enter "Y", then restart the computer.

In addition to the /f option, which is responsible for fixing disk errors, Chkdsk can be run with the /r option, which is designed to search for bad sectors and restore data. As a result of Chkdsk's work with this parameter, hard disk clusters with unreadable sectors will be listed as damaged (bad blocks) with the transfer of their functions to the new cluster. Therefore, it is recommended to run Chkdsk with the /r option only when the usual error correction - running the utility with the /f option - did not bring the desired results. On the example of the same drive C, the command will look like this:

3. Run Chkdsk on unbootable Windows

If Windows freezes at a particular boot stage, one of the possible causes of this problem are file system errors. In this case, you need to run Chkdsk by booting from the rescue media. As such, you can use a regular installation media with Windows versions 7, 8.1 or 10. With it, we will run the Chkdsk utility inside the command line. At the first stage of starting the system installation process, press the command line launch keys - Shift + F10.

In the command line that opens, before running the Chkdsk command, you need to clarify which letters define the disk partitions. This is easy to do with notepad. I run it with the command:

Click the File menu, then Open.

In the explorer that opens, remember the new disk designations. As a rule, in Windows 8.1 and 10, the C partition (as it is inside the running operating system) is listed as D, since the letter C is given to the first technical partition of the system. And all other sections are offset by one letter of the alphabet.

Having decided on the letters of the disk partitions, close notepad, then, returning to the command line, enter a command of this type:

As with Chkdsk inside Windows, you must first try to fix disk errors by running the utility with the /f option. And only if the problem is not solved, only then we run the command with the / r parameter, as indicated in the previous paragraph of the article.

For cases of Windows inability to boot, you can pre-burn an emergency Live-disk with a selection of various tools to restore the operating system. Among these, for example, AdminPE based on WinPE. Its image for recording to a disk or flash drive can be downloaded from the official website of the project Adminpe.Ru. Using the AdminPE, you can launch a command line and enter the Chkdsk startup commands discussed above. But in this Live disk, the Chkdsk utility has its own interface and is launched using a script. The utility launch shortcut is placed directly on the desktop.

In the drop-down list for checking the disk, select the desired disk partition. Next, activate the checkboxes for recovering bad sectors and forcing the partition (volume) to shut down. I'm running a check.

Among the AdminPE tools are a number of other utilities for working with hard drives, as well as the well-known Hard Disk Sentinel and Victoria programs.

Consider a utility integrated into any Windows system that allows you to check HDD, for errors or bad bad sectors. In addition, the utility takes steps to troubleshoot, or blocks damaged sectors so that new information cannot get to them.

Why is the file system corrupted

There are several answers to this question:

  • power outages. Here it only remains to say that you must use stabilizers and uninterruptible power supplies;
  • problems in the "stuffing" of the computer;
  • the presence of malware that destroys the system.

Run chkdsk

For prevention, it is better to use chkdsk from time to time, checking the system for faults.

Method 1.

Go to " A computer", then right-click on the disk that will be checked, go to" Properties". Then there is the tab " Service”, where we mark “ Checking a Volume for Errors". Choose " Run a check».

Mark 2 checkboxes and click " Run».

Method 2.

To run the chkdsk program, you need a command line ( StartAll programs. Next select " Standard» and press « Command line"). This option is suitable for Windows XP, Vista or 7.

If you have Windows 8 or 10, search through the search menu.

The command line is launched.

After the window opens, type: chkdsk c: /f (or another option, more on that below). And press " Enter».

Let's explain:
c: is the drive letter to check.
/f - a parameter that allows you to fix errors in the file system and find bad sectors.

If you need to check the system partition, for example, drive C, where the operating system is located, a warning will appear that indicates that this volume cannot be checked now, because system files are currently running on it. To still run the scan, you need to reboot the system and click " Y' as confirmation.

When the system is rebooted, the utility will run in automatic mode and check the volume.

Verification steps

Directly checking using the utility in question goes in stages:

  • checks files;
  • checks indexes;
  • checks security descriptors;
  • checks sectors;
  • checks if there is free place on disk.

After the test is completed, its results will appear on the screen.

Utility Options

Consider all the utility launch keys. Chkdsk, in addition to being able to fully check the system (/R), does the following:

  • The /F switch checks for errors and fixes them automatically;
  • Key / V - during the check of the disk, it shows the full paths and names of the files that "lie" on the disk. For disks that contain NTFS partitions, the utility also displays messages that the cleaning has been done;
  • Switch / X - if necessary, the volume will be disconnected before checking it. Following this, all current descriptors for that volume will fail. In this case, the /F key must be used;
  • The /I switch is used if there is no need for strict checking of index components. Can only be used on the NTFS file system. This increases the speed of the check, but makes it less thorough;
  • The /C switch is used if there is no need to check for cycles in the folder structure itself. Works in the NTFS system, which increases the speed of the check, but it becomes less detailed;
  • Switch /L:size – when checking, the volume of the log file will be changed to the prescribed value (in kilobytes). If no size is specified, the current size of the file is displayed. Can only be used with the NTFS file system.

However, in most cases, it is enough to use the /F switch, because using /R starts a full check of the hard disk, which takes a lot of time (depending on the size and amount of data stored on it).

Displays a disk status report in a form that depends on the file system used. Team chkdsk also compiles a list of disk errors and fixes them. Command executed without parameters chkdsk displays information about the status of the current disk.

Syntax

chkdsk [volume: ][[way] File name] [/f] [/v] [/r] [/x] [/i] [/c] [/l[: the size]]

Options

volume : Specifies a drive letter (followed by a colon), a mount point, or a volume name. [ way] File name Specifies the location and name of a file, or the names of a set of files for which the command chkdsk check the degree of fragmentation. You can use wildcards (* and ?) to specify multiple files. /f Specifies disk error correction. The disk must be locked. If the disk is not locked with the command chkdsk, you will be prompted to check the disk the next time you restart your computer. /v Displays the names of files and directories to be checked. /r Detects bad sectors and restores the part of the data that can still be read. The disk must be locked. /x Use only with NTFS file system. Optionally initiates a volume unmount operation as the first action. All open disk handles will be invalid. Parameter /x includes also functionality parameter /f. /i Use only with NTFS file system. Performs a less thorough check of the index entries, which reduces the time it takes for the command to run chkdsk. /c Use only with NTFS file system. Skips checking for loops in the folder structure, which reduces the time it takes for the command to run chkdsk. /l[:the size] Use only with NTFS file system. Sets the specified log size. If the size is not specified, the parameter /l displays the current size. /? Display help on the command line.

Notes

  • Command execution chkdsk

    To execute a command chkdsk for hard drives, you must be a member of the Administrators group.

  • Checking for locked drives on reboot

    If you need to fix disk errors using the command chkdsk, files on this drive cannot be opened. Otherwise, the following error message is displayed:

    The Chkdsk command cannot be run because the specified volume is being used by another process. Should this volume be checked the next time the system is rebooted?

    If the user selects this option, the command chkdsk will check the disk and automatically fix errors when you restart your computer. If the disk partition being checked is bootable, the command chkdsk will automatically restart the computer after checking this disk.

  • error reporting

    Team chkdsk performs disk space and usage checks for File Allocation Table (FAT) and NTFS file systems. Team Chkdsk allows you to get a status report with information on each file system. The disk status report includes a list of found errors. If the team chkdsk started without parameter /f in the active partition, a message may be received indicating that serious mistakes because the drive cannot be locked. To search for errors command chkdsk needs to be run from time to time on each drive.

  • Error correction

    If the command line option is specified /f, program chkdsk fixes disk errors. At work chkdsk it must be possible to lock the disk for error correction. Since error correction usually changes the file allocation table and sometimes data is lost, the program chkdsk asks for confirmation in the following form:

    Lost clusters: 10; chains: 3.

    Convert lost cluster chains to files ?

    If you enter Y, Windows saves each orphaned chain in the root directory as a file with the format name File nnnn.chk. After completion of execution chkdsk you can check these files for the information you need. If you enter N, Windows fixes disk errors without saving data from lost blocks.

    If the command line option /f not used, program chkdsk only gives a message about the presence of errors in the file, but does not correct them.

    If the team chkdsk /f is running on a large disk (for example 70 GB) or the disk contains a large number of files (for example, several million), to terminate the program chkdsk may take a very long time (perhaps several days). During all this time, the computer will be inaccessible to users, as chkdsk does not return control until completion.

  • Checking disks with the FAT file system

    chkdsk about the status of a disk with the FAT file system in the following format:

    Serial number volumes: B1AF-AFBF

    72214528 bytes total on disk

    73728 bytes in 3 hidden files

    30720 bytes in 12 directories

    11493376 bytes in 386 user files

    61440 bytes in bad sectors

    60555264 bytes available on disk

    2048 bytes per cluster

    Total clusters on disk: 35261.

    29568 clusters per disk

  • Checking disks with the NTFS file system

    Windows system displays the program report chkdsk about the status of a disk with the NTFS file system in the following format:

    File system type: NTFS.

    Checking files...

    File verification completed.

    Checking indexes...

    Index check completed.

    Checking security descriptors...

    Verification of security descriptors is complete.

    12372 KB total on disk.

    3 KB in 1 user files.

    4217 KB is used by the system.

    8150 KB free on disk.

    Cluster size: 512 bytes.

    Total clusters on disk: 24745.

    16301 clusters per disk.

  • Usage chkdsk with open files

    If the parameter is specified /f, team chkdsk prints an error message if found on disk open files. If the parameter /f not specified and open files found on disk, chkdsk can display messages about lost blocks on the disk. This will happen if the open files are not yet recorded in the file allocation table. If the program chkdsk reports a large number of lost disk space blocks, disk repair should be considered.

  • Detect physical disk errors

    Use command line option /r to detect physical disk errors in the file system. For information about recovering physically damaged files using the command recover click the link.

  • Bad Sector Report

    Bad sectors reported by the command chkdsk, were marked when the disc was first formatted. Such sectors do not pose a threat.

  • General information about program exit codes

    The following table lists the exit codes that a program report might contain chkdsk after completion of its execution.

  • Team chkdsk with other options is available in the recovery console.

Examples

If you want to check the drive in drive D and fix any errors found in Windows, type the following command:

If an error is found, program execution chkdsk is paused and appropriate messages are displayed. Upon completion of the command chkdsk displays a report containing information about current state disk. Until completion of work chkdsk You cannot open any files on the specified drive.

To check the fragmentation of all files in the current directory on a FAT disk, enter the following command:

Chkdsk will print a disk status report, followed by a list of fragmented files that match the command pattern.

For questions, discussions, comments, suggestions, etc., you can use the forum section of this site (registration required).