CONVERTING
FAT TO NTFS

by Lance Jensen
Executive Software Tech Support Director


As time passes, more and more Windows NT users are running into problems because their
Master File Tables (MFTs) are fragmenting. This is because the MFT is used for every disk I/O. While much of the MFT can be cached so that an actual disk I/O does not have to be done every time a file is used, it is still true that, on most systems, the MFT is accessed
more than any other file. This means that MFT fragmentation is likely to have more impact on the system than fragmentation of any other single file. The worst cases occur on partitions that were converted from FAT to NTFS, because the conversion process usually fragments the MFT as it is created.

In this article, we lay out the procedures for creating clean NTFS partitions. To find out more about the MFT itself, see the article "The Master File Table (MFT): What It Is and What It's For" in eLetter Volume 2, Issue 5. To find out more about MFT fragmentation, see the article, "MFT Fragmentation" in eLetter Volume 3, Issue 3.

Most Partitions

The System partition is the one that your BIOS checks to start the boot process, usually C:. The Boot partition is the one on which Windows NT is installed. Usually this is also the System partition. If the partition you want to convert is not System or Boot, you can convert from FAT to NTFS by simply copying the entire partition to a tape or another partition,
reformatting the partition as NTFS, and copying the files back. This does not work on Boot because that's where you have the files used to do the formatting, or on System because the reformat would wipe out the boot sector and you would not be able to reboot your machine.

Converting Boot to NTFS

The Boot partition created while installing Windows NT is a FAT partition. If you choose during installation to use the NTFS format, the partition is still created as FAT, and only converted to NTFS after the first boot. This means you get the initial system files written to the beginning of the disk, then, when the conversion is done, the MFT is created.

If you are installing Windows NT on a new disk, select to install it to C:, making C: a FAT partition, not NTFS. Do a minimum installation, because you will be deleting these files shortly. When the installation completes, Bring up Disk Administrator (click Start, go to Programs, Administrative Tools, and click Disk Administrator) and create a new partition with NTFS format.

If you already have Windows NT installed on your System partition, create a new NTFS partition as described above (or select an existing one).

Now do your full installation of Windows NT to the new partition and boot into it; this is now your permanent Boot partition.

Converting System to NTFS

If System is also the Boot partition, create a new Boot partition as described above.

Now follow these steps:

* Start Windows NT Explorer
* Click the C: partition
* On the Menu Bar, click View, Folder Options
* Click the View tab
* In the Advanced Settings box, locate Hidden Files
* Under Hidden Files, click the "Show all files" button
* Click Apply, then OK.
* In the C: folder you will see files called Boot or Boot.ini and NTLDR.
Copy these files to your Boot partition.
* Delete all files on C:
* Copy Boot.ini and NTLDR back to C:
* Reboot to the Boot partition
* Delete boot.ini and NTLDR from C:
* Click Start, Run
* In the Open box, type "convert C: /fs:ntfs" (omit the quotes)
* Copy Boot.ini and NTLDR back to C:

Why These Methods Work

When a partition is created as NTFS, about 12% of the partition is pre-allocated as the MFT zone, which is expansion space for the MFT. The MFT is placed at the start of the MFT zone. Thus you have a large contiguous expansion space, and the MFT should not fragment unless you fill the partition too full. But when you convert a partition from FAT to NTFS,
there are already files at the start of the partition, so the MFT zone has to be placed wherever there is space available. It is very rare to have 12% of a partition as contiguous free space, so the MFT zone is created as dozens or hundreds of fragments. As the MFT extends, it too becomes very fragmented.

Using the method described above, you empty the partition completely, then put back one file. Now all you have is the C: folder and boot.ini. When you reboot, the "next free space" pointer for C: is reset to point to the very first free space, right at the start of the partition. Now when you run the convert command, the MFT zone goes at the start of the disk where it
belongs. You may have the C: folder file and boot.ini in the MFT zone, but that only adds two fragments to the MFT; two fragments is not significant.

Incidentally, never use a 512 byte cluster size on an NTFS partition. The MFT records are all 1024 bytes, so the smaller cluster size means MFT records may get fragmented. Don't worry about wasting disk space. First, files that are small enough are stored entirely within their MFT records, and second, disk space is so cheap now that the time you lose because of
slow I/O is much more expensive.

-----------------------------------------------------------------------------------------------------
Lance Jensen is
Executive Software ace Tech Support Director, and has great experience with both Windows NT and Digital's OpenVMS operating systems. He can be reached at dknt_support@executive.com. Please feel free to write to him with questions or comments about this article.

CONTACT EXECUTIVE SOFTWARE
http://www.execsoft.com/


@Macarlo, Inc.
@Macarlo's Shareware & Web
OS/2
Java Lobby Member
Java Site Accredited

[TOP] [HOME] [INDEX]