2

I'm trying to make a FAT16 filesystem on my Ubuntu.

So, I first create the file with dd if=/dev/zero of=Fat16.bin bs=1024 count=8192.

This will create a 8MB file full of zeros.

Then, I format this file to be a FAT16 filesystem by issuing the following command: mkfs.vfat -f2 -n FAT16 -r 224 -s8 -S512 -F16 Fat16.bin.

But that gives me the following error.

WARNING: Not enough clusters for a 16 bit FAT! 
The filesystem will be misinterpreted as having a 12 bit FAT without mount option "fat=16"

As far as I'm concerned, the minimum size of a FAT16 filesystem is 4MB, so I don't understand what's happening here.

Tobia Tesan
  • 1,938
  • 17
  • 29
vicaba
  • 2,836
  • 1
  • 27
  • 45

2 Answers2

2

I've found the answer,

from https://staff.washington.edu/dittrich/misc/fatgen103.pdf (See "FAT Type Determination") the number of clusters must be between 4085 <=> 65525 to format a valid FAT16 partition. So the partition must be greater enough to store 4085 clusters + metadata information such as FAT tables.

vicaba
  • 2,836
  • 1
  • 27
  • 45
1

Probably it's what it says - Not enough clusters for a 16 bit FAT. I guess the needed space could be calculated, but trying e.g. 16Mb doesn't cause this warning:

$ dd if=/dev/zero of=Fat16.bin bs=$((1024*1024)) count=16
16+0 records in
16+0 records out
16777216 bytes (17 MB) copied, 0.0561285 s, 299 MB/s

$ mkfs.vfat -v -f2 -n FAT16 -r224 -F16 Fat16.bin
mkfs.fat 3.0.26 (2014-03-07)
Fat16.bin has 64 heads and 32 sectors per track,
hidden sectors 0x0000;
logical sector size is 512,
using 0xf8 media descriptor, with 32768 sectors;
drive number 0x80;
filesystem has 2 16-bit FATs and 4 sectors per cluster.
FAT size is 32 sectors, and provides 8171 clusters.
There is 1 reserved sector.
Root directory contains 256 slots and uses 16 sectors.
Volume ID is 30bd4358, volume label FAT16      .
dekkard
  • 6,121
  • 1
  • 16
  • 26