Friday, May 3, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3637  / 3 Years ago, sun, october 31, 2021, 12:26:36

I'm trying to make convert an img file to FAT32.



Here is the code I execute:



sudo dd if=/dev/zero of=./testImage bs=10000000 count=1


Then the output I get is:



1+0 records in
1+0 records out
10000000 bytes (10 MB) copied, 0.0609494 s, 164 MB/s


Then if I do this code:



sudo mkfs.vfat -F 32 ./testImage


Then the output I get is:



mkfs.vfat 3.0.12 (29 Oct 2011)
WARNING: Not enough clusters for a 32 bit FAT!


I am trying to debug my code but I can't create a FAT file to debug...


More From » command-line

 Answers
5

10 MB is not big enough for FAT32. Typical use cases for FAT32 are disks larger than 512 MiB, below that usually FAT16 is used.



It seems that the minimum size is somewhere around 33 MiB:



$ dd if=/dev/zero of=./testImage bs=1M count=33
33+0 records in
33+0 records out
34603008 bytes (35 MB) copied, 0.0230871 s, 1.5 GB/s
$ mkfs.vfat -F 32 -v ./testImage
$





By the way, you do not need to use sudo for any of these commands if your user has permissions to create files in the current directory (.)


[#28192] Monday, November 1, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
iething

Total Points: 49
Total Questions: 127
Total Answers: 112

Location: Luxembourg
Member since Tue, Jan 25, 2022
2 Years ago
;