Bug 57565 - mkfs.msdos should autodetect fat32
Summary: mkfs.msdos should autodetect fat32
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dosfstools   
(Show other bugs)
Version: 7.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: David Lawrence
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2001-12-16 00:34 UTC by Need Real Name
Modified: 2007-04-18 16:38 UTC (History)
0 users

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

Attachments (Terms of Use)

Description Need Real Name 2001-12-16 00:34:20 UTC
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-16 04:46:49 UTC
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-15 00:40:47 UTC
filing as enhancement

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