JSI Tip 0652 - Beware of root folder maintenance in your system partition.
August 13, 1998
If you repeatedly create and delete a large number of files (1000+) in the root of your system partition, you may experience a failure to boot after running CHKDSK. The computer hangs immediately after the POST (Power On and Self Test). If you attempt to start your computer from a Windows NT boot disk, Windows NT fails at the black OSLOADER screen with the following message:
Windows NT could not start because the following file is missing or corrupt:
system32toskrnl.exe
Please re-install a copy of the above file
This rare problem is caused by the way that the boot code and NTLDR parse the root folder. In NTFS, a folder is a file that includes an index attribute (a list of files and subdirectories along with pointers to the file record segment (FRS) which holds the file/folder). If this list is not too large, it is stored internally in the base FRS of the root folder. Even if the list were to suddenly grow very large all at once, the file system simply allocates a large block of contiguous space to store the extra information. However, if the index is constantly growing in small portions, the file system allocates only small portions of space at a time, which may result in the index becoming fragmented and stored in various clusters scattered all over the disk. This is what happens when you create and then delete large numbers of files in the root folder.
The boot code and NTLDR contain a a small piece of the NTFS file system code, which allows them to read the root folder FRS and search through the index to locate the files that need to be loaded during boot. The boot code looks for NTLDR which looks for the %SYSTEMROOT% folder so it can find Ntoskrnl.exe. As long as the entries for both of these are in the base FRS, there is no problem. After the index has become fragmented, the entries for NTLDR and %SYSTEMROOT% are still in the base FRS.
CHKDSK can cause the index fragments to become re-ordered, moving the entries for NTLDR and/or %SYSTEMROOT% out of the base FRS.
If this happens, your only solution is to format the partition and reinstall. If you have a backup, you can then restore.
About the Author
You May Also Like