PDA

View Full Version : USB flash disk doesn't mount.



fjleal
3rd June 2004, 12:28 PM
I bought a Transcend 256 MB JetFlash USB memory. The box says it works under Windows, Mac or Linux (starting from kernel 2.4), USB 1.1 or 2.0. It works under Windows XP, but I wasn't able to mount it on any Linux box (I tried FC1, FC2 and Mandrake, all have kernels > 2.4).

I can mount a 128 MB microdrive, but I'm unable to mount this 256 MB one. May it be due to the high capacity (256 MB)?

The error is something like "invalid superblock".

Any ideas?

Thanks! ;)

dragon
3rd June 2004, 02:04 PM
Are you mounting it as a USB 'mass storage' device?

What command are you using to mount the 128 stick and the 256 stick?

One other thing you might want to check for is hardware compatibility.

fjleal
3rd June 2004, 09:05 PM
mount -t vfat /dev/sda1 /mnt/memstick

With /etc/fstab configured (/dev/sda1 /mnt/memstick vfat rw,owner,noauto 0 0), I do only "mount /mnt/memstick". Gnome even puts an icon on the desktop for such a device. This works with all other devices, except this one.

zorkenem
4th June 2004, 03:41 AM
I have a similar issue with a digital cam from Sony which appears as an USB Mass Storage.
Was working fine with FC1 but failed with FC2.

usb-storage is loaded automatically. (I see that with lsmod)

A line is even added to /etc/fstab :

/dev/sda1 /mnt/camera auto noauto,owner,kudzu 0 0

And an icon appears on Gnome.

But it seems that usb-storage gives I/O error :

dmesg

sda : READ CAPACITY failed.
sda : status=0, message=00, host=7, driver=00
sda : sense not available.
sda: assuming Write Enabled
sda: assuming drive cache: write through
sda : READ CAPACITY failed.
sda : status=0, message=00, host=7, driver=00
sda : sense not available.
sda: assuming Write Enabled
sda: assuming drive cache: write through
sda:<3>Buffer I/O error on device sda, logical block 0
Buffer I/O error on device sda, logical block 0
Buffer I/O error on device sda, logical block 262143
Buffer I/O error on device sda, logical block 262143
Buffer I/O error on device sda, logical block 0
unable to read partition table
usbfs: USBDEVFS_CONTROL failed cmd lsusb dev 8 rqt 128 rq 6 len 4 ret -32
usbfs: USBDEVFS_CONTROL failed cmd lsusb dev 8 rqt 128 rq 6 len 256 ret -32
usbfs: USBDEVFS_CONTROL failed cmd lsusb dev 8 rqt 128 rq 6 len 2 ret -32

I see similar issues around usb-storage in several forums with kernel 2.6 but no workarounds.

I'm running FC2 with a custom kernel 2.6.6

ezeze5000
4th June 2004, 03:08 PM
Try formating the flashdisk in your XP box as a FAT32

I had to do one of my flash disks that way before I could get it
to work correctly, on my Linux Box.

fjleal
4th June 2004, 08:42 PM
I already did the formatting attempt. No problem on XP, I reformatted it as a FAT32 volume. Still the same problem on Linux. I also tried formatting it on Linux (before mounting), but the error prevails... :(

Badger
5th June 2004, 02:07 AM
What type of machine are you trying to load it on? Reason I ask is that I've found certain machines (like the Dell 2550's I have) do not like USB stuff. Can you mount the stick elsewhere?

fjleal
5th June 2004, 07:19 AM
I've tried on several machines, several distros (FC1, FC2, Mandrake 9.1, Mandrake 10.0 CE), different USB port versions (1.1, 2.0)... Nothing works with this device. I can mount any other USB storage devices on any of these machines, including 128 MB flash memories and USB disks. The problem seems to be with this device only, and that's odd because the manufacturer explicitly says it works with any Linux distro with kernel >= 2.4.

imdeemvp
5th June 2004, 07:30 AM
i hope this helps:

http://www.fedoraforum.org/forum/showthread.php?s=&postid=7360#post7360

fjleal
5th June 2004, 10:58 AM
Thanks Imdeemvp, but it unfortunately doesn't! :(

You see, I know very well how to mount/unmount storage devices. My problem is with this particular device that refuses to cooperate. My hope was that someone at these forums had already experienced such a problem, or had also bought a similar (same model) device...

I think I'll just return it to the shop. :(

imdeemvp
5th June 2004, 02:33 PM
if you will return it to store then make sure you get one that is supported under linux, there is link for such device but i dont remember it.

good luck

BTW my its a GE brand!

dragon
15th June 2004, 06:16 PM
fjleal,

Has it NOT worked with any 2.4.x kernel or has the problem been with 2.6.x kernels only?


Originally posted by fjleal
I've tried on several machines, several distros (FC1, FC2, Mandrake 9.1, Mandrake 10.0 CE), different USB port versions (1.1, 2.0)... Nothing works with this device. I can mount any other USB storage devices on any of these machines, including 128 MB flash memories and USB disks. The problem seems to be with this device only, and that's odd because the manufacturer explicitly says it works with any Linux distro with kernel >= 2.4.

ghaefb
15th June 2004, 08:34 PM
"invalid superblock"

I've seen this error when mounting an 32Mb USB disk.
I played with it for a while, plugging it and unplugging.. Rebooting computer.
And I realized that most of the time I couldn't mount it, but a few times I could.
Have no idea what's the problem.

fjleal
15th June 2004, 09:19 PM
dragon wrote:
Has it NOT worked with any 2.4.x kernel or has the problem been with 2.6.x kernels only?
It has never worked, no matter the kernel version (2.4.x or 2.6.x, it was the same). I tried different kernels, different distributions, different machines, different USB versions... :(

Mimi
1st October 2004, 06:03 PM
I have the same problem (JetFlash 256MB USB 2.0), and i tried with other brands and it worked, only this one doesn't work

ewest02
8th October 2004, 04:46 AM
I'm not sure this will be of help for this case... I, too have been struggling to get a flash media card recognized. I connected/unconnected the USB cable, removed/inserted the card into the reader... No effect. And on a whim I connected the USB cable to the 2nd port of the USB card ...and Voila! No more mount error messages and the /var/log/messages shows that indeed the device was recognized and configured as /dev/sda.

YMMV...

--Eric

imdeemvp
8th October 2004, 09:11 AM
I used General Electric and ScanDisk Cruzer Mini....both worked for me. You guys should go here to see what other brands are usable in linux. www.linuxhardware.net

ewest02
8th October 2004, 07:41 PM
FWIW, in my case the USB card reader and media were working just fine with RH9. Implication: these were supported... After installing FC2 I had those aforementioned problems with mounting the media.

It was suggested to me that the root cause might be out-dated BIOS firmware. That *is* a possibility...

David59
8th October 2004, 08:52 PM
Had the same issue



Unable to mount /mnt/memstick (bad superblock)

Did a fdisk /dev/hda, delete all partitions (some hiddens), and create a new one type FAT32

mkfs.vat /dev/hda

Then i could mount it !



Then, had now another strange issue. When i mount my USB Bar for the 1st time, the kernel sees it as scsi0, then scsi1, 2.....until 7 or 8 then....it's not recognized no more !

Another one : why it's sometimes on /dev/sda1 and sometimes on /dev/sdb1 ??????

Daemon
9th October 2004, 06:22 PM
I bought today a Transcend Jetflash 1GB and had some problems mounting it untill i figured it out. After you plug it in type "dmesg" and see where it put it (sda, sda1..). Then edit your fstab to match it.


/dev/sda /mnt/flash auto auto,user,owner 0 0

This is what my fstab entry looks like with FC2 with 2.6.8 kernel

Maybe it helps :)

David59
9th October 2004, 06:52 PM
I bought today a Transcend Jetflash 1GB and had some problems mounting it untill i figured it out. After you plug it in type "dmesg" and see where it put it (sda, sda1..). Then edit your fstab to match it.


/dev/sda /mnt/flash auto auto,user,owner 0 0

This is what my fstab entry looks like with FC2 with 2.6.8 kernel

Maybe it helps :)

ok, but i want my usb key to ALWAYS be sda or sdb, not sda today and sdb tomorrow

BTW, don't you have to specify "sda1", not "sda" in /etc/fstab ?

Daemon
9th October 2004, 08:06 PM
With sda1 i was getting "invalid block" errors when trying to mount it, so i tried sda like it was in dmesg and it worked fine. I just bought it today but after several plugs/unplugs and reboots it didnt changed to anything than sda.

thomcio
21st December 2004, 10:12 AM
Hi.! I got this same problem.
I'm using Actina 64Mb USB1.1 Pendrive(USB key). It works under win 98->XP,Madrake 9.1 (kernel 2.4) very well, and works good under Mandrake 10.1 Comunity, but when I tried on some never systes like M10.1 Official(kernel 2.6.3) and FC3(2.6.9), it's impossible to mount with fat32 partition with error "can't read superblock".
I changed partition to Ext3 - works fine, can I mount, read, write and umount, back to fat32 - get error "can't read superblock". I tried with FAT32 partitions created under win98, XP, FC3 and Madrake 9.1 without success.

from dmesg:
SCSI error : <4 0 0 0> return code = 0x10070000
end_request: I/O error, dev sda, sector 42

I tried all solutions published on this forum.
Somebody known solution for this problem?

David59
30th December 2004, 07:12 PM
Worse issue, here's my dmesg after inserting my usb-flash disk :

Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: CRYSTAL Model: BAR Rev: 2.00
Type: Direct-Access ANSI SCSI revision: 02
USB Mass Storage device found at 3
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
sda: Unit Not Ready, sense:
Current : sense key Unit Attention
Additional sense: Not ready to ready change, medium may have changed
sda : READ CAPACITY failed.
sda : status=1, message=00, host=0, driver=08
Current sd: sense key Unit Attention
Additional sense: Not ready to ready change, medium may have changed
sda: test WP failed, assume Write Enabled
sda: assuming drive cache: write through
sda:<6>usb 1-3: reset high speed USB device using address 3
usb 1-3: control timeout on ep0in
usb 1-3: device not accepting address 3, error -71
scsi: Device offlined - not ready after error recovery: host 0 channel 0 id 0 lun 0
SCSI error : <0 0 0 0> return code = 0x50000
end_request: I/O error, dev sda, sector 2097144
Buffer I/O error on device sda, logical block 262143
scsi0 (0:0): rejecting I/O to offline device
scsi0 (0:0): rejecting I/O to offline device
Buffer I/O error on device sda, logical block 262143
sda1
usb 1-3: USB disconnect, address 3
scsi: Device offlined - not ready after error recovery: host 0 channel 0 id 0 lun 0
sd 0:0:0:0: Illegal state transition cancel->offline
Badness in scsi_device_set_state at drivers/scsi/scsi_lib.c:1691

Call Trace:<ffffffffa02ea70a>{:scsi_mod:scsi_device_set_state+231}
<ffffffffa02e7c7f>{:scsi_mod:scsi_error_handler+3219}
<ffffffff8011124f>{child_rip+8} <ffffffffa02e6fec>{:scsi_mod:scsi_error_handler+0}
<ffffffff80111247>{child_rip+0}
scsi: Device offlined - not ready after error recovery: host 0 channel 0 id 0 lun 0
sd 0:0:0:0: Illegal state transition cancel->offline
Badness in scsi_device_set_state at drivers/scsi/scsi_lib.c:1691

Call Trace:<ffffffffa02ea70a>{:scsi_mod:scsi_device_set_state+231}
<ffffffffa02e7c7f>{:scsi_mod:scsi_error_handler+3219}
<ffffffff8011124f>{child_rip+8} <ffffffffa02e6fec>{:scsi_mod:scsi_error_handler+0}
<ffffffff80111247>{child_rip+0}
Unable to handle kernel NULL pointer dereference at 0000000000000010 RIP:
<ffffffff8028bc0a>{cfq_insert_request+96}
PML4 30528067 PGD 3042c067 PMD 0
Oops: 0000 [1]
CPU 0
Modules linked in: sd_mod usb_storage scsi_mod ipt_limit iptable_mangle ipt_LOG ipt_MASQUERADE iptable_nat ipt_TOS ipt_REJECT ip_conntrack_irc ip_conntrack_ftp ipt_state ip_conntrack iptable_filter ip_tables autofs4 i2c_dev i2c_core vfat fat ext3 jbd md5 ipv6 joydev ohci1394 ieee1394 uhci_hcd ehci_hcd snd_via82xx snd_ac97_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc gameport snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore via_rhine mii dm_snapshot dm_zero dm_mirror xfs dm_mod
Pid: 17377, comm: scsi_eh_0 Not tainted 2.6.9-1.681_FC3
RIP: 0010:[<ffffffff8028bc0a>] <ffffffff8028bc0a>{cfq_insert_request+96}
RSP: 0018:000001002bac3dc8 EFLAGS: 00010046
RAX: 0000000000000002 RBX: 000001003e90c030 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 0000010037dc9ad8 RDI: 000001003e90c030
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000ffff8044a100 R11: 0000000000000001 R12: 0000010037dc9ad8
R13: 0000000000000000 R14: 000001003e90c030 R15: 000001002bac3ea8
FS: 0000002a9557db00(0000) GS:ffffffff80511980(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000010 CR3: 0000000000101000 CR4: 00000000000006e0
Process scsi_eh_0 (pid: 17377, threadinfo 000001002bac2000, task 00000100290c94d0)
Stack: 000001003e90c030 0000000000000001 0000010037dc9ad8 0000000000000001
000001002bac3e98 ffffffff802814c8 0000000000000001 000001003e90c030
0000010037dc9ad8 ffffffff80283c37
Call Trace:<ffffffff802814c8>{__elv_add_request+65} <ffffffff80283c37>{blk_insert_request+221}
<ffffffffa02e8761>{:scsi_mod:scsi_queue_insert+162}
<ffffffffa02e7d24>{:scsi_mod:scsi_error_handler+3384}
<ffffffff8011124f>{child_rip+8} <ffffffffa02e6fec>{:scsi_mod:scsi_error_handler+0}
<ffffffff80111247>{child_rip+0}

Code: 48 8b 45 10 48 8b 10 48 89 72 08 48 89 16 48 89 46 08 48 89
RIP <ffffffff8028bc0a>{cfq_insert_request+96} RSP <000001002bac3dc8>
CR2: 0000000000000010


It works well on 2000 and XP. I will try with FC2...

sailor
30th December 2004, 07:18 PM
I have a 256 jump drive (not sure of model/make) never have a problem...I just plug it in and it mounts...?

imdeemvp
30th December 2004, 07:26 PM
David59,

Did you try doing this? http://www.fedoraforum.org/forum/showthread.php?t=1291

David59
5th January 2005, 08:12 PM
imdeemvp, Yes, thanks !

My USB flash disk was supported by FC2, but it's no longer supported by FC3 !! :-(

mute
16th January 2005, 01:08 PM
I also have a 256MB Transcend USB flash drive, running FC3 on an MSI board.

It too is not detected when I plug it in. (the LED doesn't event light...)

However, if the disk is in at boot time, Fedora detects it just fine, I can work on it and umount it, but then it usually is not detected again.

I also have a 128MB Sahara disk, which works just fine (multiple mounts & umounts, no issues).

Things I have tried:
1) format in XP (apparently messes up the partition table, making disk almost completely useless in linux.
2) fdisk, mkfs.vfat - creates one nicely aligned partition, disk then I at the situation described above.
3) modprobing the required modules (uhci_hcd and ehci_usb) to see if there wasn't a conflict somewhere,.. no luck.
4) Knoppix gets along really well with it, doing all I could ever wish for.

Any other comments or tales of misery will be appreciated.

hellwyn
20th January 2005, 12:57 PM
mute, I have a tale of misery - it's a similar problem to yours, but on RH8.0 on kernel 2.4.26:

I have a new (2005) Zio 10-in-1 card USB2.0 reader. When I plugged it in for the first time, everything worked:

kernel: hub.c: new USB device 00:03.3-1, assigned address 2
kernel: usb.c: USB device 2 (vend/prod 0xdda/0x1) is not claimed by any active driver.
/etc/hotplug/usb.agent: Setup usb-storage for USB product dda/1/15b
kernel: Initializing USB Mass Storage driver...
kernel: usb.c: registered new driver usb-storage
kernel: scsi1 : SCSI emulation for USB Mass Storage devices
kernel: Vendor: Zio Corp Model: CF Card CF Rev: 1.5B
kernel: Type: Direct-Access ANSI SCSI revision: 02
kernel: Vendor: Zio Corp Model: Multi Card MS Rev: 1.5B
kernel: Type: Direct-Access ANSI SCSI revision: 02
kernel: USB Mass Storage support registered.
kernel: Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
kernel: Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 1
kernel: SCSI device sda: 503808 512-byte hdwr sectors (258 MB)
kernel: sda: Write Protect is off
kernel: sda: sda1
kernel: sdb: Unit Not Ready, sense:
kernel: Info fld=0x0, Current 00:00: sense key Not Ready
kernel: Additional sense indicates Medium not present
kernel: sdb : READ CAPACITY failed.
kernel: sdb : status = 1, message = 00, host = 0, driver = 08
kernel: Info fld=0x0, Current sd00:00: sense key Not Ready
kernel: Additional sense indicates Medium not present
kernel: sdb : block size assumed to be 512 bytes, disk size 1GB.
kernel: sdb: I/O error: dev 08:10, sector 0
kernel: I/O error: dev 08:10, sector 0
kernel: unable to read partition table
kernel: usb.c: USB disconnect on device 00:03.3-1 address 2

I have CONFIG_SCSI_MULTI_LUN set in my kernel options, so I can see the second slot as well. As you can see from the above kernel log, I have a 256MB card mounted in the CF slot on plugging it in (sda), and nothing in the second (SD/SmartMedia) slot (sdb). My fstab contains:

/dev/sda1 /mnt/usb vfat noauto,user,rw 0 0

and everything works. But I can only do this ONCE. If I unmount, unplug, then plug back in again (with the card still in the CF slot), the log looks like this:

kernel: hub.c: new USB device 00:03.3-1, assigned address 3
/etc/hotplug/usb.agent: Setup usb-storage for USB product dda/1/15b
kernel: sda: Unit Not Ready, sense:
kernel: Info fld=0x0, Current 00:00: sense key Not Ready
kernel: Additional sense indicates Medium not present
kernel: sda : READ CAPACITY failed.
kernel: sda : status = 1, message = 00, host = 0, driver = 08
kernel: Info fld=0x0, Current sd00:00: sense key Not Ready
kernel: Additional sense indicates Medium not present
kernel: sda : block size assumed to be 512 bytes, disk size 1GB.
kernel: sda: Write Protect is off
kernel: sda: I/O error: dev 08:00, sector 0
kernel: I/O error: dev 08:00, sector 0
kernel: unable to read partition table

and I cannot mount it again, with the error "/dev/sda1 is not a valid block device". And whatever happened to sdb, the second (SD/SmartMedia) slot? I can get it all to work again by doing rmmod/insmod usb-storage (as root) but that's nasty. My Freecom USB hard disk works fine any number of times - the problem is only with the Zio reader. Has anyone managed to ger a card reader to mount repeatedly without doing rmmod/insmod usb-storage?

OS: RH8.0
Kernel: 2.4.26
USB chipset: Silicon Integrated Systems [SiS] USB 1.0 Controller
USB2.0 chipset: Silicon Integrated Systems [SiS] USB 2.0 Controller

mute
22nd January 2005, 07:22 PM
This works for me (most of the time), I have no idea what it will do on any other system...

Option 1: Use USB 1.1 drivers
1) su
2) /sbin/modprobe -r ehci_hcd

This removes the USB2.0 module, and uchi_hcd takes over (If I undrestand the kernel docs correctly). My flashdrive is now easily detected, I can mount/umount as much as my heart desires... but it is very slow (really annoying on anything more than 3MB).

To do this automatically, you want to disable the loading of ehci_usb at boot, I think it might be somewhere in /etc/hotplug - grep for ehci_hcd

Option 2: An ugly hack to reinitialise the USB2.0 drivers
1) su
2) /sbin/modprobe -r ehci_hcd
So far very similar to Option 1...

3) Plug in my USB drive
uhci_hcd should pick it up, led should light, all of that

4) /sbin/modprobe ehci_hcd
So we insert the USB2.0 drivers again. It appears to find the USB device and successfully initialise it - giving me the USB2.0 speeds I like/want/need.

More browsing of the kernel docs showed that normally, ehci_hcd (the USB2.0 module) should recognise a new USB device. If it is a low speed device, the management is passed on to uhci_usb. High speed devices are initialised and managed by ehci_usb. It appears as if ehci (sometimes) has trouble correctly detecting and configuring a new Transcend drive, but it usually manages to get it right if the device has already been configured by uhci, which can be done thanks to backwards compatibility(!)

I still don't know why it doesn't work on fedora as it does on knoppix - maybe some setting somewhere is different?? I've heard rumours of Mandrake also working fine, but I still want to test it on a gentoo system before the big format takes place...

I strongly believe there is a more elegant solution. Please post if anyone finds it...

taylor65
22nd January 2005, 09:32 PM
this is what I had to do get my usb flash drive working: http://www.fedoraforum.org/forum/showthread.php?t=31220
hope it helps.