Red Hat Bugzilla – Bug 57565
mkfs.msdos should autodetect fat32
Last modified: 2007-04-18 12:38:44 EDT
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
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
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.
filing as enhancement