Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to reset the harddisk "error bit"?

Status
Not open for further replies.

Darkwing99

Programmer
May 21, 2003
21
DE
Hi,

first the things I already know:

Windows checks at startup the "hard disk error bit" and the "clean shutdown bit". If any of them is set to ZERO, Windows performs a SCANDISK.

You can find Infos about the bits here:(the article is for Win95 but VFAT hasn't changed in that way)

>
> The Clean Shutdown and Hard Disk Error bits are the two
> low-order bits of the FAT entry for cluster 1. If bit 0
> is 0, it indicates an unclean shutdown; if bit 1 is 0, it
> indicates that a hard disk error occurred on that drive.
> These bits are turned on by VFAT; they are turned off
> only by ScanDisk. The Clean Shutdown bit is turned off
> upon completion of a standard run. The Hard Disk Error bit
> is turned off upon completion of a surface scan
> (regardless of whether errors were repaired).
>

To check if the "hard disk error bit" is set you can run the folowing command in the command prompt(if works for FAT-Volumes as well):

CHKNTFS c:

To reset the bit you have to run a SCANDISK with a complete surface scan. That can last for hours (depending on your harddisk-speed and -size).


Now the part I don't know:

Is there a way to reset the bit manually or in a faster way than SCANDISK with surface-scan?

Regards,
Thomas
 
This REG-script can turn off the startup-auchtocheck but it doesn't reset the "hard disk error bit".
 
The only tool I know of is fsutil dirty, and this can only query or set the dirty bit.

So, the real question is why is the dirty bit being set so often on the hard drive?

I suspect you need to cure some hard disk woes.
 
One of my hard drives is about 3 years old and it seems it doesn't work very properly when applications manipulate many data.
But (except once) I NEVER had found damaged sectors or even data loss durig the SCANDISK surface scan.
I regulary use Norton Disk Doctor once per month to scan this harddisk.

I want to be warned if the "error bit" is turned on, but I don't want to wait 2.5 hours every 10th time I start my computer.

So the best way seems to me to check the bit manually and do a SCANDISK from time to time (maybe ever 5 times the bit is turned on).

For now I turnd off the autocheck for this special drive with

CHKNTFS /x f:

but the bit remains checkes until the next 2.5-hour-scan.
 
fsutil dirty query x:

will tell you if the bit is set.
 
I found the solution:

You can reset the "error bit" simply with

CHKDSK f: /F


Thanx for all help.

Regards,
Thomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top