Linux mkdosfs for Windows NT/2K/XP

Windows NT based systems are limited to 32GB as the maximum size of  the FAT32 file systems they can create. But these systems can use larger FAT32 file systems fine if you create these on some other system. This is not necessarily a problem for fixed disk drives, as one would probably format these using the NTFS file system anyways. But on removable media like external firewire disks it is often desireable to format these using the FAT32 format for exchanging data with non-Windows systems. If you still have a bootable Windows 98/ME on your system you can boot this and create the large FAT32 file system using the older Windows version. As rebooting is inconvenient and I do have only XP on my system, I ported the Linux mkdosfs command line tool to Windows. This tool allows you to format FAT32 partitions larger than  32GB from the Windows NT/2K/XP command line. To format drive X: one would type:

c:\>mkdosfs -v -F 32 -n volname X:

The option -v is for verbose execution, -F 32 for FAT32 (16 is the default) and -n volname is the desired volume label. Mkdosfs determines the volume size from the partition table. For advanced usage consult the manual page in the zip archive or run mkdosfs without arguments to print the usage information.

Download the mkdosfs.zip archive containing a compiled Windows binary or download the dosfstools-2.11.src.zip archive containing the source code.

Update 10-Dec-2012: Added a patch from Robert Sprowson to fix a sign extension bug causing lseek failed error messages for volumes around 2G in size.

Update 7-Jun-2006: I fixed the error message handling to not display nonsense error strings from the C library if the error occured in a WIN32 API function. As I do not have Visual C 6 installed any longer, I added a Makefile.dos (for GNU make) for the free command line compiler Visual C++ Toolkit 2003.

Update 9-Nov-2006: Added a patch from Alex Cherney to fix a bug related to hidden sectors. Also merged the 2.11 version of dosfstools, see the CHANGES file in the source archive for changes. Removed the old VC 6 project files as these are not maintained any longer.

Jens-Uwe Mager