Checking and diagnosing the hard drive. How to check your hard drive for errors using the command line? How to run Windows 10 disk check

Checking and diagnosing the hard drive. How to check your hard drive for errors using the command line? How to run Windows 10 disk check

Good afternoon, dear readers and viewers of the channel site, probably each of you at least once in your life has encountered the problem of data loss, and now I’m not talking about accidental deletion, but about the failure of the device on which you had important information, in computers and laptops these are hard drives or solid-state ssds, and today I want to tell you how to check the health of a hard drive in Windows 10 redstone.

Hard drive health

Let's first define what is included in the concept of hard drive health > each hard drive or solid-state SSD has some parameters that are responsible for the functioning of a particular component, and they are calculated by threshold values, upon reaching which the device fails. These threshold values ​​are called smart status, I talked about them in detail in one of the previous articles, when I raised the issue of monitoring the status of RAID arrays.

Most programs for determining the health of a hard drive use the indicators of s.m.a.r.t counters and, based on them, give you the result. I would like to note that, unlike solid-state ssd drives, hdds can also have mechanical damage, for example, damage to the head when the drive is dropped or strongly shaken; for more details about the design of hdd drives, read the link on the left.

I would like to note that ssd drives do not have the same mechanical problems as hdds, due to their architecture, and their smart performance may vary. I already wrote a post on this topic on how to increase the service life of an ssd by an order of magnitude, although it is already minimal. stated 5 years.

Let's move from theory to practice and consider software products that will help you diagnose hdd and ssd media.

Programs for diagnosing health hdd

CrystalDiskInfo utility

The CrystalDiskInfo program, in my opinion, should be the first tool in diagnosing your hard drive. I think it won’t be difficult for you to download it on the Internet. I'm using the portable version.

When you run CrystalDiskInfo 6.7.5 it will start checking hard drive health, this procedure takes a couple of seconds, as a result of which you will get a table like this.

The first thing you need to pay attention to is the Technical Condition item; as you can see, this is an alarm, indicated in yellow. Below you will see smart meters that show you possible problems. Let's see what kind of information you get about your HDD and SSD:

  • Your disk model and capacity
  • Firmware number
  • Connection interface
  • Data transfer mode
  • Logical letter
  • Spindle speed
  • Number of hdd starts
  • Total operating time (useful if you bought a hdd from someone and they tell you that it is new)

Below is a table of smart hard drive indicators, showing the current values ​​and threshold values, after which it can break down. As you can see, I have the Reassigned sectors parameter, which is starting to show that it is worth paying attention to, this parameter is used as sectors that replace bad sectors, a kind of reserve reserve for the hard drive to replace bad sectors.

I would like to note that SSDs and hard drives have their own set of smart indicators, since these are different technologies.

You can configure the CrystalDiskInfo program to autorun when you turn on the computer, and then at a certain interval it will check the health of the hard drive and report any changes if anything happens.

Click Tools > Autorun, now CrystalDiskInfo will always load.

I also advise you to install Launch Agent (in the Windows notification area), each individual disk will have its own icon that immediately displays the temperature.

You yourself can use CrystalDiskInfo to specify which method will be used to notify you of a problem with the health of your hard drive. You can choose between Sound notifications, event logging and email notifications.

In the schedule item, we can set the interval between new hdd health checks, by default it is 10 minutes, but I think that once every 3 or 6 hours is enough.

If we summarize the CrystalDiskInfo utility, we can safely say that it is capable of diagnosing and promptly notifying the user about problems with the hard drive.

Hard Disk Sentinel utility

We continue to get acquainted with programs that check the health of the hdd, and next in line is Hard Disk Sentinel, I should immediately note that the utility is also paid, but it is easily found on the Internet with a key, a root tracker will help you.

We launch Hard Disk Sentinel, this utility is good, it shows in addition to the status of hdd and ssd, and also RAID arrays. You will also receive a list of your hdd or ssd storage devices. As you can see, one of them has 21 percent health, swearing at bad sectors that were replaced by reassignment sectors.

The next tab is the temperature, here you see both the current values ​​and the maximum.

The most interesting thing is the S.M.A.R.T tab. in Hard Disk Sentinel, based on it you can understand the health of the hard drive, I remind you that hdd and ssd smarts are different.

And I think the Info tab is useful, here you can see all the summary data about the versions and firmware of the hard drive.

The Hard Disk Sentinel utility also allows you to conduct tests to diagnose the health of a hard drive, for example a new or old hard drive. To do this, click the Noise Control Configuration icon.

Here, which is cool, you can set the noise level, but you reduce the performance of the hdd. Click the Head Lead test.

Testing of the hdd head will begin.

But to look for bad sectors or bad sectors, we select the hdd surface test; with this test you can accurately understand the health of the hard drive.

Testing time depends on the size of the hard drive; the larger it is, the longer you will have to wait.

It is also possible to check s.m.a.r.t. through the Internet.

From the settings, I can recommend setting up mail in addition to sound alerts.

Victoria utility

Our next utility will be Victoria. It has a version for both Windows and an ISO for dos, when you do not have an operating system and need to know the health of your hard drive.

Download Victoria:

  • Windows version Victoria (https://yadi.sk/d/FFYm9bWVumJjX)
  • Dos version (https://yadi.sk/d/XefKZqDuumJmm)

We launch the Windows version. On the standard tab you will see a list of your hard drives. Select the one you need and see summary information.

The SMART tab gives you the most important hard drive health counters. To do this, click the Get SMART button.

Let's go to the test tab, here we choose what to do with bad sectors, the default is ignore, that is, nothing, I advise you to install Remap, that is, try to reassign. Then click start.

After which the hdd health check will begin, you need to pay attention to sectors that require more than 600 milliseconds to access.

Let me remind you that the Victoria utility has a DOS version, which is useful when you do not have an operating system installed on your laptop or server, but you need to check the status of the hdd. Making a bootable USB flash drive using the WinSetupFromUSB utility

After loading into Victoria, select the version for a regular computer or for a laptop.

Press the F1 key to view the available functions; we will be primarily interested in the P key. Selecting a channel with the HDD being tested.

Select Primary Master.

Press F2 and testing begins, based on the results of which you can draw a conclusion about the health of the hard drive.

In fact, there are still a lot of utilities, but these have always been enough for me in my practice.

Starting the programchkdsk checking and repairing the hard drive in Windows 10 from the command line

All actions must be completed on behalf of administrator.

Simple Scan

chkdsk command from command line

Press on the keyboard at the same time Windows + R(command line call).

On the command line enter the command chkdsk, then a space, then you can specify the drive letter you want to check. For example, chkdsk C(if you do not specify a letter, then by default the local drive C will be checked, that is, the main partition of the hard drive on which Windows is installed).

If you enter the command on the command line chkdsk, then as a result of the check you will only get the display about the disk state, information about the file system, but do not correct the errors found.

Run chkdsk from the command line in Windows 10 | Internet pro

Scanning and repair

To force the program to correct errors on the disk, we must give it additional instructions. After the drive letter you entered enter the following parameters, separated by spaces after each: /f /r /x.

Parameter / f(fix or from English to correct) gives program command fix all found errors;

Parameter /r(recover or from English restore or improve) tells the program find damaged sectors on the disk and restore the original information;

Parameter /x will force the computer before starting the verification process reboot(not necessary, since the system itself will prompt you to reboot).

So, we type the following syntax on the command line (i.e. using this formula):

Program chkdsk [drive:] [options]

It will look like this:

chkdsk C: /f /r /x

The hard drive needs to be reboot. You will see this notification:


If you agree to continue, then press the key with the letter Y on the keyboard, if not, then press the letter N.

These are the basic parameters; for those interested, you can look for additional ones on the Microsoft Technet website.

Important!

  • Performing a check of the hard drive and its repair It may take a lot of time, especially when the operation is performed on large disks and the disk has been used intensively.
  • It is recommended to back up important files.

When the task is completed, you will be presented with full report of the results obtained, including all errors that were found and corrected.

  • Checking and repairing a disk in Windows 7, 8 or XP

If, when loading Windows 10, disks are automatically checked for errors (using the chkdsk utility), the user does not see the results of this check. How can you access the log with the disk scan results?

In Windows 7 and earlier versions of Windows, detailed information about the actions performed by the chkdsk utility was displayed directly on the boot screen. In Windows 10 and Windows 8, developers, as part of the task of “simplifying” the OS for the end user, removed the detailed log, leaving only the overall percentage of completion displayed. An experienced user or administrator may sometimes want to know what bugs have been fixed and what changes have been made to the file system. You can view the results of an automatic check of hard drives performed when you boot your computer in Windows 10/8 - only using Windows Event Log (Event Viewer).

Open Windows Event Viewer by typing in the search event and selecting the application found in the list Event Viewer.

In the window that opens, go to the section Windows Logs -> Application.

Right-click on a section Application and select menu item Find. In the search bar, enter chkdsk and press Findnext.

The search should go to the first event found with Event ID 1001 and source Wininit. On the tab General will contain a detailed log with data from the last disk scan.

Checking file system on C:
The type of the file system is NTFS.
A disk check has been scheduled.
Windows will now check the disk.
Stage 1: Examining basic file system structure...
129280 file records processed. File verification completed.
4917 large file records processed. 0 bad file records processed.
Stage 2: Examining file name linkage...
184834 index entries processed. Index verification completed.
0 unindexed files scanned. 0 unindexed files recovered to lost and found.
Stage 3: Examining security descriptors...
Cleaning up 799 unused index entries from index $SII of file 0x9.
Cleaning up 799 unused index entries from index $SDH of file 0x9.
Cleaning up 799 unused security descriptors.
Security descriptor verification completed.
27778 data files processed. CHKDSK is verifying Usn Journal...
36727760 USN bytes processed. Usn Journal verification completed.
Stage 4: Looking for bad clusters in user file data ...
129264 files processed. File data verification completed.
Stage 5: Looking for bad, free clusters...
6493921 free clusters processed. Free space verification is complete.
CHKDSK discovered free space marked as allocated in the volume bitmap.
Windows has made corrections to the file system.
No further action is required.
41428991 KB total disk space.
15154156 KB in 90362 files.
75308 KB in 27779 indexes.
0 KB in bad sectors.
223839 KB in use by the system.
55376 KB occupied by the log file.
25975688 KB available on disk.
4096 bytes in each allocation unit.
10357247 total allocation units on disk.
6493922 allocation units available on disk.
Internal Information:
00 f9 01 00 88 cd 01 00 a9 dd 03 00 00 00 00 00 ............
ad 00 00 00 66 00 00 00 00 00 00 00 00 00 00 00 ....f.........
Windows has finished checking your disk.
Please wait while your computer restarts.

A similar file can be generated using a PowerShell command that exports data from the event log and saves it to the text file CHKDSK_SCAN.txt.

get-winevent -FilterHashTable @(logname="Application"; id="1001")| ?($_.providername –match "wininit") | fl timecreated, message | out-file c:\CHKDSK_REPORT.txt

The resulting file can be opened in any text editor.

So, we received a log of the disk check performed when the system booted. In the event that the system runs a scan at every boot or the scan freezes, it may be worth it temporarily.

Checking the system disk for errors is the first thing you should do if there are any problems with the operating system. If you encounter read or write errors in Windows 10 or performance issues when performing any disk operations, you need to check your system disk for errors.
Disk errors usually indicate that the file system is not working correctly. This can be caused by various reasons, ranging from improper shutdown to physical damage to the disk surface. To see if the disk has system errors, you need to check it.

First, you can check the information provided by Windows. If there are any problems with your disk, Windows 10 can detect them and report it. To check this information, follow these steps:

  • Open Control Panel.
  • Go to next applet: Control Panel\System and Security\Security and Maintenance
  • In line " Disk State", you will see the current status of your disks.

In my case, Windows 10 shows that there are no problems:

To check your drive in Windows 10 for file system errors, you need to do the following:

  • Open Command Prompt as Administrator.
  • Enter the following commands at the command prompt:
  • Replace section X on Drive letter, which needs to be checked.

For example, the command will check for errors on drive C:

If the disk is not in use, the disk check will begin immediately. If your drive is currently in use, Chkdsk will prompt you to perform a disk check the next time the system boots.

Disk check schedule at next boot

You can check your system drive for errors in Windows 10 by running the following command:

You will see the following output:

After clicking Y to confirm the request, it will start the next time you restart Windows 10.

That's all. Once the disk check is completed, you can find the results by searching for "CHKDSK" in the Windows 10 event log.

Windows malfunctions, emergency shutdown of the computer, experiments with disk space management software, the consequences of viruses - these and other problems can lead to the automatic launch of the standard Windows Chkdsk utility, designed to correct errors in the file system of hard drives. Incorrectly completed operation of the operating system with files leads to file system errors, and sometimes even damage to the file system. In emergency cases, the Chkdsk utility turns on itself before Windows starts, scans disk partitions and corrects errors. However, the fact that there are problems with the file system may not make itself felt during normal use of the computer and only become apparent when trying to manage disk space. So, for example, when trying to shrink a disk partition using standard Windows tools, we may receive the following notification: “It is possible that the volume selected for compression is damaged. Use Chkdsk to troubleshoot the problem, and then try shrinking the volume again."

In this case, disk check will not start automatically. How to run Chkdsk manually in Windows 7, 8.1 and 10? How can I use Chkdsk to fix disk errors if this problem is the reason the operating system is unable to boot?

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

1. Run Chkdsk using Windows GUI

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

In the disk partition properties window that opens, go to the “Services” tab, and in it click the “Check” button (or “Run check” for Windows 7).

In versions of Windows 8.1 and 10, if everything is in order with the disk file system, in the window that appears next, we will see a notification that checking 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 scanning and repairing the disk.

For Chkdsk to work relative to drive C, you must restart the computer. You can do this immediately or delay running the scan until the next reboot.

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

In Windows 7, launching Chkdsk is slightly different: to the preinstalled option of automatic error correction, you can add another possible option - checking and repairing bad sectors of the hard drive. When activating this option, it is worth considering that in this case Chkdsk may take longer to run.

As with Windows 8.1 and 10, in version 7 the system drive C cannot be scanned within a running operating system. To start the scan, you must restart the computer. Click “Schedule disk check”.

When checking a non-system partition of a disk, 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 “Disconnect” 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, accordingly, launch the latter.

In the command line enter a command like this:

In this command, instead of drive C, we each time substitute the letter of the desired partition on which the scan is required. If Chkdsk needs to check the system partition C, as with the GUI, you will need to restart the computer. When a message appears in the command line about the impossibility of locking the specified drive, you need to enter “Y”, then restart the computer.

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

3. Running Chkdsk on a non-booting Windows

If Windows freezes at a certain point in the boot process, one of the possible causes of this problem is file system errors. In this case, you need to run Chkdsk by booting from the rescue media. As such, you can use regular installation media with versions of Windows 7, 8.1 or 10. With its help, we will launch 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 a notepad. We launch it with the command:

Click the notepad menu “File”, then “Open”.

In the Explorer that opens, remember the new drive designations. As a rule, in Windows 8.1 and 10, partition of drive C (as it exists inside the running operating system) is listed as D, since the letter C is assigned to the first technical partition of the system. And all other sections are shifted 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 like this:

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

In cases where Windows is unable 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, is AdminPE based on WinPE. Its image for recording on a disk or flash drive can be downloaded from the official website of the project Adminpe.Ru. Using AdminPE, you can launch a command prompt and enter the Chkdsk launch commands discussed above. But in this Live disk, the Chkdsk utility has its own interface and is launched using a script. The shortcut to launch the utility is placed directly on the desktop.

In the drop-down list to check the disk, select the desired disk partition. Next, activate the checkboxes for restoring damaged sectors and forcibly disabling a partition (volume). Let's check the launches.

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

Have a great day!

views