Bug 531035 - mkfs.vfat creates bad filesystems
Summary: mkfs.vfat creates bad filesystems
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dosfstools
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-26 15:35 UTC by Dave Jones
Modified: 2015-01-04 22:31 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-02-18 10:04:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Jones 2009-10-26 15:35:20 UTC
There's something fishy with mkfs.vfat.
The filesystem it creates mounts fine in Linux, but is unmountable in Windows XP, or Mac OS X.

Comment 1 Dave Jones 2009-10-26 20:44:54 UTC
When run with -v, mkfs.vfat prints this ..

mkfs.vfat 3.0.1 (23 Nov 2008)
/dev/sdb1 has 5 heads and 51 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 257244 sectors;
file system has 2 16-bit FATs and 4 sectors per cluster.
FAT size is 251 sectors, and provides 64177 clusters.
Root directory contains 512 slots.
Volume ID is 9042fa4f, no volume label.


I wrote a program to dump the structure of the filesystem. When formatted on OSX, it reports the number of heads == 16, and sectors per track==32.
I suspect mkfs.vfat is misinterpreting the geometry from my usb memory stick.

Comment 2 Bug Zapper 2009-11-16 14:21:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Jaroslav Škarvada 2010-03-16 13:55:50 UTC
I think the geometry here are purely virtual numbers and are not important for correct function.

Please check the USB memory stick for bad memory cells. For Windows there exists nifty tool called CheckFlash, it uses patterns that can spot bad cells even in situations where filesystems based checking tools are silent.

Also please try dosfstools-3.0.9-2.fc14 from rawhide with many bug fixes. Please report if the problem persists.

Comment 4 Dave Jones 2010-07-13 03:29:44 UTC
flash is fine, and verifies every block ok.

still happens with rawhide (dosfstools-3.0.9-3.fc14.x86_64)

plug into mac, and it pops up a dialog asking if I want to initialize it because it's unreadable.

Comment 5 Bug Zapper 2010-07-30 10:46:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Jaroslav Škarvada 2010-10-19 13:05:42 UTC
Please try to zero your device (or at least 512 bytes of MBR) by following command (assuming your memory stick is /dev/sdb):
# dd if=/dev/zero of=/dev/sdb 

Then reinitialize your MBR by 'fdisk /dev/sdb', create new partition table (command 'o'), create new partition (command 'n'), write (command 'w').

Then reformat with mkfs.vfat and recheck.

If the problem still persists, please try to change your geometry in fdisk: command 'x', commands 'h' and 's'. Then reinitialize your MBR (see above), reformat and recheck.

Also please report what fdisk thinks about your geometry (command 'p'). I am unable to reproduce this. I have tried with several USB sticks with geometry deduced from comment 1 and it worked as expected (I tested on Win 7 and Win XP, but not on Mac).

Comment 7 Jaroslav Škarvada 2011-02-18 10:04:31 UTC
I am unable to reproduce this, even when simulating the geometry from comment 1 on all of my usb sticks (tested with and without MBR) thus closing as CANTFIX.


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