# USB stick mount error

## stblack

I have a strange error trying to use my usb sticks or the USB disk.

Inserting the disk or the sticks I see got the automount icons, but it works only if the filesystem isn't VFAT. I have 3 sticks and 1 disk with VFAT and no one it's working.

If I mount it by hand with user root :

```
mount -t vfat /dev/sdb1 /mnt/usb
```

All it's working.

But why it's not working as normal user?

I wonder if the problem is in the file : 

/usr/share/hal/fdi/policy/10osvendor/95-storage-ignore-fixed-drives.fdi

```
<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">

  <device>

    <match key="volume.fsusage" string="filesystem">

      <match key="@block.storage_device:storage.hotpluggable" bool="false">

        <match key="@block.storage_device:storage.removable" bool="false">

          <match key="volume.is_mounted" bool="true">

            <merge key="volume.ignore" type="bool">true</merge>

            <!-- Show /media/ mounted devices -->

            <match key="volume.mount_point" prefix="/media">

              <merge key="volume.ignore" type="bool">false</merge>

            </match>

          </match>

        </match>

      </match>

    </match>

  </device>

  <!-- sun disklabel -->

  <device>

    <match key="volume.fsusage" string="filesystem">

      <match key="volume.partition.number" int="3">

        <match key="volume.partition.start" uint64="0">

          <merge key="volume.ignore" type="bool">true</merge>

        </match>

      </match>

    </match>

  </device>

</deviceinfo>

```

I tryed the unmerge hal and udev and reemerge again, without success.

-- 

Ciao

Stefano Negro

----------

## d2_racing

Hi, can you post your emerge --info plz  :Smile: 

----------

## stblack

```
viktor ~ # emerge --info

Portage 2.1.3.19 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.18-gentoo-r4 i686)

=================================================================

System uname: 2.6.18-gentoo-r4 i686 Intel(R) Pentium(R) M processor 1.86GHz

Timestamp of tree: Mon, 31 Dec 2007 18:00:08 +0000

ccache version 2.4 [enabled]

app-shells/bash:     3.2_p17

dev-java/java-config: 1.3.7, 2.0.33-r1

dev-lang/python:     2.3.5-r3, 2.4.4

dev-python/pycrypto: 2.0.1-r6

dev-util/ccache:     2.4-r7

sys-apps/baselayout: 1.12.10-r5

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r1

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.3.16

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.23-r2

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"

CXXFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="buildpkg ccache distlocks fixpackages metadata-transfer sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"

GENTOO_MIRRORS="ftp://mirror.ing.unibo.it/gentoo/ ftp://ftp.unina.it/pub/linux/distributions/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ "

LANG="it_IT@euro"

LC_ALL="it_IT@euro"

LINGUAS="it"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/portage/local/layman/gentopia /usr/portage/local/layman/vdr-1.5 /usr/portage/local/layman/sunrise /usr/portage/local/layman/xeffects /usr/local/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage/"

USE="X acl acpi alsa arts bash-completion berkdb bitmap-fonts bluetooth cdr cli cracklib crypt cups dbus doc dri dv dvd dvdr dvdread encode esd ffmpeg flac fortran gdbm gif glitz gpm gstreamer gtk gtk2 hal hdaps iconv ieee1394 imagemagick imlib ipv6 isdnlog java jpeg jpeg2k kde kdeenablefinal lm_sensors mad midi mjpeg mmx mng mp3 mpeg mudflap musicbrainz ncurses nls nptl nptlonly nsplugin numeric ogg opengl openmp oss pam pcre pdf perl pic png ppds pppd python qt-static qt3 quicktime readline reflection samba scanner sdl session slang sndfile spell spl sse sse2 ssl svg tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb vcd vhosts vorbis wifi win32codecs wmf x86 xcb xine xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="vesa fglrx"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

and an tail of messages that it's full of this messages. I have logrotate and in 1 week it's 300MB

```
viktor ~ # less /var/log/messages | tail -20

Jan  3 22:15:47 viktor usb-storage: Command READ_10 (10 bytes)

Jan  3 22:15:47 viktor usb-storage:  28 00 04 47 e5 27 00 00 01 00

Jan  3 22:15:47 viktor usb-storage: Bulk Command S 0x43425355 T 0x62a L 512 F 128 Trg 0 LUN 0 CL 10

Jan  3 22:15:47 viktor usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes

Jan  3 22:15:47 viktor usb-storage: Status code 0; transferred 31/31

Jan  3 22:15:47 viktor usb-storage: -- transfer complete

Jan  3 22:15:47 viktor usb-storage: Bulk command transfer result=0

Jan  3 22:15:47 viktor usb-storage: usb_stor_bulk_transfer_sglist: xfer 512 bytes, 1 entries

Jan  3 22:15:47 viktor usb-storage: Status code 0; transferred 512/512

Jan  3 22:15:47 viktor usb-storage: -- transfer complete

Jan  3 22:15:47 viktor usb-storage: Bulk data transfer result 0x0

Jan  3 22:15:47 viktor usb-storage: Attempting to get CSW...

Jan  3 22:15:47 viktor usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes

Jan  3 22:15:47 viktor usb-storage: Status code 0; transferred 13/13

Jan  3 22:15:47 viktor usb-storage: -- transfer complete

Jan  3 22:15:47 viktor usb-storage: Bulk status result = 0

Jan  3 22:15:47 viktor usb-storage: Bulk Status S 0x53425355 T 0x62a R 0 Stat 0x0

Jan  3 22:15:47 viktor usb-storage: scsi cmd done, result=0x0

Jan  3 22:15:47 viktor usb-storage: *** thread sleeping.

Jan  3 22:20:02 viktor cron[11095]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

```

----------

## d2_racing

I had a very weird problem the order that and the problem was my kernel.

In fact, to be able to use a USB stick,you need to have this in your kernel :

```

  [*] Enable kernel irq balancing in the section Processor type and features

```

Also, can you just boot your computer and after that ,when you will be logged, just insert the usb stick and post the last 100 lines of dmesg command plz.

I want to see if you will have a error about the IRQ thing.

----------

## d2_racing

Also, can you post the result of this command when you are log with your user.

```

groups

```

For my concern I have this :

```

sylvain@gentootux ~ $ groups

wheel floppy audio cdrom video usb users sylvain plugdev games

sylvain@gentootux ~ $

```

----------

## stblack

viktor ~ # groups

root bin daemon sys adm disk wheel floppy dialout tape video burning

Thanks

Stefano

----------

## stblack

Sorry I did mistake

This is the gloups of the user not root  :Wink: 

```
stblack@viktor ~ $ groups

bin tty lp wheel console audio cdrom sshd video cdrw apache usb users lpadmin portage plugdev games scanner burning vboxusers

```

----------

## stblack

The error is :

 *Quote:*   

> mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so 

 

Thanks

Stefano

----------

## mistix

Better info will be from dmesg, and i think that you don't have compile in (or as module) vfat and wrong codepage.

----------

## stblack

Here the dmesg after a reboot

```
viktor ~ # dmesg |tail -100

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x4d L 0 F 0 Trg 0 LUN 0 CL 6

usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes

usb-storage: Status code 0; transferred 31/31

usb-storage: -- transfer complete

usb-storage: Bulk command transfer result=0

usb-storage: Attempting to get CSW...

usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes

usb-storage: Status code 0; transferred 13/13

usb-storage: -- transfer complete

usb-storage: Bulk status result = 0

usb-storage: Bulk Status S 0x53425355 T 0x4d R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x4e L 0 F 0 Trg 0 LUN 0 CL 6

usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes

usb-storage: Status code 0; transferred 31/31

usb-storage: -- transfer complete

usb-storage: Bulk command transfer result=0

usb-storage: Attempting to get CSW...

usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes

usb-storage: Status code 0; transferred 13/13

usb-storage: -- transfer complete

usb-storage: Bulk status result = 0

usb-storage: Bulk Status S 0x53425355 T 0x4e R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x4f L 0 F 0 Trg 0 LUN 0 CL 6

usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes

usb-storage: Status code 0; transferred 31/31

usb-storage: -- transfer complete

usb-storage: Bulk command transfer result=0

usb-storage: Attempting to get CSW...

usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes

usb-storage: Status code 0; transferred 13/13

usb-storage: -- transfer complete

usb-storage: Bulk status result = 0

usb-storage: Bulk Status S 0x53425355 T 0x4f R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x50 L 0 F 0 Trg 0 LUN 0 CL 6

usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes

usb-storage: Status code 0; transferred 31/31

usb-storage: -- transfer complete

usb-storage: Bulk command transfer result=0

usb-storage: Attempting to get CSW...

usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes

usb-storage: Status code 0; transferred 13/13

usb-storage: -- transfer complete

usb-storage: Bulk status result = 0

usb-storage: Bulk Status S 0x53425355 T 0x50 R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x51 L 0 F 0 Trg 0 LUN 0 CL 6

usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes

usb-storage: Status code 0; transferred 31/31

usb-storage: -- transfer complete

usb-storage: Bulk command transfer result=0

usb-storage: Attempting to get CSW...

usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes

usb-storage: Status code 0; transferred 13/13

usb-storage: -- transfer complete

usb-storage: Bulk status result = 0

usb-storage: Bulk Status S 0x53425355 T 0x51 R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x52 L 0 F 0 Trg 0 LUN 0 CL 6

usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes

usb-storage: Status code 0; transferred 31/31

usb-storage: -- transfer complete

usb-storage: Bulk command transfer result=0

usb-storage: Attempting to get CSW...

usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes

usb-storage: Status code 0; transferred 13/13

usb-storage: -- transfer complete

usb-storage: Bulk status result = 0

usb-storage: Bulk Status S 0x53425355 T 0x52 R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

```

----------

## stblack

Abstract from menuconfig

```

                           <*> MSDOS fs support                                                                              

                           <*> VFAT (Windows-95) fs support                                                                  

                          (850) Default codepage for FAT                                                                    

                          (iso8859-15) Default iocharset for FAT                                                            

                          <*> NTFS file system support                                                                      

                          [ ]   NTFS debugging support                                                                      

                          [ ]   NTFS write support      
```

Thanks

Stefano

----------

## tuam

 *stblack wrote:*   

> and an tail of messages that it's full of this messages. I have logrotate and in 1 week it's 300MB

 

You have some kernel debugging options activated, haven't you?

FF,

Daniel

----------

## selig

Judging by the error message I would suggest looking at /etc/fstab - there might be a line with the removable device(s) with mount options / FS type different from vfat.

----------

## d2_racing

Yeah, can you post your /etc/fstab plz.

----------

## stblack

Here is.

```
 

# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't

# needed; notail increases performance of ReiserFS (at the expense of storage

# efficiency).  It's safe to drop the noatime options if you want and to

# switch between notail / tail freely.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# See the manpage fstab(5) for more information.

#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sda3               /boot           ext2            noauto,noatime  1 2

/dev/sda6               /               reiserfs        noatime         0 1

/dev/sda5               none            swap            sw              0 0

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro       0 0

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

/dev/sda1               /mnt/winxp      ntfs            auto,ro         0 0

# NOTE: The next line is critical for boot!

proc                    /proc           proc            defaults        0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

```

----------

## tgR10

you need too add your stick to fstab with user option to enable users mount and umount it, and try with fs type auto

for example

```
/dev/sdf1               /mnt/usb        auto            noauto,rw,user,codepage=852       0 0
```

in this case you need copdepage 852 in kernel ;-)

----------

## selig

If you are using device mounting with HAL, it should not be needed to create fstab entries. Well "should not" - but in reality it sometimes does not work and then it is really difficult to find what is going on with HAL. For that reason I prefer manual mounting.

----------

## stblack

I tryed to check the options doing right click in the icon that automatically compare in the toolbar. I disable IO syncronous and now the mount it's done correctly and automatically.

Thanks to everybody.

Stefano

----------

