Disk fix via command line. Use command line to repair hard disk

How long does Windows take to boot?   Sometimes it seems that it takes forever. There are several methods to speed up the system boot, but perhaps the problem is that your computer performs the CHKDSK function on every boot.

Did you notice a filling strip while waiting? Does she appear often? Have you ever wanted to know what it is, why it happens and whether Windows really needs to do it? Read this article and we will answer all these questions together.

If you are not sure which disk you have installed, check whether it is a solid-state disk ( SSD) or hard disk ( HDD). If you have an SSD on your computer, you can still use Check Disk, but you do not need to run a check with the flag / r. There are some differences between SSD and HDD, in particular, SSD has no moving parts.


SSD not included physical disktherefore, it does not need to be checked with the chkdsk c: / r command. However, Windows uses the same file system on both the SSD and HDD, so you can fix the errors file system   with chkdsk c: / f. Except for this, there is no need for Check Disk.

In Windows 7 and earlier versions, verification may take some time. Maybe an hour, and sometimes a whole day or even more, so make sure you have free time. Do not interrupt the work Check Disk after it started.

To start the utility, click on the Start button. In the search bar, enter " command line". It should appear in the search results. Click on the command line with the right mouse button and select "".

After the window appears on the screen command lineenter command

and click Enter. Thanks to the / r flag, the program will try to recover information from bad sectors, as well as fix all errors on the disk, so you do not need the / f flag.

The command line will tell you that it cannot perform this action, as the specified volume is currently in use. She will then ask if you want to schedule a volume check for the next download. Enter Y   and press Enter, to schedule Check Disk with error correction.


Restart the computer and wait for the utility to do its job. After the check is completed, all errors should be corrected, and Check Disk will no longer run at boot, unless, of course, there are other problems.

Windows 8 deals with such problems in a more efficient way. The file system constantly checks itself for errors. Errors that do not require shutting down the disk are corrected immediately. Correction of other errors, which can be performed only at boot, is planned for the next system startup.

Since the system needs to correct only those errors that require a disk shutdown, the Check Disk does its work in a few seconds or minutes. To do this, click Start. Enter “ cmd"In the search for programs and files. The top search result will be cmd.exe. Right-click on the row and select “ Run as administrator».

To make sure all other problems are found and resolved, first run the disk check by running the command

chkdsk C: / scan

and pressing the key Enter. During the scan, the utility will fix everything that does not require disconnecting the disk. After verification is complete, enter the command

chkdsk C: / spotfix

and press Enter. You will see a text indicating that the volume is occupied by another process. Then the command line asks if you want to schedule a disk check for the next system boot. Enter Y   and press Enterto schedule Check Disk. Now reboot your computer.

This time, the Check Disk will start and correct any errors detected during the scan. And since the utility only needs to correct the errors that require shutting down the disk, it will take only a few seconds or minutes.


Now your file system should be all right. Check Disk will no longer start when you turn on the computer, if there are no other problems.

Check if it helped

After Check Disk is completed, there is only one way to check whether the utility has completed its task — restart the computer. Let's hope that the program will not start anymore, and you can continue your work. If Check Disk continues to run, you may have more serious problems with the file system, or errors related to the registry or the operating system itself. You should consider a system restore or full option. reinstall windows. Maybe it's time to change the hard drive. Of course, this is an extreme measure, but it definitely solved your problems.

Did this article help you fix problems? Have you found other ways to stop Check Disk on every boot? Maybe you have any questions? Share them in the comments and we can help each other.

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

Syntax

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

Options

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

Notes

  • Command execution chkdsk

    To execute the command chkdsk   for hard drivesYou must be a member of the Administrators group.

  • Check locked discs on reboot

    If you need to fix disk errors with the command chkdsk, cannot open files on this disk. Otherwise, the following error message is displayed:

    The Chkdsk command cannot be executed because the specified volume is being used by another process. Should I check this volume on the next reboot?

    If the user selects this option, the command chkdsk   will check the disk and automatically correct errors when you restart the computer. If the disk partition to be scanned is bootable, the command chkdsk   will automatically restart the computer after checking this disk.

  • error reporting

    Team chkdsk   performs a check disk space   and its use for file systems file allocation table (FAT) and NTFS. Team Chkdsk   Allows you to get a status report with information for each file system. The disk status report includes a list of errors found. If a team chkdsk   running without parameter / f   in the active partition, a serious error message may be received, since the disk cannot be locked. To find errors team chkdsk   need to run from time to time on each disk.

  • Error correction

    If command line option is specified / fthe program chkdsk   fixes disk errors. When working chkdsk   it should be possible to block the disk to correct errors. 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 lost chain in the root directory as a file with the format name File nnnn.chk. After completion chkdsk    You can check these files for necessary information. If you enter N, Windows corrects errors on the disk without saving data from the lost blocks.

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

    If a team chkdsk / f   running on a large disk (for example, 70 GB) or a disk contains a large number of files (for example, several millions), to close the program chkdsk   it may take a lot of time (maybe several days). During this time, the computer will be unavailable to users, since chkdsk   does not return control until shutdown.

  • Checking disks with the FAT file system

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

    Volume Serial Number: B1AF-AFBF

    72214528 bytes in total on a disk

    73728 bytes in 3 hidden files

    30,720 bytes in 12 directories

    11493376 bytes in 386 user files

    61440 bytes to bad sectors

    60555264 bytes available on disk

    2048 bytes in each cluster

    Total clusters on disk: 35,261.

    29568 clusters on disk

  • Checking drives with the NTFS file system

    Windows system   displays the program report chkdsk   about the state of the NTFS disk in the following format:

    File System Type: NTFS.

    Checking files ...

    File verification complete.

    Checking indexes ...

    Inspection check completed.

    Checking security descriptors ...

    Check security descriptors complete.

    12372 KB in total on the disk.

    3 KB in 1 user files.

    4217 KB used by the system.

    8150 KB free disk space.

    Cluster size: 512 bytes.

    Total clusters on disk: 24745.

    16301 clusters on disk.

  • Using chkdsk   with open files

    If the parameter is specified / f, team chkdsk   displays error message if found on disk open files. If the parameter / f   is not specified and open files are found on the disk, chkdsk   may display messages about lost blocks on disk. This will occur when open files have not yet been recorded in the file allocation table. If the program chkdsk   reports a large number of lost disk space blocks, should be considered the possibility of repairing the disk.

  • Physical disk error detection

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

  • Bad Disk Sector Report

    Bad sectors reported by the team chkdsk, were marked at the first formatting of the disk. Such sectors are not dangerous.

  • Understanding Program Termination Codes

    The following table lists the completion codes that may be contained in the program report. chkdsk   after the end of its implementation.

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

Examples

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

If an error is found, program execution chkdsk   pauses and displays the corresponding messages. At the end of the command chkdsk   A report containing the current status of the disk is displayed on the screen. Before completion chkdsk    You cannot open any files on the specified disk.

To verify the fragmentation of all files in the current directory on a disk with the FAT file system, enter the following command:

Chkdsk   displays a report on the status of the disk, and then 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 is required).

This article is written so that each user understands what needs to be done when a hard disk with important data unexpectedly refuses to work. Many will immediately recall the described successful cases with freezing. hard drive. We will not argue, perhaps this method   and works, we have not tried it. But we would not recommend that you conduct such experiments with hard drive, which contains really important data that needs to be restored.

Even in Windows 10, the CHKDSK command is launched using the Command Line, but you must use administrator privileges to access it correctly. To launch the Command Prompt as an Administrator, press the key combination Windows + X and select the required menu item. Also, this menu can be opened by right-clicking on the Start menu.

The User Account Control window opens, asking for permission to run the Command Line on behalf of the Administrator. Click "Yes" and the Command Line window will open. To ensure that you are granted Administrator rights, you can read the name of the window that opens: "Administrator: Command Line".



On the Command Line, enter the “chkdsk” command, then the drive letter that you want to check or restore. In our case it is internal drive   "WITH".


Normally running the CHKDSK command in Windows 10 will simply show the status of the disk and will not fix any partition errors. In order for the team to correct errors on the disk, you must set its corresponding parameters. After the drive letter, type the following parameters, each a space after the previous one: / f / r / x.

The / f parameter instructs the CHKDSK command to correct all found errors; / r - find broken (bad) sectors on the disk and restore readable information; / x - stops the disk before the process starts. For more specialized tasks there are also additional parameters.

To summarize, the command to be entered on the Command Line is as follows:

chkdsk

In our case, it will look like this:



Please note that CHKDSK should be able to lock the disk, that is, it should not be used to check the system load while it is running. If a drive needed   is external or not boot disk, the CHKDSK process will start immediately after the command is run. But if it is bootable, the system will ask about the need to run the command before the next boot. Select Yes (or Y) and restart the computer and the command will start before the operating system starts, having received full access   to disk.

Executing the CHKDSK command may take some time, especially if you check a large disk. After the end of this process, it will provide a cumulative result. Including full disk capacity, distribution of bytes and, most importantly, all the errors that were found and corrected.

CHKDSK team works for everyone windows versions, including the last 7, 8 and 10. As for older versions of operating systems, users can start the Command Line from the Start / Run menu and type “cmd”. After launching the Command Line, you need to right-click on it and select "Run as Administrator" to gain access to the necessary rights.

So, we figured out how to run the CHKDSK command in older versions of Windows, and many of those who followed the suggested steps saw that the size of their hard disk was significantly reduced after the command was launched. This suggests that this disk   is faulty because one of the functions of CHKDSK is to detect and block broken sectors   (bad sectors) on hard disk.

If we are talking about a few broken sectors on the hard disk, then they usually go unnoticed by the user. But if the disk is bad, then there can be a huge amount of such sectors. And blocking them CHKDSK eats up a tangible piece of the capacity of your disk.

This result must be prepared and this means that all the data that are hypothetically stored in these sectors will be lost. Even if operating system   still not aware of this. CHKDSK will try to recover data from such broken sectors while using the / r parameter, but some data will remain damaged and unrecoverable. And in this result there is no fault CHKDSK - this command simply displayed the current status of your hard disk.

Good day! I have already told in my articles about, and. In this post, we'll talk about what the Chkdsk team means. This team also optimizes your PC, monitors the safety of important system files   and makes it stable work.

Using this method, we will make a correction. system errors and analyze the disk for errors. The program Chkdsk is used for such purposes.

Check Chkdsk for detecting disk errors

Most PC users still do not use devices for uninterrupted power supply of computers, so they can suddenly turn off their power supply. Among other things, computers often have various failures.

How to run Chkdsk program how to run to fix disk errors

If you notice that your PC is often buggy, long run, or even you have blue screen   death, but this program does not start, you can run it yourself and check your OS for errors. There are a couple of methods for this.

Chkdsk how to run the graphical method

First, apply the graphical method. To do this, click on the "Computer" tab, select required disk   (in most cases C) and applying context menu   (To do this, click the right mouse button) go to "Properties". Then click on the item "Service". Here we select the "Run check" key.



If we check the disk where our system is installed, this check will be performed during the restart of the PC.

  1. If we just want to make a check and not correct the errors, if they are detected, remove both checkboxes and click on the “Start” button.
  2. If we wish that the verification of the sectors would begin immediately, we will select the bottom line, and remove the tick above the top one. Otherwise, we will have a message that system disk   Now it works and the test can not start.
  3. If you want to find errors and correct them, put a tick in the first line.
  4. If you need to analyze the system and physical. Errors and you have a desire to correct these errors, you need to put both jackdaws.
  5. If you want to make a check and correct mistakes, you need both daws.

Chkdsk how to run from the command line when the system boots

We need to enter in the command line chkdsk with:   and do not forget to press "Enter", while the system will only check the disk for errors, but will not fix them, C - the name of the disk. If we need not only to analyze, but to correct the errors, after the disc name, enter / f , eg, chkdsk f: / f

If you check the system disk, you can be told that it cannot be checked, because it is currently in use and will be asked if it needs to be checked upon reboot? Press Y if you need it and N if not.

Also, check the disk for errors allows the program "Computer Accelerator". This program   not only checks the disk for errors, but also cleans the system, registry and so on. Download program can be on the link, or just clicking on the banner:

The chkdsk command should not be used often, it is advisable to use it in case of serious problems to restore the OS and the correct operation of the hard drive. I advise you to use no more than once every three months! Successes! How to run a service chkdsk   Windows to eliminate the damage to the file system you now know and would be closer to the smooth operation of the system!

Video how to run Chkdsk

Anecdote in each article:

Like this article? Share with friends: