[ltp] Trouble with USB-Memory

Matt Graham linux-thinkpad@linux-thinkpad.org
Thu, 18 Nov 2004 15:34:43 -0500


On Thursday 18 November 2004 14:40, after a long battle with technology, 
Bertrand Njipwo Kouatchet wrote:
> For 1 week i use a friends memory.its work well with the command:
>  mount -t vfat /dev/sda /mnt

> ThinkPad:/home/bertrand/TODO# mount -t vfat /dev/sda /mnt/

Um.  Typically, you don't mount things on /mnt , you create 
subdirectories under /mnt 
(/mnt/cdrom , /mnt/dvd , /mnt/floppy , /mnt/flash , etcetera) and mount 
devices on those subdirectories.  You can do what you want, but having 
all your removable media under /mnt (or /media) makes a lot of sense.

> mount: wrong fs type, bad option, bad superblock on /dev/sda,
>        or too many mounted file systems

/dev/sda doesn't have a FAT filesystem on it.  Most USB drives are 
partitioned such that they have 1 partition covering the entire device 
and that partition is of type 6 (FAT < 2G), b (FAT > 2G < 8G), or c 
(FAT > 8G).  Did you create a partition table on this new USB drive?  
Did you create a filesystem on it with mkdosfs?

[snip, next time, only include the relevant parts of the dmesg output]

> Buffer I/O error on device sda, logical block 0
>  unable to read partition table

This looks bad, but it isn't, since usb-storage hasn't been loaded yet.

> usbcore: registered new driver usb-storage
> USB Mass Storage support registered.

> Badness in local_bh_enable at kernel/softirq.c:136
[kernel stack dump]

This isn't good.  What's the output of "uname -a", and which version of 
which distro are you using?

> SCSI device sda: 511744 512-byte hdwr sectors (262 MB)

This is actually a good sign; the kernel's found the disk and detected a 
reasonable value for its capacity.

> FAT: invalid media value (0x01)
> VFS: Can't find a valid FAT filesystem on dev sda.

...and this is why mount is failing.  If you don't have any data on this 
disk, partition it using "cfdisk /dev/sda", create one partition of 
type 6 (FAT16) covering the whole device, then write the partition 
table to disk.  Then do "mkdosfs /dev/sda1", and you should be able to 
mount /dev/sda1 without a problem.  HTH,

-- 
   We thank with brief thanksgiving / Whatever gods may be
   That no man lives forever, / That dead men rise up never,
   That even the weariest river / Winds somewhere safe to sea.
       --A. C. Swinburne, "The Garden of Proserpine"
There is no Darkness in Eternity/But only Light too dim for us to see