How do I manually reset the "dirty bit"

N

nomad

Does anyone know of how to reset the "dirty bit" on a drive. My computer
has 4 hard drives attached and the dirty bit got set on the first two
drives and won't reset. Every time I reboot, it does the disk check on the
drives and then just sits at the restart message. If I hit the reset
button, then it just checks the drive on the restart again. I can't get a
defragger too work as it comes up with the dirty bit message and I'm just
about at my wits end. Any ideas???
 
D

Doug Knox MS-MVP

Open a command prompt and run CHKDSK X: /F Where X is the drive letter
that has the dirty bit set. If you're prompted that the volume can't be
unmounted, and would you like to run CHKDSK at the next reboot, answer yes,
then restart the computer.
 
C

cquirke

Does anyone know of how to reset the "dirty bit" on a drive. My computer
has 4 hard drives attached and the dirty bit got set on the first two
drives and won't reset. Every time I reboot, it does the disk check on the
drives and then just sits at the restart message. If I hit the reset
button, then it just checks the drive on the restart again. I can't get a
defragger too work as it comes up with the dirty bit message and I'm just
about at my wits end. Any ideas???

Several. Firstly: Be careful what you wish for!

If XP works the way Win9x does in this respect, then there
are two "dirty bits" that flag different situations.

One is set when file writes are in progress, and cleared
when these complete. If the Windows session crashes or
is reset during file write operations, then the bit remains
set and the next startup will cause ChkDsk to test that
volume for file system logic errors, and "fix" them. The
bit is thren cleared once the file system is "fixed".

The other bit is set whenever a disk access fails at the
physical level. This is a far more ominous state of affairs
that can arise at any time; it's not related to "bad exits"
from Windows, but impending hard drive failure. When this
bit is set, ChkDsk will test logic and surface of all volumes
on that physical hard drive - a very long process. It will
"fix" surface errors by marking the bad clusters as not for
use, but that's just papering over the cracks.


These "dirty" bits are not just set for fun - when they are
set, it's because a data loss situation has arisen. For
example, if your system powers off too soon on shutdown so
that data written to HD's on-board RAM has not been flushed
to disk, then that is a data loss situation that will set
the flag, even if Windows considers it a successful shutdown.

Bottom line: Believe the "dirty bit" flag, not Windows UI.


You mention that the system "hangs" when it tries to repair
the damage, or <shudder> when you defrag. This is suggestive
of a failing hard drive, where the low-level driver code gets
trapped in a retry loop (repeatedly trying to read a bad sector,
when bad CRC causes the access to be considered "failed").

If there are any doubts about file system sanity or hard drive
health, do NOT attempt a defrag!! Consider Defrag a way to
make a healthy PC run faster, just as running a marathon is a
way to make a healthy human fitter. You should not try defrag
on a sick PC for the same reason that patients recovering from
a recent heart attack should not run marathons.
 
K

Kelly

Hi Chris,

Great to see you here!!! :blush:)

To the OP, see if this helps:

Suggestions and Checkpoints:

Go to Start/Run/CMD and type in: fsutil dirty query c:
(Modify the drive letter accordingly)

If it comes back as dirty, it hasn't cleared. For more information go to
Start/Run/CMD and type in: CHKNTFS /?

Option: From a command prompt type chkntfs /D and then reboot, a chkdsk
should run but not again on next boot.

This edit does not work for all users, circumstances depending:

Disable or Enable CheckDisk Upon Boot (Line 82)
http://www.kellys-korner-xp.com/xp_tweaks.htm

To use the Regedit: Save the REG File to your hard disk. Double click it
and answer yes to the import prompt. REG files can be viewed in Notepad by
right clicking on the file and selecting Edit.

Chkdsk Runs Each Time That You Start Computer
http://support.microsoft.com/support/kb/articles/q316/5/06.asp

If that didn't help nor apply:

Go to Start/Run/Regedit and navigate to this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Highlight the Winlogon file.

In the list look for "SFCScan", this should be set to (0) if it is set to
(1) the scan will happen at every boot.

Go to Start/Run/Regedit and navigate to this key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager

Look for the REG_MULTI_SZ value with the following name: BootExecute. This
value contains commands that will be executed at startup. The default value
is: autocheck autochk *

After scheduling one or more chkdsks, the entry will contain one or more
autochk lines. Delete each of these lines and put the default one in place.

If you always want a check to be performed at startup, change the value to:
autocheck autochk /f *

If you don't want any checks to be performed, delete all autocheck entries.

Last checkpoint: Modify as needed:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComp
uter\cleanuppath

Registry entry should read: %SystemRoot%\system32\cleanmgr.exe /D %c
 
N

nomad


OK, thanks for the try guys. However, none of your fixes help me. I'll
restate the problem. I have 4 hard drives on this machine and when I
reboot, chkdsk runs for the first two drives. Normally this isn't a
problem, but I'm trying to use Diskeeper to defrag my drives, and when I
start up Diskeeper, it informs me that the dirty bit is set for the first
two drives and it won't start up for those drives. When I reboot and
chkdsk runs for those drives, the computer finishes the chkdsk, then just
sits there, locked up, instead of continuing on and loading Windows.
Microsoft provides a utility and a number of ways to set the dirty bit,
however there doesn't seem to be a way to clear it other than running
chkdsk. So, my major problem is that chkdsk doesn't reset the dirty bit,
prior to freezing up, and when I hit reset, it just wants to check it again
on the next boot.

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Cannot reset Volume Dirty Flag 19
Dirty Bits? 4
How to RESET "dirty bit" for NTFS volume 12
Windows 7 check disk / dirty bit 6
Win7's dirty, dirty little bits 5
f partition remains dirty for chkdsk? 2
chkdsk boot loop 2
Windows 7 check disk / dirty bit 5

Top