Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 57565 - mkfs.msdos should autodetect fat32
mkfs.msdos should autodetect fat32
Product: Red Hat Linux
Classification: Retired
Component: dosfstools (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
David Lawrence
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2001-12-15 19:34 EST by Need Real Name
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-10 05:06:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-12-15 19:34:20 EST
Description of Problem:

i'm trying to create a disk of windows vfat under linux.  so, i use
mkfs.msdos, but i get:
[root@spam-o-rama /mnt]# mkfs.msdos  /dev/hdc1
mkfs.msdos 2.7 (14 Feb 2001)
mkfs.msdos: Attempting to create a too large file system

ok, my disk size is:
/dev/hdc1             1    116301  58615672+   c  Win95 FAT32 (LBA)

in the man pages and i on the i found nothing helpful at trying to get me
around this problem.  eventually, i tried the "-S 32768" option for 32k
logical sectors and that created a disk with no errors, but then mount gave
me a bad fs error.  so, i upgraded from dosfstools 2.2 to 2.7, did the same
mkfs, mkfs with -S, and mount and got the same errors.

then, i noticed that mkfs has a new -F option.  so, i did mkfs.msdos -F 32
/dev/hdc1 and after 10 seconds, it worked and i mounted the drive which
also worked.

restated, the problem with mkfs is that is doesn't check the fs type and
apply the 32 option unless you specifically give the option.  it should
look at the fs and apply this option if necessary.  it does already do
guessing for fat sizes of 12 and 16 bits, so why not 32 bit?

converserly, update that "too large" message to give a hint or point you to
the man page where it'd mention to use the -F option.

Version-Release number of selected component (if applicable):
dosfstools v2.7 and v2.2
Comment 1 Need Real Name 2001-12-15 23:46:49 EST
while i'm here, i should also mentioned that when creating with only -F 32 still
gives me errors:

[root@spam-o-rama /mnt]# fsck.msdos -v /dev/hdc1
dosfsck 2.7 (14 Feb 2001)
dosfsck 2.7, 14 Feb 2001, FAT32, LFN
Warning: FAT32 support is still ALPHA.
File system has 14641732 clusters but only space for 6236798 FAT entries.

perhaps fat32 cannot handle 60gig drives of partition type "c"?  is this a
limitation of linux's implementation or of the fat32 standard?  inquiring man
pages want to know.

i broke down and divided the disk into to partitions.  and it worked fine.

however, trying to set the sector size to 32k (via -S 32xxx) instead of the
default causes mount to fail.  however, fsck.msdos says nothing is wrong with
the partition. can mount (or the kernel) handle only the default sector size on
fat32 partitions?  i'm using kernel2.4.12.
Comment 2 Matt Wilson 2002-12-14 19:40:47 EST
filing as enhancement

Note You need to log in before you can comment on or make changes to this bug.