# mount: unknown filesystem type 'vfat' [SOLVED]

## muc-gentoo

when mounting an USB stick with "sudo mount -t vfat /dev/sdb1 /mnt/usbdir" I am getting error "mount: unknown filesystem type 'vfat'", although kernel has been compiled with CONFIG_VFAT_FS=y.

Any help?Last edited by muc-gentoo on Wed Nov 19, 2008 10:49 pm; edited 1 time in total

----------

## weaksauce

Do you also have

```
CONFIG_FAT_FS=y
```

I don't think menuconfig or make enforces it, but it's required for VFAT to work correctly.

----------

## cyrillic

You can always do this to check what filesystems are supported by your kernel.

```
# cat /proc/filesystems 
```

----------

## qxtr01

please run 'dmesg' just after having tried mounting the partition and post the last lines.

----------

## muc-gentoo

CONFIG_FAT_FS=y is set

cat /proc/filesystems does not retrieve vfat

here is the output of dmesg

 *Quote:*   

> 
> 
> scsi 5:0:0:0: Direct-Access     Ut163    USB2FlashStorage 0.00 PQ: 0 ANSI: 2
> 
> sd 5:0:0:0: [sdb] 1003520 512-byte hardware sectors (514 MB)
> ...

 

----------

## d2_racing

Hi, do you see at least the drive ?

```

# fdisk -l

```

Also, are you sure that your USBstick if formated with FAT32....not NTFS ?

----------

## muc-gentoo

yes, I can see it with fdisk -l

 *Quote:*   

> 
> 
>     Device Boot      Start         End      Blocks   Id  System
> 
> /dev/sdc1               1       14992    77953628    b  W95 FAT32
> ...

 

----------

## weaksauce

I hate to be sailing in as capt. obvious here, but are you sure you're booted into the correct kernel?  If /proc/filesystems doesn't show vfat that's the only thing that seems to make sense.  Has this ever worked or is this a recent development?

----------

## qxtr01

did you compile the requested options under Native language support?

----------

## muc-gentoo

Yes, I am positive to have loaded the correct kernel, because 

 *Quote:*   

> 
> 
> zcat /proc/config.gz | grep -i vfat

 

retrieves

 *Quote:*   

> 
> 
> CONFIG_VFAT_FS=y

 

I cannot say if this has ever worked

re NLS, these ones are set:

CONFIG_UDF_NLS=y

CONFIG_NLS=y

CONFIG_NLS_DEFAULT="iso8859-1"

CONFIG_NLS_CODEPAGE_437=y

# CONFIG_NLS_CODEPAGE_737 is not set

# CONFIG_NLS_CODEPAGE_775 is not set

CONFIG_NLS_CODEPAGE_850=y

# CONFIG_NLS_CODEPAGE_852 is not set

# CONFIG_NLS_CODEPAGE_855 is not set

# CONFIG_NLS_CODEPAGE_857 is not set

# CONFIG_NLS_CODEPAGE_860 is not set

# CONFIG_NLS_CODEPAGE_861 is not set

# CONFIG_NLS_CODEPAGE_862 is not set

# CONFIG_NLS_CODEPAGE_863 is not set

# CONFIG_NLS_CODEPAGE_864 is not set

# CONFIG_NLS_CODEPAGE_865 is not set

# CONFIG_NLS_CODEPAGE_866 is not set

# CONFIG_NLS_CODEPAGE_869 is not set

CONFIG_NLS_CODEPAGE_936=m

# CONFIG_NLS_CODEPAGE_950 is not set

# CONFIG_NLS_CODEPAGE_932 is not set

# CONFIG_NLS_CODEPAGE_949 is not set

# CONFIG_NLS_CODEPAGE_874 is not set

# CONFIG_NLS_ISO8859_8 is not set

# CONFIG_NLS_CODEPAGE_1250 is not set

# CONFIG_NLS_CODEPAGE_1251 is not set

CONFIG_NLS_ASCII=y

CONFIG_NLS_ISO8859_1=y

# CONFIG_NLS_ISO8859_2 is not set

# CONFIG_NLS_ISO8859_3 is not set

# CONFIG_NLS_ISO8859_4 is not set

# CONFIG_NLS_ISO8859_5 is not set

# CONFIG_NLS_ISO8859_6 is not set

# CONFIG_NLS_ISO8859_7 is not set

# CONFIG_NLS_ISO8859_9 is not set

# CONFIG_NLS_ISO8859_13 is not set

# CONFIG_NLS_ISO8859_14 is not set

CONFIG_NLS_ISO8859_15=y

# CONFIG_NLS_KOI8_R is not set

# CONFIG_NLS_KOI8_U is not set

CONFIG_NLS_UTF8=y

Could it have something to do with dbus / HAL and the likes?

Or does it matter that I am running on 64bit?

----------

## djinnZ

verify if you have not the old fat (CONFIG_MSDOS_FS=y) support enabled (it tends to prevent the correct recognition of the filesystems) and are you sure than vfat is not present in the /proc/filesystems file (note than you must have CONFIG_FAT=y also)?

Is not normal, the only thing able to break the fat support is a misconfiguration in the codepages.

Have you build the kernel with genkernel? Try to remove the archived configuration and in every case do a make mrproper and reconfigure it from zero.

Just to be clear: if CONFIG_VFAT_FS=y you must have the codepages selected in CONFIG_FAT_DEFAULT_CODEPAGE and CONFIG_FAT_DEFAULT_IOCHARSET builtin, or modular only if CONFIG_VFAT_FS=m or the kernel modules autoload works properly.

By example I have:

```
CONFIG_FAT_FS=y

# CONFIG_MSDOS_FS is not set

CONFIG_VFAT_FS=y

CONFIG_FAT_DEFAULT_CODEPAGE=850

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15"
```

and

```
CONFIG_NLS=y

CONFIG_NLS_DEFAULT="utf8"

CONFIG_NLS_CODEPAGE_437=m

CONFIG_NLS_CODEPAGE_850=y

CONFIG_NLS_ASCII=m

CONFIG_NLS_ISO8859_1=m

CONFIG_NLS_ISO8859_15=y

CONFIG_NLS_UTF8=y
```

to prevent mistakes.

----------

## muc-gentoo

Thank you very much. That last reply fixed the problem.

----------

## d2_racing

Nice  :Razz: 

----------

