Print this page

Compact Flash Tools

Compact Flash Format Tools

USB Disk Storage Format -
The somewhat hard to find format utility is known to fix iPod drives with corrupted file systems or data structure. It appears this format tool also has the capability to format FAT, FAT32, and NTFS even if the Compact Flash does not support the file system and disk management does not give the option to format it as such. This tool has a quick format as well as standard format, and also has the ability to create DOS bootdisk if the path to DOS system files are specified. Hiren's BootCD uses this utility to load the BootCD onto a USB flash drive for alternate booting method. This tool will only format any devices connected through USB interface. HP no longer provides this useful utility on their website, so we can consider this one discontinued, though a newer version is still available from their website and below.

Tom at RidgeCorp Consultants developed this great application for formatting any hard drive into FAT32 file system on any Windows 32-bit operating system. The purpose of this program is to get around the 32GB FAT32 file system format limit imposed by the Windows 2000 and XP disk management. This is a vital tool for Windows XP users who wish to format their hard drives larger than 32GB without switching to Windows 98, or other OS with the limitation. Drives formatted with FAT32 are universally supported by any version of Windows, Linux, Mac, Solaris, etc. FAT32 is essential for users with larger drives containing video/audio files using their media on multiple OS.
Note that FAT32 will only support up to a maximum size of 4GB for each single file.

Simplified instructions:

1. Use disk management to initialize the target disk
2. Select new partition, navigate through menu selecting maximum possible capacity used.
3. When asked to ask, select "Do not format this partition", then complete.
4. Open command prompt and navigate to directory containing fat32format.exe

fat32format D:
Replace D with target drive letter. Make no mistake!
Allow some time for file system to be written, then check back disk management and the disk should now be FAT32.

For in depth instructions and useful information about this program as well as the FAT32 file system, please go to RidgeCorp Consultants website:

HP's new format tool comes as an installer. It installs a DOS based version and Windows version of the HP USB format tool directly onto C:\. It appears this format tool also has the capability to format FAT, FAT32, and NTFS even if the Compact Flash does not support the file system and disk management does not give the option to format it as such. This tool has a quick format as well as standard format, and also has the ability to create DOS bootdisk if the path to DOS system files are specified.

Memory Card Safe Eraser -
Originally created as a simple application to securely erase content on flash media so that even data recovery tools cannot obtain sensitive information. I am testing this one as an alternative to formatting using the X-Wall Cipher encryption to remove bootloaders and erase corrupted mbr. It seems that this program does not actually entirely remove boot sectors. After a format, booting from the formatted CF shows "99 99 99 99 99 99..". Fdisk still shows the Linux swap and FS. An alternative to this may be to simply use a camera to format, though a format done with camera will also load the camera's extra formatting. This program and photorec.exe are free from their website:

The commonly used partition tool for 16-bit DOS systems. Able to display partition information, create partitions, delete partitions, select volumes, and set active. Some other parameters:

fdisk /status
this checks the status of all the connected volumes

fdisk /mbr
repairs the master boot record.

16-bit DOS system partition formatter for use after the partition has been created by fdisk.

format D:
formats the specified drive by DOS drive letter assignment (in the example, D). Make sure this one is correct!

format D: /S
formats the specified drive by DOS drive letter assignment, then copies over system files to make the partition bootable. Drive must be set active through fdisk first. If correctly done, the media should be bootable.

Compact Flash Misc. Utilities

Bootprep.exe -
Microsoft's vital DOS-based application for preparing a hard drive formatted as FAT or FAT32 to boot with XPe's NTLDR. If this is not done, you will not be able to successfully boot even with a properly created build on the hard drive or flash media. Common indications of this are "disk read error" or blinking cursor right after BIOS POST. Bootprep must be run in a true DOS environment. I suggest just loading this onto a bootdisk or FreeDOS along with fdisk and format tools.

To use bootprep:

Replace D with target drive letter.

Target Analyzer Probe -
Windows Embedded's tap.exe will automatically probe the system it is run on for all the hardward devices, to then be used in Windows Embedded's Component Designer. It is always recommended to use Target Analyzer Probe as opposed to Target Analyzer for the highest possible chance of successful boot and the most complete diagnostic of hardware components on the target machine. However, this is a 32-bit app, so older systems not capable or difficult to boot a Win32 operating system will need to use ta.exe

Target Analyzer -
It (target analyzer) will only find child devices such as PS/2 mouse devices and keyboards, and communication and printer ports. TA.exe will not find such devices as the system's disk drive, USB peripherals and hubs, floppy disk drives, and advanced configuration and power interface (ACPI) devices such as power buttons, fans, and thermal controls.
As documented on MSDN

Microsoft UFD Preparation Tool for Windows Embedded(ufdprep.exe) -
Windows 32bit formatting tool for preparing a removable type flash media or storage medium with USB interface for booting. Fixed disk media will not work, as well as USB drive enclosures or USB flash readers which support detecting as fixed disk. For fixed disk, use the standard disk tools. For a XPe build booting from USB, remember to include the USB 2.0 Boot component along with additional USB components listed in the XPe components page.

ufdprep /ntfs F:
Replace F with target drive letter. /NTFS parameter uses NTFS FS.

The program should come included with Windows 2000/XP. I have included it here for Win32 users without the standard build of 2000/XP. Converts FAT32 -> NTFS, or NTFS -> FAT32. Converting to NTFS will not erase the data on the disk, but it irreversible. Converting to FAT32 will erase the data.

convert F: /FS:NTFS
Replace F with target drive letter. NTFS parameter can be changed to FAT32.

Hitachi CompactFlash fixed disk filter driver -

The filter driver for Windows XP environment developed by Hitachi to make any Compact Flash detect as fixed disk. this filter does not actually modify the fixed disk/removable bit as the SanDisk or Samsung fixed disk utilities have been doing, but instead changes the method in which XP identifies them in the registry. Therefore, modifying the detection in one OS will not carry on to other computers. However, this tool can be used on ANY compact flash, allowing the previously impossible hibernation and EWF features to be used on removable CF. Not considered a guarantee fix.

In regedit on target system, navigate to the above path. Determine the interface used to connect the CF to the computer, whether it is USB (USBSTOR), IDE, SATA (most likely detected SCSI). Locate the CF you plan to set as fixed and expand tree:

In this situation you would need the value (Extreme IV as the example here):


Where each of these indicate that the following digits after each are the:

&Ven = vendor
&Prod = product model
&Rev = revision

In the expanded folder open the Hardware ID multi-string value for a string similar to this (Extreme IV as example):


included as well: USBSTOR\Disk
8 digits: SanDisk_
16 digits: SDCFX-2048______
4 digits: HDX_

The first line should be the combination of the vendor (8 digit code), product model (16 digit code), revision (4 digit code). It is always recommended to copy and paste in this situation, a single incorrect digit would make the identification for the driver invalid. Extract the filter driver and open up cfadisk.inf for editing. Find the following section:

%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-11000__________________________SC2IC801
%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-11000__________________________SC2IC815
%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-11000__________________________SC2IC915

%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-10512__________________________SC1IC801
%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-10512__________________________SC1IC815
%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-10512__________________________SC1IC915

%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DMDM-10340__________________________MD2IC501
%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DMDM-10340__________________________MD2IC601
%Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskSanDisk_SDCFX-2048______HDX_

The SanDisk Extreme IV is now included. Locate the drive in device manager and update the driver with the driver cfadisk.inf. disk.sys will be needed. For personalization during driver install modify the below string to the target device.

HGST = "Hitachi Global Storage Technologies"
Microdrive_devdesc = "Hitachi MicroDrive "

MBRFix.exe -
Windows 32-bit mbrfix utility created by Systemintegrasjon. Use this if the DOS based fdisk /mbr is not an option.

Some of the more commonly used parameters:

MbrFix /drive driveinfo
Display drive information

MbrFix /drive listpartitions
Display partition information

MbrFix /drive savembr
Save MBR and partitions to file

MbrFix /drive restorembr
Restore MBR and partitions from file

MbrFix /drive fixmbr
Update MBR code to W2K/XP/2003 or Vista

MbrFix /drive clean
Delete all partitions in MBR

For the complete list, go to the product page:

DMACheck.exe -
An older Windows NT 4.0 tool for checking DMA. This is a convenient method to diagnose whether or not your flash media is in PIO or DMA if your IDE channel device drivers seen in device manager have been modified so it does not show any details (VIA!). Also have limited ability to change settings if applicable. This tool is included with NT 4.0 SP3.

Skymedi Fix 2GB Capacity -
This tool fixes the capacity of certain 2GB flash media cards(primarily SD) showing up as only 1GB. This tool can be obtained from RiDATA. Works on Windows and Mac. Will not work with flash media above 2GB in capacity.

This handy Win32 tool resizes the specified file to any size you wish accurate to the byte. Useful for testing file transfer speeds, or writing on the entire space in a disk to prevent data recovery. Increased file sizes cannot be undone!

resize +1000000 testfile.000
where resize is the executable file, 1000000 is the new size of the file, and testfile.000 is the file to be resized.

Compact Flash Cloning Tools

WinHex - free trial
Hex Editor with many other features, such as hard disk or flash media cloning, multiple-OS directory browser, file splitter and concatenation, RAID recovery, data recovery, and even zero fill (low level format). WinHex can also be used for hex editing the MBR. These are only a small fraction of the list of various features. I use WinHex mainly for editing the boot sectors, zerofill (use Fill Disk Sectors, and use hex 00), and clone my Compact Flash.

A 4GB CF took approximately 20 minutes and copied over all the contents byte for byte regardless of format or boot method.

Note that a smaller destination media, no matter how little difference, will not successfully clone with the "Copy Entire Medium" selected. Defragment the larger source disk so all the data is moved to the beginning of the sectors, then clone as many sectors as possible onto the destination disk by specifying the highest amount of sectors you can. in the dialog box. Even so, this may not work if the partition requires the entire partition (I believe this applies particularly to NTFS FS) In this situation, you must resize the source disk using a partition resizer.

Extreme IV took approximately 1 1/2 min. to zerofill.

This program is not free; it has an unlimited trial showing the features. For great DOS disk cloning, I recommend X-Ways Replica 2.36 (not available for free trial). To see the full feature list, browse other programs created by X-Ways, and check pricing, I suggest a visit to their website:

Physdiskwrite 0.5.1 -
M0n0wall's Windows NT/2000/XP tool for writing images to raw disks such as flash media. This program accepts only .img file extensions.

physdiskwrite [-u]
The -U parameter removes the 2GB safety limit to prevent accidental format of disk drives (with their larger volume sizes). However, most of the CF I have are above 2GB. It shouldn't be too difficult to locate the flash media. Hard disks generally have model/part # information as well as the cylinders, headers, sectors etc.

M0n0Wall's physdiskwrite containing the latest version and more information: