# vfat filesystem won´t mount on USB drive

## Xav

USB drive, correctly installed:

```

bash-2.05b# cat /proc/scsi/scsi

Attached devices:

Host: scsi4 Channel: 00 Id: 00 Lun: 00

  Vendor: IBM-DJSA Model: -210             Rev: JS2A

  Type:   Direct-Access                    ANSI SCSI revision: 02

```

´dmesg´ after plugging USB drive:

```

bash-2.05b# dmesg

...

usb 1-1: new full speed USB device using ohci_hcd and address 3

...

```

...unpluging

```

bash-2.05b# dmesg

...

usb 1-1: USB disconnect, address 3

...

```

Problem is mounting in ´vfat´ filesystem.

After I do ´fdisk /dev/sda´ and create /dev/sda1 partition (type ´b´)

```

Disk /dev/sda: 10.0 GB, 10056130560 bytes

255 heads, 63 sectors/track, 1222 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1               1        1222     9815683+   b  W95 FAT32

```

after that...

```

bash-2.05b# mkfs.vfat /dev/sda1

```

and then:

```

bash-2.05b# mount -t vfat /dev/sda1 /mnt/usbdrive

mount: wrong fs type, bad option, bad superblock on /dev/sda1,

       or too many mounted file systems

```

.conf: 

```

...

#

# DOS/FAT/NT Filesystems

#

CONFIG_FAT_FS=m

CONFIG_MSDOS_FS=m

CONFIG_VFAT_FS=m

CONFIG_FAT_DEFAULT_CODEPAGE=437

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"

...

```

´vfat´ module loaded, ´dosfstools´ emerged.

Interesting thing is when I change the filesystem to ´reiserfs´ with:

```

bash-2.05b# mkreiserfs /dev/sda1

```

...and change ´fstab´ entry <type> to ´reiserfs´, it mounts fine! :Question:   :Question:   :Question: 

What I´ve done wrong?

tnx in advance.

----------

## NeddySeagoon

Xav,

What have you got configured under NLS Support ?

Just a little way down from this snippet:-

```
# DOS/FAT/NT Filesystems

#

CONFIG_FAT_FS=m

CONFIG_MSDOS_FS=m

CONFIG_VFAT_FS=m

CONFIG_FAT_DEFAULT_CODEPAGE=437

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" 
```

You need

```
CONFIG_NLS_CODEPAGE=y  (or m)

CONFIG_NLS_ISO8859_1=y (or m) 
```

or thr default setings for vfat won't work.

----------

## Xav

 *NeddySeagoon wrote:*   

> Xav,
> 
> What have you got configured under NLS Support ?
> 
> Just a little way down from this snippet:-
> ...

 

NLS part looks like this:

#

# Native Language Support

#

CONFIG_NLS=y

CONFIG_NLS_DEFAULT="iso8859-1"

# CONFIG_NLS_CODEPAGE_437 is not set

# CONFIG_NLS_CODEPAGE_737 is not set

# CONFIG_NLS_CODEPAGE_775 is not set

# CONFIG_NLS_CODEPAGE_850 is not set

CONFIG_NLS_CODEPAGE_852=m

# 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 is not set

# 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=m

# CONFIG_NLS_CODEPAGE_1251 is not set

# CONFIG_NLS_ASCII is not set

CONFIG_NLS_ISO8859_1=m

CONFIG_NLS_ISO8859_2=m

# 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=m

# CONFIG_NLS_KOI8_R is not set

# CONFIG_NLS_KOI8_U is not set

CONFIG_NLS_UTF8=m

so I should change ´CONFIG_NLS_CODEPAGE_437´ (marked in red) to ´m´ or ´y´?

Other one is correct I suppose?

Regards.

----------

## NeddySeagoon

Xav,

You either need  to make CONFIG_NLS_CODEPAGE_437 for your kernel or change the CONFIG_FAT_DEFAULT_CODEPAGE to a codepage you do have.

Meanwhile, man mount says (under FAT options)

```
        codepage=value

              Sets  the codepage for converting to shortname characters on FAT

              and VFAT filesystems. By default, codepage 437 is used.
```

so using 

```
mount -t vfat -o codepage=852 /dev....
```

should work until you fix your kernel.

----------

## Xav

It´s working!

Thanx alot man!  :Very Happy: 

I´ ve been solving this since this morning.

New kernel is compiling, but it works already! :Smile: 

Regards,

Xav.

----------

