• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

How to permanently disable Disk Check / Remove dirty bit that runs chkdsk upon reboot

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

c627627

c(n*199780) Senior Member
Joined
Feb 18, 2002
How to permanently disable Disk Check / Remove dirty bit that runs chkdsk upon reboot

I've been asking this question every once in a while for the past few years, no answer yet, it's 2005, let's try again :)

First of all,
• I understand that this "shouldn't be done," thank you :)
• Quick Googled Microsoft Docs solution is only temporary not permanent.


It's easy to disable Scandisk from running automatically at start up on Windows 98/Me, but I've been trying for years (for the last five years) to find a way to do that in Windows XP that would stick.

I manually scan the drive and do an image restore all the time so I have no need for automatic Disk Check (chkdsk) in Windows XP if it the power goes out. Here's the temporary trick:

Start Menu > Run... > Regedt32.exe
Go to
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager
Double click on BootExecute on the right side of the screen
change the value from default
autocheck autochk *
to:
autocheck autochk /k:cdef*


Where it says
/k:cdef*

that means drives c,d,e,f (you can substitute drive letters if you wish)


but autocheck autochk * returns every once in a while, re-enabling Disk Check (chkdsk).

The closest idea I had is to to find a way to assign a Read-Only attribute to just the
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ BootExecute

and no other subkey.


Can this be done?



Question 2: I have a dual boot XP/Me, if I boot into Me, how do I remove the dirty bit from the drive that's causing XP to run chkdsk because the power went out and the computer wasn't shut down 'properly'?


By the way for those that are interested:
98/Me doesn't reset itself, it's easy there:

To disable Scandisk from running automatically at start up on Windows 98/Me:

1. Start Menu > Run...
2. type
Msconfig
then click on OK
3. Click on Advanced... button
4. Check "Disable Scandisk after bad shutdown option"
5. OK, OK, then click Yes to restart the computer.


Would be much obliged if anyone could figure this out, even if the answer is "it's impossible, Windows XP is setup that way..."
 
Does this happen very often to you to the point to be annoying?
 
Ha, many-a-thread over the years was filled with questions exactly like yours -- but no suggestions of a solution :( I guess I shouldn't have said 'when the power goes out' rather, 'when the system is reset improperly...'

...and yes.

(Usually I first get multiple lists of reasons why this shouldn't be done... :( )
 
I just wanted to know cause it doesn't really bother me when it happens, because it rarely happens and I don't have a back up or anything, have you tried contacting microsoft it's a long shot but it's still worth it. And if that dude that knows a lot about os doens't know that has a bike as his avatar, then I think it's a long shot that anyone else here will know.

Good luck searching though
 
Is scandisk still a file? Or is it built-in somewhere?
Wouldn't it be possible to change the scandisk executable with a dummy file like a .bat file that does nothing? And keep scandisk around with another name?
 
ThePerfectCore said:
Convert to NTFS, dump ME. :p

He is already using Xp, he says tha he knows how to do this with windows 98/me but hasn't been able to do it with windows xp.
 
The Chkntfs.exe utility has been developed by Microsoft and is available in Microsoft Windows NT 4.0 Service Pack 2 and later versions of Windows. It is designed to disable the automatic running of chkdsk on specific volumes, when Windows restarts from an improper shutdown. Chkntfs can also be used to unschedule a chkdsk if chkdsk /f was used to schedule a chkdsk on an active volume on the next system restart.


Chkntfs is a utility that enables a system administrator to exclude volumes from being checked by the autochk program. The utility is run from a command prompt and has the following command line options:

syntax
CHKNTFS drive: [...]
CHKNTFS /C drive: [...]
CHKNTFS /X drive: [...]
CHKNTFS /t[:Time]
CHKNTFS /D

key
drive : Specifies a drive letter.

/C : Check - schedules chkdsk to be run at the next reboot.

/X : Exclude a drive from the default boot-time check.
Excluded drives are not accumulated between command invocations.

/T : Change the Autochk.exe initiation countdown time (time in seconds)
If you don't specify Time: displays the current countdown time.

/D : Restore the machine to the default behavior; all drives are
checked at boot time and chkdsk is run on those that are dirty.
This undoes the effect of the /X option.

If no switches are specified, CHKNTFS will display the status of the dirty bit for each drive.

/T option is new in Win XP

Examples:

chkntfs /x c: This disables chkdsk from running on drive C:

chkntfs /x d: e: This disables chkdsk from running on drives D: and E:.


The chkntfs /x commands are not cumulative, the command overwrites any previous drive exclusions that have been established. In the above example, chkntfs only disables the chkdsk checking on drives D and E, drive C is not checked for the presence of a dirty bit.


http://support.microsoft.com/?kbid=160963
 
Note that Chkntfs only temprarily disables Disk Check, not permanently which is what I wish to do.
 
You sure that it is temp? I have used it and it seemed to stick, and it even seems to read that it is not temp to me, but you may well be right. But could you batch it at shutdown or startup and get it the way you want?
 
Save the following .txt file with a .reg extension, and merge it into your Registry...
 

Attachments

  • DisableChkdsk.txt
    832 bytes · Views: 5,044
Huh.
:)
I hesitated to PM you.
:)
The man with the plan.


Just out of curiosity, the dirty bit that XP sets, how is it removed from (all FAT32) system if I boot into Windows 9x/Me on another partition.


Thank you very much redduc900.
 
Just out of curiosity, the dirty bit that XP sets, how is it removed from (all FAT32) system if I boot into WIndows 9x/Me on another partition
I'm not sure I follow you.
I hesitated to PM you
You can feel free to PM me anytime you'd like, as can anyone on the forums.
 
Last edited:
You know, the dirty bit that "says" the volume is dirty and needs to be checked.

So if you have several partitions, is this info only on the Windows XP partition...?

I can try to explain further if it isn't clear.
 
My understanding of it is...the "dirty" bit is a bit in the boot sector (for FAT or FAT32 volumes), or in the MFT (for NTFS volumes), that as you know is checked when Windows starts. This bit is checked to determine whether corruption has been detected in the file system. If the dirty bit is set on a volume, Autochk runs to correct any errors on the volume.

On NTFS volumes, the dirty bit is typically set only if the file system has detected potential corruption. In this case, an event is logged in the System event log.
 
How is the dirty bit removed

• from within Windows XP (NTFS and FAT32.)

• from within Windows 9x/Me (provided no NTFS partitions exist of course.)

• from a DOS boot up floppy (provided no NTFS partitions exist of course.)
 
Just out of curiosity, the dirty bit that XP sets, how is it removed from (all FAT32) system if I boot into Windows 9x/Me on another partition
The bit that XP sets (either in the MFT of an NTFS volume, or in the boot sector of a FAT or FAT32 volume) is removed when it determines that the file system is free of corruption.
How is the dirty bit removed

• from within Windows 9x/Me (provided no NTFS partitions exist of course.)

• from a DOS boot up floppy (provided no NTFS partitions exist of course.)
AFAIK, and I could be wrong here, but a non-NT based OS doesn't recognize the bit set by XP/W2K...in the boot sector of the volume in which it resides. I believe the NT based OS which sets the bit is the only OS capable of removing it...a Win9x based OS or a DOS bootdisk won't recognize it.
 
Thank you.

When you say "...when it determines that the file system is free of corruption." that means after running a scan, which will be run when you boot into XP ordinarily?

So if the system is reset "improperly", is that one of the times when the dirty bit is set? If so, there is no way therefore to remove it unless you run a scan?
 
When you say "...when it determines that the file system is free of corruption." that means after running a scan, which will be run when you boot into XP ordinarily?
Yes, after Autochk runs and corrects any and all file system errors on the volume, will XP then remove the dirty bit from the MFT or the boot sector of the damaged volume.
So if the system is reset "improperly", is that one of the times when the dirty bit is set? If so, there is no way therefore to remove it unless you run a scan?
That's right, although the dirty bit isn't always set after an improper shutdown...at least not when running an NT-based OS using the NTFS file system. For example, rebooting the computer by pressing the reset button from within the GUI normally won't set the bit (unless of course there's obvious file system corruption)...unlike a Win9x system using the FAT or FAT32 file system. XP doesn't view a hard reset as an improper shutdown, unlike a Win9x OS...which will immediately run ScanDisk upon next reboot, and notify you of the fact that the OS was shut down improperly.
 
I have an all FAT32 system.
C: is XP
D: is Me
E: is where certain system folders are like Desktop, Start Menu, etc...

Rebooting the computer by pressing the reset button from within XP, did appear to trigger lengthy disk checking of both C: drive (10GB) and E: drive (100GB).


That (lengthy) scan usually doesn't find any problems.

Whatever it is that it does to remove the dirty bit, I just need to confirm this once again (sorry), whatever it does to remove the dirty bit, that can't be 'simulated,' that can't be done by using third-party tools so that if the dirty bit is set, it can actually be removed (in theory) without a full scan??

I'm asking out of curiosity, I understand how important scanning can be...

Thank you for your opinions and advice.
 
Back