Deliberate file system corruption

I need to explicitly check what my application is doing if it is trying to access some damaged part of the NTFS file system. I was looking for similar questions, but it was about corrupting certain files (i.e. destroying the syntax of an xml file, etc.).

I need to create a script in which chkdsk will report errors in the file system in a specific place.

Does anyone know how I can provoke such a situation to test my application.

Just in case, you are worried: I would not do this on my production system, I have a virtual machine configured for such things.

+7
source share
3 answers

Since there is no better solution, I did it with difficulty: I used Sysinternals NTFSInfo to find the location of the main file table, launched the Live Live CD, and edited some bits in both locations of the main file table (MFT). It took some time to figure out the right places, but I can create a damaged file system to check the error procedures in my application.

Thanks to these promotional ideas, but I will give an answer to myself. If anyone will have the same problem in the future, feel free to contact me.

+2
source

If the problem is what your application will do when it encounters damaged files, then why bother damaging the file system containing the files? Why not just damage the files themselves?

The operating system does a lot to provide a reliable file system, I'm not sure that intentionally writing garbage to the file system will do something other than fuzz, check the file system implementation.

+2
source

I would try to write some random bytes in some random places on the disk (or disk partition).

0
source

All Articles