Hi folks!
I'd like to know whether it's possible to clear the NTFS dirty bit in bash script.
Thanks, User114788
Hi folks!
I'd like to know whether it's possible to clear the NTFS dirty bit in bash script.
Thanks, User114788
Doing so is inherently unsafe. ntfsprogs has plans for a ntfsck, which would allow you to safely fix up and mark as clean a filesystem. However, the tool has not been implemented yet.
That said, simply clearing the dirty bit is a recipe for trouble. If a filesystem crashed you must run recovery before using it, which for now requires Windows as far as I know.
Why do you want to do that? Maybe there's a better way to do whatever you're trying to accomplish?
The dirty bit is there because NTFS witnessed some corruption, not because it needs to replay its log (though the intuition here makes sense).
Are you trying to avoid a chkdsk run at startup? We call that 'autochk', and you can disable that via chkntfs. (Apparently we just love the term 'chk'.) Then you'll only get a chkdsk run when you ask for one.