# Problems mounting USB devices. File system detection ?

## xavier10

I have major problems mounting USB mass storage devices (disc-on-key, compact flash readers).

I carefully followed the various how-to, which explain pretty well how to get the scsi device detected and to mount it, but I have problems with the file system.

Either I use the /etc/fstab:

```

/dev/sda1      /mnt/flash   vfat      defaults,user,noauto   0 0

```

and I get

```

$ mount /mnt/flash

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

       or too many mounted file systems

```

or I use the /etc/fstab line:

```

/dev/sda1      /mnt/flash   auto      defaults,user,noauto   0 0

```

and I get

```

$ mount /mnt/flash

/dev/sda1: Invalid argument

mount: you must specify the filesystem type

```

I tried other file systems with no more success.

What should I do ?

----------

## Gentoonie

try it with 

```
usbfs
```

 instead of vfat. For me it works

----------

## NeddySeagoon

xavier10,

When you built vfat support for your kernel, you get to chose which defualt NLS character set it will use.

You also need to choose this same character set in NLS Support or you get this unhelpful error report.

If you are un the USA, the defualts in both places match. There is a mount option for nls. See man mount.

usbfs is what provides the content id /proc/bus/usb/. Its not a filesystem for carrying user data.

----------

## xavier10

 *Gentoonie wrote:*   

> try it with 
> 
> ```
> usbfs
> ```
> ...

 

Thanks, I have just tried.

The result is that the content of /mnt/flash/ is the same as /proc/usb/:

```

$ mount /mnt/flash

$ ls /mnt/flash

001  002  003  004  devices

$ ls /proc/usb

ls: /proc/usb: No such file or directory

$ ls /proc/

Display all 173 possibilities? (y or n)

$ ls /proc/bus/usb

001  002  003  004  devices

$ find /mnt/flash

/mnt/flash

/mnt/flash/004

/mnt/flash/004/001

/mnt/flash/003

/mnt/flash/003/002

/mnt/flash/003/001

/mnt/flash/002

/mnt/flash/002/002

/mnt/flash/002/001

/mnt/flash/001

/mnt/flash/001/016

/mnt/flash/001/001

/mnt/flash/devices

```

As a concequence,this does not allow me to access to the files on the support. Should I have done something else ?

----------

## xavier10

 *NeddySeagoon wrote:*   

> xavier10,
> 
> When you built vfat support for your kernel, you get to chose which defualt NLS character set it will use.
> 
> You also need to choose this same character set in NLS Support or you get this unhelpful error report.
> ...

 

This is most interesting since I am about to build a new kernel.

I am in France and would still like to use the standard nls for france (iso8859-1) unless someone convinces me it is a very bad idea.

Here is my nls info in my current .config

```

$ egrep NLS .config

CONFIG_UDF_NLS=y

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

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

# CONFIG_NLS_CODEPAGE_1251 is not set

# CONFIG_NLS_ASCII is not set

CONFIG_NLS_ISO8859_1=m

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

# CONFIG_NLS_KOI8_R is not set

# CONFIG_NLS_KOI8_U is not set

CONFIG_NLS_UTF8=m

```

Does this seem sound ? What should I change ?

BTW, I looked in man mount and found no infor about any nls option; adding the ",nls=iso8859-1" in the /etc/fstab would not change the result.

----------

## NeddySeagoon

xavier10,

I got the mount option wrong. Its 

```
codepage=value
```

My .config has

```
# 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"
```

Both the CONFIG_FAT_DEFAULT_CODEPAGE=437 and CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" must be built in  Native Language Support for the FAT/VFAT to work without a codepage option to mount.

Your setup looks OK

----------

## xavier10

 *NeddySeagoon wrote:*   

> xavier10,
> 
> I got the mount option wrong. Its 
> 
> ```
> ...

 

I tried with various arguments for codepage: 437, 450 (I saw these values on these forums), but no luck with either of these...

Does this mean I have to look for another problem ?

I have a disc-on-key I would even be willing to format, if this could help solving the problem. Now I have several usb mass storage systems and I can access to none, which is very frustrating  :Sad: 

Xavier

----------

