Friday 10 January 2014

How to format an external hard drive as FAT32 in Windows 7

The options in Disk Management in Windows 7 for formatting an external HDD is NTFS or exFAT.

I need a drive to swap between an iMAC and a Windows 7 PC.
A Mac will read an NTFS drive but wont write to it so I have been using USB memory sticks.

Today I found out how to format a large SATA external drive as FAT32  to make this process easier.

A small program called fat32format.exe is run through the Command Prompt (cmd) and run at Administrator level.
It is important that any explorer windows are closed that refer to the drive being formatted as an error code results if not.

How to
Download a copy of fat32format.
http://www.ridgecrop.demon.co.uk/fat32format.htm
Extract the single EXE file to somewhere suitable, like C:\.
Click Start-Run and enter
    cmd
Note :- Run as Administrator
When the command prompt opens, type this - C:\ is the place you extracted the exe file to. Note if this sort of command line stuff makes your head hurt, you should probably give this a try instead
    CD /D C:\

press enter and then type this. You need to replace f: with the drive letter you are trying to format.
    fat32format f:

You should see this displayed
    Warning ALL data on drive 'f' will be lost irretrievably, are you sure (y/n)

Now when it says this, it really means it. If you format the boot sector, FATs and root directory will be filled with zeros. By typing pressing Y and hitting return, you're also absolving me of liability for whatever was on the disk before.

Assuming you don't bail out at this point you should see something like this -
    Warning ALL data on drive 'f' will be lost irretrievably, are you sure
    (y/n) :y
    Size : 250GB 488392002 sectors
    512 Bytes Per Sector, Cluster size 32768 bytes
    Volume ID is 1bdb:2c1d
    32 Reserved Sectors, 59604 Sectors per FAT, 2 fats
    7629261 Total clusters
    7629260 Free Clusters
    Formatting drive f:...
    Clearing out 119304 sectors for Reserved sectors, fats and root cluster...
    Wrote 61083648 bytes in 0.988463 seconds, 61796609.106193 bytes/sec
    Initialising reserved sectors and FATs...
    Done

This means that all has gone according to plan. It should take about 4 seconds per Terabyte to format the disk. You can run chkdsk f: at this point if you're curious, and see something like this -
    The type of the file system is FAT32.
    Volume Serial Number is 1BDB-2C1D
    Windows is verifying files and folders...
    File and folder verification is complete.
    Windows has checked the file system and found no problems.
    244,136,352 KB total disk space.
    244,136,320 KB are available.
   
         32,768 bytes in each allocation unit.
      7,629,261 total allocation units on disk.
      7,629,260 allocation units available on disk.

Result for Drive I 80GB Drive

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Users\Terry>cd downloads
C:\Users\Terry\Downloads>cd fat32format
C:\Users\Terry\Downloads\fat32format>dir
 Volume in drive C is Windows 7
 Volume Serial Number is E4EE-F3D0
 Directory of C:\Users\Terry\Downloads\fat32format
10/01/2014  08:35              .
10/01/2014  08:35              ..
10/01/2014  08:35            49,218 fat32format.exe
               1 File(s)         49,218 bytes
               2 Dir(s)  169,662,734,336 bytes free

C:\Users\Terry\Downloads\fat32format>fatformat32.exe
'fatformat32.exe' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Terry\Downloads\fat32format>fat32format.exe
Usage Fat32Format X:
Erase all data on disk X:, format it for FAT32
It is also possible to specify a cluster size for the disk, e.g
Fat32Format -c1 X:  - use 1 sector per cluster ( max size 137GB for 512 bytes pe
r sect)
Fat32Format -c2 X:  - use 2 sectors per cluster ( max size 274GB for 512 bytes p
er sect )
Fat32Format -c4 X:  - use 4 sectors per cluster ( max size 549GB ... )
Fat32Format -c8 X:  - use 8 sectors per cluster ( max size 1TB ... )
Fat32Format -c16 X: - use 16 sectors per cluster
Fat32Format -c32 X: - use 32 sectors per cluster
Fat32Format -c64 X: - use 64 sectors per cluster
Fat32Format -c128 X: - use 128 sectors per cluster (64K clusters)
Version 1.07, see http://www.ridgecrop.demon.co.uk/fat32format.htm
This software is covered by the GPL
Use with care - Ridgecrop are not liable for data lost using this tool
C:\Users\Terry\Downloads\fat32format>fat32format i:
Warning ALL data on drive 'i' will be lost irretrievably, are you sure
(y/n) :y
Failed to open device - close any files before formatting and make sure you have
 Admin rights when using fat32format
 Are you SURE you're formatting the RIGHT DRIVE!!!
GetLastError()=32: The process cannot access the file because it is being used b
y another process.

C:\Users\Terry\Downloads\fat32format>fat32format I:
Warning ALL data on drive 'I' will be lost irretrievably, are you sure
(y/n) :y
Failed to open device - close any files before formatting and make sure you have
 Admin rights when using fat32format
 Are you SURE you're formatting the RIGHT DRIVE!!!
GetLastError()=32: The process cannot access the file because it is being used b
y another process.

C:\Users\Terry\Downloads\fat32format>fat32format I:
Warning ALL data on drive 'I' will be lost irretrievably, are you sure
(y/n) :y
Failed to open device - close any files before formatting and make sure you have
 Admin rights when using fat32format
 Are you SURE you're formatting the RIGHT DRIVE!!!
GetLastError()=32: The process cannot access the file because it is being used b
y another process.

C:\Users\Terry\Downloads\fat32format>fat32format i:
Warning ALL data on drive 'i' will be lost irretrievably, are you sure
(y/n) :y
FSCTL_ALLOW_EXTENDED_DASD_IO OK
Size : 73GB 143577088 sectors
512 Bytes Per Sector, Cluster size 32768 bytes
Volume ID is 100a:392e
32 Reserved Sectors, 17523 Sectors per FAT, 2 fats
2242843 Total clusters
2242842 Free Clusters
Formatting drive i:...
Clearing out 35142 sectors for Reserved sectors, fats and root cluster...
Wrote 17992704 bytes in 0.78 seconds, 21.88 Megabytes/sec
Initialising reserved sectors and FATs...
Done
C:\Users\Terry\Downloads\fat32format>

9 comments:

  1. This was a great help. Thanks!

    ReplyDelete
  2. i'm getting an error saying getlasterror()=32 process cannot access file because it is being used by another process. I've restarded my pc and didn't try to access the sd card. any suggestions?

    ReplyDelete
  3. same problem here. hope someone responds.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. same problem, I have been searching for days how to solve it...

    ReplyDelete