After upgrading util-linux from 2.12-r4 to 2.12b the auto-detection of vfat does not work. I have an usb stick here with vfat as its filesystem. But when I mount it it is mounted as msdos filesystem which breaks long filenames, etc. . Only mounting with type forced (mount -t vfat) works. auto recognizes msdos which is definitely wrong. Reproducible: Always Steps to Reproduce: 1. emerge =util-linux-2.12b 2. mount /dev/sda1 /mnt/stick 3. mount Actual Results: vfat mounted as msdos Expected Results: Mounted as vfat Portage 2.0.50-r10 (default-x86-1.4, gcc-3.3.4, glibc-2.3.4.20040808-r0, 2.6.8-ck4) ================================================================= System uname: 2.6.8-ck4 i686 AMD Duron(tm) Gentoo Base System version 1.5.3 distcc 2.17 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=i686 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/share/config:/usr/kde/3.3/env:/usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=i686 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="3dnow X aalib acl acpi acpi4linux alsa apache2 apm avi berkdb blender-game bonobo bootsplash bzlib cdparanoia cdr clanVoice crypt cups dba dedicated dga divx4linux doc dvd encode escreen esd fbcon foomaticdb freetype gd gdbm gif gnome gpm gtk gtk2 imagemagick imlib java jpeg libg++ libwww mad mailwrapper mbox mikmod mmx motif mpeg mysql ncurses net nls oggvorbis opengl oss pam pdflib perl png python quicktime radeon readline rtc ruby samba sdl session silverxp slang sockets spell spl sse ssl stencil-buffer svga tcltk tcpd tetex tokenizer truetype usb videos wxwindows x86 xchattext xfs xml2 xmms xpm xv zlib"
works fine for me ... root@vapier 0 ~ # mount /dev/hda1 /mnt/windows/ root@vapier 0 ~ # mount | grep windows /dev/hda1 on /mnt/windows type vfat (rw) and no, it is not listed in my /etc/fstab ... how big is the usb stick ? what if you try this: dd if=/dev/sda1 of=disk count=1024 file disk my windows partition looks like this: root@vapier 0 ~ # dd if=/dev/hda1 of=disk count=1024 1024+0 records in 1024+0 records out root@vapier 0 ~ # file disk disk: x86 boot sector, code offset 0x58, OEM-ID "MSWIN4.1", sectors/cluster 8, Media descriptor 0xf8, heads 255, hidden sectors 63, sectors 13028652 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 12700, rootdir cluster 315611, reserved3 0x1800000, reserved 0x1, serial number 0xa161f00, label: " WH0RD"
this also works fine for me: root@vapier 0 ~ # dd if=/dev/zero of=disk count=1024 1024+0 records in 1024+0 records out root@vapier 0 ~ # mkfs.vfat -F 32 disk mkfs.vfat 2.10 (22 Sep 2003) root@vapier 0 ~ # file disk disk: x86 boot sector, code offset 0x58, OEM-ID " mkdosfs", sectors 1024 (volumes <=32 MB) , Media descriptor 0xf8, heads 64, FAT (32 bit), sectors/FAT 8, serial number 0x41840ca9, label: " " root@vapier 0 ~ # mount -o loop disk /mnt/temp/ root@vapier 0 ~ # mount | grep disk /root/disk on /mnt/temp type vfat (rw,loop=/dev/loop0)
The size of the stick is 256 MB. # file img img: x86 boot sector, code offset 0x3c, OEM-ID " mkdosfs", sectors/cluster 8, root entries 512, Media descriptor 0xf8, sectors/FAT 250, heads 16, sectors 511456 (volumes > 32 MB) , serial number 0x413cc3e1, label: " ", FAT (16 bit) So, obviously it is a FAT-16 but I made it with mkfs.vfat!! So it also should be recognized as vfat! When I mount it with 2.12b it is auto-detected as msdos filesystem and therefore the filenames have that bad 8.3 format. When mounted explicitely as vfat I have the full filenames again. The mount of 2.12-r4 detected the fs type of the stick as vfat, too - as it should be. I have several sticks with different file systems that I want to mount via one fstab entry and therefore auto is required.
ah, i can reproduce it now ... see what happens when you provide more info ? :) root@vapier 0 ~ # dd if=/dev/zero of=disk count=256 ibs=1M 256+0 records in 524288+0 records out root@vapier 0 ~ # mkfs.vfat -F 16 disk mkfs.vfat 2.10 (22 Sep 2003) root@vapier 0 ~ # file disk disk: x86 boot sector, code offset 0x3c, OEM-ID " mkdosfs", sectors/cluster 8, root entries 512, Media descriptor 0xf8, sectors/FAT 256, heads 64, sectors 524288 (volumes > 32 MB) , serial number 0x41853a80, label: " ", FAT (16 bit) root@vapier 0 ~ # mount -o loop disk /mnt/temp/ root@vapier 0 ~ # mount | grep disk /root/disk on /mnt/temp type msdos (rw,loop=/dev/loop0)
Sry, but I did not know what additional information was needed and how to retrieve it. For example, the file command on an image created with dd was unknown to me ... So I hope that this issue can be resolved now ...
Hm, I'm a bit confused now. I've just re-formatted the stick with mkfs.vfat -F 32 /dev/sda1 and it works fine now. I saw that you used the -F option with mkfs.vfat . So I looked in the manual page and found this: --- man mkfs.vfat --- [...] -F FAT-size Specifies the type of file allocation tables used (12, 16 or 32 bit). If nothing is specified, mkdosfs will automatically select between 12 and 16 bit, whatever fits better for the filesystem size. 32 bit FAT (FAT32 format) must (still) be selected explicitly if you want it. [...] --- By the way mkfs.vfat is only a link to mkdosfs so that it may be right - considering the man page quotation - that the "new" mount recognized FAT16 as msdos. Now I wonder if FAT16 means "8.3 format is forced" or does it allow longer filenames? (Remember, FAT16 mounted as vfat had longer filenames.) So, is it right that the "new" mount regognizes FAT16 as msdos or is it not?
right, it looks like FAT32 is auto detected properly but FAT16 isnt in what man page do you see the quote 'that the "new" mount recognized FAT16 as msdos' FAT16 supports long filenames, the fact that it's showing up in the 8.3 format is because mount detected the partition as msdos instead of vfat
As I said I wasn't sure if FAT16 supported long filenames. I had the conclusion that you quoted from the fact that FAT16 is created by mk _msdos_ fs by default and therefore FAT16 should be detected as msdos. As I said I was confused whether FAT16 should be mounted as msdos or vfat. To sum it up: I know now that FAT16 should be detected as vfat, not as msdos, and therefore it's obviously a bug in the auto-detection.
ok, this seems to be a bug with blkid_get_tag_value() util-linux has its own fs guessing code, but if it detects that the system supports BLKID, it'll use that instead so in reality, the util-linux mount does this now: char *do_guess_fstype(const char *device) { return blkid_get_tag_value(blkid, "TYPE", device); }
*** Bug 82548 has been marked as a duplicate of this bug. ***
could you try e2fsprogs-1.36-r1 ?
Will test it this afternoon (GMT+1 ;) ) and then give feedback.
Sry, for me being late, ... I've just tested it with e2fsprogs-1.36-r2 and it works fine! FAT16 is correctly detected as type vfat. Closing this bug.