For past few days, when ever i was starting my computer it always scanned D: drive for disk errors at windows startup. I always let it run to the finish but it just won’t go away. As soon as i reboot my computer, D: drive scan starts again
. So today i spent some time on this issue and tried to fix the problem. If you will google for this you will probably find alot of articles describing how to fix this problem. One such article is XP always scans on boot but to my disappointment it did not fixed my problem. So i tried to fix the problem my self.
For every hard disk partition there is a bit which indicates weather the disk is in good state or needs to be checked for errors. At startup windows checks this bit and if a partition is marked as dirty an scan is performed. To check the dirty bit run following command on CMD
fsutil dirty query <Drive Letter>
As for me the drive was D: so i executed following command
fsutil dirty query d:
Turns out that the D: drive was marked as dirty. Now i begin to wonder even after running chkdsk so many times why my D: drive was not being marked as ‘NOT Dirty’. After looking around for possible reasons, i found out that i have configured my windows to create Page file on D: drive. That made some sense, because chkdsk probably won’t be able to completely fix D: drive because some portion of it was locked by the Operating System. So i changed the Page file from D: to E: and re-run the chkdsk. This time chkdsk took a little bit more time and after the scan, D: drive was no more dirty. To change the page file location
- go to ‘Mmy Computer’ properties by right clicking on ‘My Computer’ icon
- select the ‘Advanced’ tab
- click the settings button in the ‘Performance’ group
- It will open up a ‘Performance Options’ dialog
- Select the ‘Advanced ‘ tab
- Click the the ‘Change’ button under the ‘Virtual Memory’ group
- this will open up a dialog, do the necessary changes and hit the ‘Set’ button.
- Close the dialogs by clicking ‘Ok’ button
And for fixing bad sectors run following command
chkdsk /r <Drive Letter>