
Dear Group,
I have an apparently dead USB key.
stripes@stripes-desktop:~$ lsusb Bus 008 Device 004: ID 413c:2011 Dell Computer Corp. Multimedia Pro Keyboard Bus 008 Device 003: ID 413c:1005 Dell Computer Corp. Multimedia Pro Keyboard Hub Bus 008 Device 002: ID 046d:c063 Logitech, Inc. Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 004: ID 048d:1168 Integrated Technology Express, Inc. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 0924:3cf0 Xerox Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Is one of those your USB key? Maybe 048d:1168? lsusb -v of that device might be useful too, although based on the stuff you posted below it looks like the device is presenting the correct interface (mass storage).
stripes@stripes-desktop:~$ tail -f /var/log/messages Aug 3 14:09:36 joanna-desktop gnome-screensaver-dialog: pam_sm_authenticate: username = [joanna] Aug 3 14:09:36 joanna-desktop gnome-screensaver-dialog: pam_sm_authenticate: /home/joanna is already mounted Aug 3 14:10:00 joanna-desktop kernel: [ 9693.808014] usb 2-2: new high speed USB device using ehci_hcd and address 4 Aug 3 14:10:00 joanna-desktop kernel: [ 9693.987092] Initializing USB Mass Storage driver... Aug 3 14:10:00 joanna-desktop kernel: [ 9693.987197] scsi4 : usb-storage 2-2:1.0 Aug 3 14:10:00 joanna-desktop kernel: [ 9693.987388] usbcore: registered new interface driver usb-storage Aug 3 14:10:00 joanna-desktop kernel: [ 9693.987389] USB Mass Storage support registered. Aug 3 14:10:01 joanna-desktop kernel: [ 9694.988476] scsi 4:0:0:0: Direct-Access XXXXXXXX U168CONTROLLER 0.00 PQ: 0 ANSI: 2 Aug 3 14:10:01 joanna-desktop kernel: [ 9694.988914] sd 4:0:0:0: Attached scsi generic sg2 type 0 Aug 3 14:10:01 joanna-desktop kernel: [ 9694.991332] sd 4:0:0:0: [sdb] Attached SCSI removable disk
Is this sdb your usb device?, or something else? Or an example of your usb device when it was working? Assuming that sdb is your usb key, but /dev/sdb doesn't exist, do you have a /dev/sg2? Basically, USB storage is just scsi packets inside USB packets. You might be able to sniff these USB packets like this howto demonstrates http://biot.com/blog/usb-sniffing-on-linux - i've done it before, but a long time ago and I don't know if anything has changed. So remove your usb stick, start capturing USB packets (make the USB as idle as possible etc unplug printer, mouse, keyboard and access remotely if you want to make it easier), then have a look at the capture in a reasonably current version of wireshark. The capture might show you if the USB packets are succeeding or not, and if they are succeeding, if the scsi packets inside are succeeding or not. Based on the results of that, if the USB commands are working and you have a /dev/sg2 device, you might be able to sg tools... I think sg_read might be able to dump the data from a scsi device. If the USB commands start to work but then encounter an error, you might be able to write an application to just blindly send scsi read commands encapsulated in USB packets to read the whole disk, maybe reading past the error that Linux is giving up on. That's a bit of a long shot though. Most of the above is speculation about what might be possible based on the information you provided. If you can capture the usb packets for ~30 seconds after inserting the device while Linux probes the device, send it to me and I can have a look. Be aware that any passwords you type on an attached usb keyboard while tracing will be visible in the trace unless you filter out the events. Some other ideas... see if there are any debug options to turn on in the usb modules (most such options are available via the /sys interfaces) - maybe something useful will be printed. Also try plugging into a USB 1.1 port if you have such an old machine lying around. James