From the course: Windows 10 for IT Support: Advanced Troubleshooting
Running CHKDSK - Windows Tutorial
From the course: Windows 10 for IT Support: Advanced Troubleshooting
Running CHKDSK
- [Instructor] Sometimes when Windows experiences a problem that problem may be attributed to storage corruption. If the disk becomes corrupt, then some of the Windows system files might also be corrupt and when that happens, Windows can malfunction and exhibit any number of different problems. So fortunately, Microsoft has included a tool with Windows that you can use to check for disk corruption and to repair that corruption if it exists. The tool is called check disk. Now, if this sounds familiar, it may be because check disk has been a standard Microsoft utility for decades. It was actually introduced in the days of DOS way back in the 1980s. But the version of check disk that we have today is quite a bit different from what we had decades ago. check disk has evolved over the years along with the operating system. So let's take a look at how you would use check disk. Now, we have to run check disk from a command prompt but we have to run it from an elevated command prompt otherwise it won't work. If you attempt to run check disk from a standard command prompt and you attempt to repair, then Windows will give you an error telling you that you don't have permissions to run the operation even if you are logged in as an administrator. So let's go ahead and open an elevated command prompt window. What I'm going to do is click on the start button and I'm going to go to the W section, and then I'll expand Windows System, and then rather than clicking on command prompt I'm going to right click on it and this is going to open up a sub menu. I'll go to more and then run as administrator. And this is going to open an elevated command prompt, I'll click yes. Now before I run check disk, what I'm going to do is type the check disk command, it's C H K D S K and then /? and I'll press enter. And what this does is it causes Windows to display the check disk command syntax. I'll go ahead and make this a little bigger. So as you can see, there are any number of command line parameters that you can use with CHKDSK to fine tune its behavior. Now, typically there are only two that you're going to need to use, volume and /f, volume is the letter of the drive that you want to check. So if for example, you want to check the C drive, volume would be C:, /f tells Windows to fix any errors that it might encounter. So let's take a look at how this works. I'm going to type CHKDSK and then space and then C: because I want to run a scan of the C drive. And let's just do a basic scan first without the /f. I'll go ahead and press enter, and you can see what happens when we run CHKDSK. You can see that CHKDSK is examining the basic structure of the disk and then it goes into step two, examining file name linkages. And then stage three is examining the security descriptors, and then we get a summary of the disk's health. Now in this case, the disk is healthy and because the computer is relatively fast and the disk is small, CHKDSK completes quickly. But if you have a really large hard disk or a lot of corruption is present, or if you're on a slow machine this process could take a while to complete. So let me go ahead and clear the screen. And this time I want to rerun CHKDSK, but I want to do it with the /f parameter. Now, as you recall, /f tells CHKDSK to fix any errors that it encounters, but there aren't any errors on this disk. The reason why I want to show you that is because I want to show you what happens if you run CHKDSK against the C drive and you attempt to correct errors. So let's repeat the previous command chkdsk C: and then I'm going to append space /f and I'll press enter. And when I do that, I get an error message saying CHKDSK cannot run because the volume is in use by another process. What this really means is that Windows is using the C drive and it has to do that in order to be able to function. But then the error goes on and ask us, would you like to schedule this volume to be checked the next time the system restarts? So I'll go ahead and press y and enter, and then I get a message saying the volume will be checked next time the system restarts. So with that said, let's go ahead and close out the command prompt and let's reboot the system. So Windows is restarting and I get a message that gives me a chance to abort the disk check before it happens. And now you can see the disk check is running before the Windows operating system actually loads and it's fixing any errors that it may encounter because we used that /f parameter. And then once the scan completes, Windows loads in the normal way. So from there, you can simply log in and see if CHKDSK fixed your problem. Now, one last thing that I do want to quickly mention is that if CHKDSK does find errors and you correct those errors, it's a good idea to keep running CHKDSK with the /f parameter until no more errors are reported because sometimes CHKDSK does need to be run more than once in order to successfully resolve everything. So that's how you use CHKDSK to troubleshoot storage problems in Windows 10.