Check Disk - chkdsk

thread_prefix_desc.14
ByLine
How to Run Check Disk at Startup in Vista or Windows 7
Synopsis
This will show you how to use and run Check Disk or chkdsk at startup from within Vista, the command prompt, and the registry to check for corruption and possibly repair errors and bad sectors on the hard drive.
How to Run Check Disk at Startup in Vista or Windows 7

information   Information
This will show you how to use and run Check Disk or chkdsk at startup from within Vista, the command prompt, and the registry to check for corruption and possibly repair errors and bad sectors on the hard drive.
Note   Note
If you had changed your default boot screen, then you will need to temporarily uncheck the No GUI boot to be able to see what is happening when chkdsk is running at boot up. See: How to Enable the Hidden Aurora Boot Screen in Vista or How to Change the Default Boot Screen in Vista SP1
warning   Warning
This will take about 20 minutes or so to finish, depending on how big your hard drive is. Do not stop chkdsk once it has started, let it finish. It could cause errors on your hard drive. When you restart to chkdsk, you will only have 10 seconds to press a key to cancel chkdsk. Check for a sticky keyboard key stuck down. It will cancel the chkdsk at startup.
Tip   Tip
CHECK DISK WILL NOT RUN AT STARTUP PROBLEM:


If chkdsk will not run at startup after trying the methods below, then see: How to Fix Chkdsk will Not Run at Startup in Vista





METHOD ONE
Run Check Disk from within the Drive's Properties Page

NOTE: This method may not always run chkdsk when the computer restarts on some computers. I'm not sure why, but if this is your case, then you can do Method Two, Method Three, Method Four, or Method Five below.
1. Open the Start Menu.​
2. Click on the Computer button.​
3. Right click on your hard drive and click on Properties.​
4. Click on the Tools tab.​
5. Click on Check Now under the Error checking section. (See circled in red below)​
Properties.jpg

6. Click on Continue in the UAC prompt.​
7. Make sure both options are checked. (See screenshot below)​
NOTE: The Automatically fix file system errors box will be checked by default.​
8. Click on the Start button.​
Check Now.jpg

9. You will get a pop-up window saying, "Windows can't check this disk while it's use". (See screenshot below)​
10. Click on the Schedule disk check button for chkdsk to run the next time you restart your computer.​
Schedule.jpg





METHOD TWO
Using chkdsk in a Command Prompt

1. To Run chkdsk in Safe Mode
A) Restart the computer and boot into Safe Mode.​
B) Go to step 3.​

2. To Run chkdsk in a Command Prompt at Boot
A) Place the Vista installation DVD into the DVD drive and restart the computer.​
B) Boot from the DVD into the System Recovery Options screen.​
C) Select Command prompt.
D) Go to step 4 below.​

3. To Run chkdsk in a Elevated Command Prompt

4. In the command prompt, type chkdsk or chkdsk C: followed by one or a combination of switches listed in steps 4A to 4D below and press Enter. See the screenshot below for all switch combinations.​
NOTE: If you want check disk to scan a drive other than the C: drive, then substitute the drive letter C: after chkdsk to the drive letter that you want.​
EX: chkdsk E:
chkdsk_Help.jpg

Type One of these Commands to Run Chkdsk:
NOTE: The most common command is chkdsk /f or chkdsk C: /f
A) /f = The /f switch is the most common of the chkdsk switches. It tells chkdsk to try and fix any errors it finds. EX Type: chkdsk /f or chkdsk C: /f
NOTE: Answer Y when chkdsk asks you if you want to check the drive next time Vista boots (restarts).
chkdsk_f.jpg

B) /r = The /r switch tells chkdsk to attempt to recover any bad sectors of the hard drive if any are found. A bad sector is a spot on the hard drive that cannot hold saved data anymore. (See screenshot below)​
EX Type: chkdsk /r or chkdsk C: /r
NOTE: Answer Y when chkdsk asks you if you want to check the drive next time Windows Vista boots.
chkdsk_r.jpg

C) /i = The /i switch tells chkdsk to perform a less detailed but faster disk check. (See screenshot below)​
EX Type: chkdsk /i or chkdsk C: /i
NOTE: This will run immediately.
chkdsk_I.jpg

D) /c = The /c switch tells chkdsk to skip the checking of cycles within a folder structure which reduces the scan time.​
EX Type: chkdsk /c or chkdsk C: /c
NOTE: This will run immediately.
chkdsk_c.jpg

5. Close the command prompt.​
6. Restart the computer to run chkdsk at startup.​




METHOD THREE
Using chkntfs and fsutil in a Command Prompt

NOTE: This will reset all drives to be checked at startup and mark a drive as dirty so chkdsk will run at startup for it. Chkdsk will mark the drive clean again after it runs. If chkdsk does not run at startup, then do step 5 only to mark the drive clean again.
2. To Reset and Check All Drives and Run CHKDSK if a Drive is Dirty
A) In the command prompt, type chkntfs /d and press Enter. (See screenshot below)​
NOTE: Restores the computer to the default behavior; all drives are checked at boot time and chkdsk is run on those that are marked dirty.​
B) Go to step 4.​
chkntfs_CMD.jpg

3. To Check a Specific Drive and Run CHKDSK if the Drive is Dirty
A) In the command prompt, type chkntfs /c C: and press Enter. (See screenshot below)​
NOTE: This will schedule the C: drive to be checked at boot time. If the drive is marked dirty, then chkdsk will run. If you want to schedule another drive letter to be checked, then substitute C: with the drive letter you want checked instead.​
chkntfs_C.jpg

4. To Mark a Drive Dirty
A) In the command prompt, type fsutil dirty set c: and press Enter. (See screenshot below)​
NOTE: This marks the c: drive as dirty so chkdsk will run at startup. If you want to run chkdsk on another drive letter, then substitute c: for the drive letter you want instead.​
B) You will now get a Volume - c: is now marked dirty message.​
Mark_Dirty.jpg

5. Close the elevated command prompt.​
6. Restart the computer.​
NOTE: Chkdsk will now run at startup. If chkdsk does not run at startup, then run chkntfs /d in step 5A again and see: How to Fix Chkdsk will Not Run at Startup in Vista




METHOD FOUR
Run Check Disk Using a REG File Download

1. Click on the download button below to download the Run_chkdsk.reg file.​
NOTE: If the hard drive you want to run chkdsk on has a different driver letter than C: , then do the Manual Way below to substitute C: with your drive letter instead.​
download

2. Click on Save, and save the .reg file to the Desktop.​
3. Right click the .reg (On Desktop) file and click Merge.
4. Click on the Run button in the Security Warning pop-up.​
5. Click on Continue (UAC), Yes, and then OK when prompted.​
6. When done, you can delete the .reg file (On Desktop).​



METHOD FIVE
Run Check Disk from the Registry Editor

1. Open the Start Menu.​
2. In the white line (Start Search) area, type regedit and press Enter.
3. Click on the Continue button in the UAC prompt.​
4. In regedit, go to: (See screenshot below step 5)​
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
5. In the right pane, right click on BootExecute and click on Modify.
BootExecute_Reg.jpg

6. Highlight the code below, then right click on it and click on Copy.
NOTE: If the hard drive you want to run chkdsk on has a different driver letter than C: , then substitute C: with your drive letter instead.​
Code:
[/INDENT][/INDENT]
[INDENT][INDENT]autocheck autochk /p \??\C:[/INDENT][/INDENT]
[INDENT][INDENT]autocheck autochk *[/INDENT][/INDENT]
[INDENT][INDENT]

7. Clear the box, then right click on a empty area in the box and click on Paste to copy the code above into it. (See screenshot below)​
8. Click on OK.
Modify.jpg

9. The registry will now look like this. (See screenshot below)​
BootExecute_Reg2.jpg

10. Close regedit.​
11. Restart the computer to run chkdsk at startup.​
That's it,
Shawn


Related Tutorials


 

Attachments

  • Run_chkdsk.reg
    904 bytes · Views: 12,847
  • thumb_Disk%20Management.png
    thumb_Disk%20Management.png
    11.8 KB · Views: 97
Last edited by a moderator:

Vikramaditya

New Member
Thanks admin /brink/shawn whoever it is.
my xternal hdd had a problem and this helped me solve it.
i registered on your website just to reply a thanks!!
 

GPB

New Member
I just wanted to express my thanks to all those who posted the proposed solutions on this thread. I'd been unable to run chkdsk for some months until I followed the steps outlined here. The information is very thorough and well presented. I am very grateful that people like you are making these contributions and letting others access them freely.
 

witten1972

Member
Hi Shawn,

I need some help with the following problem:
When I start my PC a File System Check is done and that takes much longer than usual. To describe what I mean, this check happens after CMOS --> BIOS --> Processor --> RAM --> HD + CD + USB Drives and then my Drivers are loaded. This is the point where that file system scan is performed. (where the Windows loading bar appears)

I have 4 partitions on my internal drive (C D E & G) and these are OK. Then I have an external data disk (L), and this one is fine too, but I also have 4 Changeable Disk of which the File System cannot be determined. I said "Changeable" because this is literally translated from Dutch, "Verwisselbare schijf" = "Changeable" but can also mean "Exchangeable" or "Removeable". See those 4 highlighted disks (H, I, M, N) at the bottom in the following screenshot:

My PC.png

Is it possible to disable the file system scan on those 4 disks during startup?
I never use those disks, nor do I know which program controls them.
When I need a virtual disk I use Daemon Tools, so those 4 disks are of no use to me.

Can you help me out with this one? (anyone else knowledgeable enough can chime in too of course)

Regards Carlo
 

Brink

Staff member
mvp
Hello Carlo,

Those removable drives look like they may from a media card reader. One drive letter per slot. Do you have a media card reader?

Is this just the normal system check at boot, or a scan by Disk Check?

If it's not Disk Check, then you might see if troubleshooting with a clean startup may help ID the issue if it's something causing startup to hang some.

Troubleshoot Application Conflicts by Performing a Clean Startup - Windows 7 Help Forums

Hope this helps for now, :)
Shawn
 

witten1972

Member
Hi Shawn, thanks for your swift reply!

Yes I have card reader drivers installed, don't use 'm very often though, and these drives can/could be disabled if I choose too.
Would that solve my issue if I just disabled those drives in Computer Management --> Device Manager & then reboot my PC?

Hmm I might as well try while 'm asking. Gonna do that, restart my PC & if that didn't help I'll try your options out, & report back...

PS To answer your question, yes this happens during the normal startup phase, about 25 secs into the PC boot process.
Just wondering but isn't that an nfts-scan during the normal startup process?

So chckdsk works fine as it should be, no problems with that.

Stay tuned ;)
 

witten1972

Member
Shawn, I disabled those Card Drivers in Device Manager, which caused them to be listed in the set of Volumes/Drives that are going to be scanned during the boot process, and by doing so that fixed my problem... somewhat LOL During the boot up process, (with "start without UI interface" unchecked in msconfig) I can see what Drives are checked when the results of the scan pop up, and those 4 Virtual Drives are gone from view, so that is fixed. The Pc can't scan those Drives anymore and that speeds up my boot time, but it still takes a long time IMO to scan 5 Volumes (C D E G L). I have to say that 2 Volumes were recently added, so that will probably attribute to a longer overall scan/boot process...

I don't know if there is a tool that can scan for such a problems, and actually fixes them,... does this exist Shawn?

I tried several cleaners & tweaking program to fix my slow boot, (Ccleaner & Advanced SystemCare), tweaked my Services, sfc/scannow etc and I have many problems resolved already by doing other tricks as well, so all I have to do to be done with my spring-optimizing of the PC is fixing that slow phase during boot. Nearly there. And I guess that I can speed that up if I knew how to make the PC scan only one Drive (C), because all those Drives are scanned for error regularly anyway with Advanced SystemCare, so that won't be needed to scan those other Drives during boot.

Do you know how to disable those other Drives/Volumes from being scanned during boot up?

Or, do you know how to make just the C Partition as only Volume to be set to be scanned during boot up?
(There must be a registry key that has [ Drives* or Drives\* ] as command (or something similar). Perhaps that can be set with just the C drive to be scanned? That would shave off at least 30 secs, if not more if you can help me out with this one...

PS hopefully I didn't make it sound more complicated than it is ;)
Just tried to be as accurate as I could with my description to depict my problem... or better yet to resolve my problem.

But I think that you know what I mean?

Regards Carlo
 

Brink

Staff member
mvp
Carlo,

What's you actual restart time? You can use this below in Vista as well to time it.
You could also check your BIOS settings for a "Quick boot" or "Fast Boot" type option to help some by disabling the "startup diagnostic". In addition, have only your Windows hard drive listed first in the boot priority order list in BIOS to eliminate checking for other drives to boot from. :)
 

witten1972

Member
Shawn, my BIOS doesn't have these options: "Quick boot" or "Fast Boot".
Instead I found the Diagnostic boot & disabled it, that saved me some secs, but my restart time is still 136 seconds.
For a Vista Home Premium 64 bit this is too much IMO. Something must be holding it up, or several processes, i don't know.

I don't see those 4 Virtual Drives anymore, so thats an improvement, yet not perfect though.
With XP I managed to boot in 30 secs, not expecting the same with Vista but around a minute should be doable...

However, my first boot device should be the CD Drive, no?! Just in case I have to boot from CD?
"only your Windows hard drive listed first in the boot priority order list in BIOS to eliminate checking for other drives to boot from."

Whether I have my CD Drive boot first, second or not that will only save a handful of seconds, besides the 'hangup' seems to happen during the NFTS Scan, approximately +30 secs in the boot process.

In one of the tips found in another thread registry key is mentioned:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager

& then in BootExecute on right hand side pane I have:
autocheck autochk *sasnative64

Is this the right registry key to change that to C only?
 

Brink

Staff member
mvp
Shawn, my BIOS doesn't have these options: "Quick boot" or "Fast Boot".
Instead I found the Diagnostic boot & disabled it, that saved me some secs, but my restart time is still 136 seconds.
For a Vista Home Premium 64 bit this is too much IMO. Something must be holding it up, or several processes, i don't know.

I don't see those 4 Virtual Drives anymore, so thats an improvement, yet not perfect though.
With XP I managed to boot in 30 secs, not expecting the same with Vista but around a minute should be doable...

However, my first boot device should be the CD Drive, no?! Just in case I have to boot from CD?
"only your Windows hard drive listed first in the boot priority order list in BIOS to eliminate checking for other drives to boot from."

Whether I have my CD Drive boot first, second or not that will only save a handful of seconds, besides the 'hangup' seems to happen during the NFTS Scan, approximately +30 secs in the boot process.

In one of the tips found in another thread registry key is mentioned:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager

& then in BootExecute on right hand side pane I have:
autocheck autochk *sasnative64

Is this the right registry key to change that to C only?



Yeah, that's a bit long, but not to terrible with Vista.

Check using step 6 in the tutorial below to make sure that the Time to Display the List of Operating Systems at Boot box is unchecked. This will save you 30 seconds if it is currently checked.

Operating System to Start - Change Display List Time - Windows 7 Help Forums

autocheck autochk * is the default entry for BootExecute.
 

witten1972

Member
Hi Shawn, I was able to get a faster boot time with the tips so far.

Then late yesterday I found a program called DLL Suite & that repairs all broken .dll files on my PC.
Thought that would help but now its even worse, Windows Update doesn't work anymore. I think that DLL Suite registered the wrong dll's. I've tried Microsoft Fixit, to an avail. Also some Drivers seem not to work anymore, and the Removable Storage Service, although I had issues prior to installing that DLL Suite. Looks like I might be better replacing an Image of C, instead of trying and find fixes manually...

Just out curiosity Shawn, but if I were to change the default BootExecute autocheck autochk * into:

autocheck autochk\C

You think that would help? (Or perhaps this above command needs some tweaking)
I can take a risk as the chances are high that I'll have to restore an Image with Acronis anyway.
 

Brink

Staff member
mvp
Since it's not chkdsk that is running at startup, I would recommend to leave the "BootExecute" data value at it's default autocheck autochk *.

Yeah, those fix it all type programs usually tend to cause more problems. At this point, you might consider backing up anything not already included in your image, then restore the image to start fresh again. :(
 

witten1972

Member
Yes, I'll have no other choice than to replace an Image.
Good thing is I just made one before doing so many changes :)

That DDL Suite I tried has the appearance to be malware, because very strategic settings are changed.
For instance System Restore doesn't work anymore, and on top of that the restore points of my C partition have been removed!
That program 'allegedly' found 199 dll's to repair, with a second scan another 40-something, but each dll was located in core folders like System32, Assembly, Drivers etc... The site where I found that program looks OK though, so maybe it ain't malware because it could also be that it changed dll's to the Vista Home Premium 64 SP2 state, and since then many Microsoft updates & patches have been released, so maybe the version numbers don't match. I tried to rectify it with sfc/scannow & also via ERD Commander I replaced bad drivers but in the end it didn't help much...

PS I was able to boot, prior to installing DDL Suite, in 116 seconds. That was pretty good actually.
I better never tried that program, but its too late for that, another $20 wasted and a valuable lesson learned I guess.

I'm going to restore my C now and see how that goes. Thanks for your help Shawn, as always ;)
 

Brink

Staff member
mvp
Yeah, that program sounds a bit suspicious. I hope it goes smoothly with the restore.
 
Top