Bug#348695: kernel-source-2.6.8: vfat/fat is too picky on media descriptor
Package: kernel-source-2.6.8
Version: 2.6.8-16
Severity: normal
We're the IT support group for our mathematical institute and
we're having trouble with some USB-sticks. The vfat module is
not able to mount some of them because the media descriptor
byte is 0xB9 instead of being between F0 and FF as the module
wants it to be.
The USB sticks are preformatted (by toshiba in this case) and
they work under openBSD, netBSD, windows and MAC, only the
linux kernel complains here.
Just reformat is not always an option if you have data on it
and you don't want to loose it. (We have a quite mixed userbase
here with a lot of windows users)
We did some research on MSDN and discovered that the definition
of the media descriptor is not that well formulated.
On the link below they say that these values are the valid ones
(F0-FF)
http://support.microsoft.com/default.aspx?scid=kb;en-us;75131
And here they say that the list shows *some* valid values
http://support.microsoft.com/default.aspx?scid=kb;en-us;140418
In <kernel-source>/fs/fat/inode.c the media descriptor is only
used to verify the partition type. As we have seen above this
may not be correct to be that picky there.
A possible solution could be to "soften" the check in
/usr/include/linux/msdos_fs.h for FAT_VALID_MEDIA(x) which
currently looks like this:
#define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0)
IMHO this bug should be forwarded to upstream for further
discussions, because I think that toshiba sells a lot of "broken"
USB-sticks and this should be handled.
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)
Versions of packages kernel-source-2.6.8 depends on:
ii binutils 2.15-6 The GNU assembler, linker and bina
ii bzip2 1.0.2-7 high-quality block-sorting file co
ii coreutils [fileutils] 5.2.1-2 The GNU core utilities
-- no debconf information
Reply to: