LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   mount does not detect a vfat filesystem in my usb stick (https://www.linuxquestions.org/questions/linux-hardware-18/mount-does-not-detect-a-vfat-filesystem-in-my-usb-stick-388701/)

ernesto_cgf 12-02-2005 02:35 PM

mount does not detect a vfat filesystem in my usb stick
 
When I try to mount my USB stick (either root or a normal user) I get this error:

Code:

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

The relevant output of "demsg | tail" is

Code:

FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdb1.

I am using Debian Sarge with kernel 2.6.8-2-686 in a Asus P4, 3GHz and USB 2.0
My usb stick is a kingston data traveler with 256 Mb. It mounts properly in windows.
When I insert it, it flashes the led, but nothing is mounted in debian.

The relevant /etc/fstab is:

Code:

/dev/sdb1 /media/usbdisk vfat user,noauto,umask=0 0 0
Any help?

ioerror 12-02-2005 02:54 PM

What modules do you have loaded? 2.6.x has two incompatible ways of handling usb drives. The older way is usb-storage which is a scsi emulation layer (you need the scsi_mod, sd_mod and usb-storage modules loaded (or bulit into the kernel)). But all those modules should be autoloaded if they are required. The new way is ub_dev, a direct usb block device driver.

You're certain the device is /dev/sdb1, of course? It may change if you have other scsi devices. Since you are using 2.6.x you can use udev to assign the device a more descriptive name (something like "datatrav256").

Alternatively, you can label the filesystem and put LABEL=<whatever> in /etc/fstab instead of /dev/sdXY. However, the last time I tried this, it didn't work with a vfat fs (mount couldn't find the label).

In any case, this won't solve your immediate problem. Can you access the device at all? First of all, try fdisk -l /dev/sdb1 (as root). If that doesn't work, then it's either the wrong device or some required module isn't loaded.

Some people have reported that merely doing 'fdisk -l /dev/whatever' is sufficient to 'activate' the device. I haven't experienced that though.

makuyl 12-02-2005 02:57 PM

"cat /proc/filesystems" to see if vfat is supported.
Have you tried msdos instead of vfat? "fdisk -l /dev/sdb" should tell what it is.
You could also try backing up the files in windows and format it in linux with "mkfs.vfat /dev/hdb1" and put the files back and see if it mounts then both in win and linux.

ernesto_cgf 12-07-2005 07:19 AM

Well, first of all, thanks for your replies and sorry for the delay in my response, but I've been unable to get online for the past few days due to problems with our ISP.

I tried all your suggestions and they didn't work. I could go and on here and get into details, but is worthless, because I got the problem solved, and I don't know how or why. I accidentally left the USB stick plugged in one night after using it in Windows, when I turned off the computer. The morning after I started the PC with Linux and when I authenticated myself and the gnome desktop appeared, it had a USB icon, and when I opened its window it showed the files in the flash drive.

Initially I thought it would only worked like this, letting it in while booting Linux, but I tried to hot-plug it yesterday with Linux running, and voilà, a window appeared automatically just as in windows xp.

I will repeat this procedure in my computer at home, which has exactly this linux distro, to see if it's solved there too. I will post here the results of this test.

Anyway, if someone understands this, I would like to know why it happened, or what happened exactly. Also this could be useful to anyone facing a similar problem, so I hope they find this thread. Thanks to all the replies, anyway.


All times are GMT -5. The time now is 04:27 AM.