Greg Lopp on 14 Feb 2007 20:17:15 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] restoring a corrupted USB iPod


On 2/14/07, Art Alexion <art.alexion@verizon.net> wrote:
The kernel correctly identifies it, but reports I/O errors.

Suggestions for accessing it to repartition and reformat?

Putting my USB developer hat on to read the log (hmmm, hat's a little dusty)

relevant dmesg below:

[17184814.516000] hub 1-1:1.0: USB hub found
[17184814.516000 ] hub 1-1:1.0: 4 ports detected
[17184814.832000] usb 1-1.4: new full speed USB device using uhci_hcd
and address 3
[17184814.940000] usb 1-1.4: configuration #1 chosen from 2 choices

So, the USB enumeration is OK.  This is the generic part that any and all USB devices perform. The nano told the host that it could behave in two different ways. The host chose way #1. 

[17184815.764000] SCSI subsystem initialized
[17184815.868000] Initializing USB Mass Storage driver...

Configuration #1 is a mass storage device.  Init-ing the MSD includes which command set is going to be used.  FD, SCSI, others?

[17184815.872000] scsi0 : SCSI emulation for USB Mass Storage devices

SCSI it is then.

[17184815.872000] usb-storage: device found at 3
[17184815.872000] usb-storage: waiting for device to settle before sca
nning

Polling the device to give it a chance to powerup, spin up, etc. It will TEST_UNIT_READY until the answer is affirmative.

[17184815.872000] usbcore: registered new driver usb-storage
[17184815.872000 ] USB Mass Storage support registered.
[17184820.876000]   Vendor: Apple     Model: iPod              Rev: 2.
70
[17184820.876000]   Type:   Direct-Access                      ANSI SC
SI revision: 04
More data from the enumeration.

[17184820.900000] usb-storage: device scan complete
[17184821.008000] Driver 'sd' needs updating - please use bus_type met
hods
[17184821.036000] sda: Unit Not Ready, sense:

Assuming a timeout with the polling. (Possibly a bad packet)  Send a REQUEST_SENSE to the device....
[17184821.036000] : Current: sense key: Unit Attention
[17184821.036000]     Additional sense: Medium format corrupted
....reports something wrong with the disk.

[17184821.056000] sda : READ CAPACITY failed.

tried std SCSI command. failed. Device will not report the number and size of its sectors.
As you can see, it keeps trying.....

[17184821.056000] sda : status=1, message=00, host=0, driver=08
[17184821.056000] sd: Current: sense key: Unit Attention
[17184821.056000]     Additional sense: Medium format corrupted
[17184821.064000] sda: test WP failed, assume Write Enabled
[17184821.064000] sda: assuming drive cache: write through
[17184821.140000] sda: Unit Not Ready, sense:
[17184821.140000] : Current: sense key: Unit Attention
[17184821.140000]     Additional sense: Medium format corrupted
[17184821.164000] sda : READ CAPACITY failed.
[17184821.164000] sda : status=1, message=00, host=0, driver=08
[17184821.168000] sd: Current: sense key: Unit Attention
[17184821.168000]     Additional sense: Medium format corrupted
[17184821.172000] sda: test WP failed, assume Write Enabled
[17184821.176000] sda: assuming drive cache: write through
[17184821.192000] sda: Unit Not Ready, sense:
[17184821.196000] : Current: sense key: Unit Attention
[17184821.196000]     Additional sense: Medium format corrupted
[17184821.216000] sda : READ CAPACITY failed.
[17184821.216000] sda : status=1, message=00, host=0, driver=08
[17184821.220000] sd: Current: sense key: Unit Attention
[17184821.220000]     Additional sense: Medium format corrupted
[17184821.228000] sda: test WP failed, assume Write Enabled
[17184821.228000] sda: assuming drive cache: write through
[17184821.228000]  sda:<3>Buffer I/O error on device sda, logical bloc
k 0
[17184821.228000] Buffer I/O error on device sda, logical block 0
[17184821.228000]  unable to read partition table
[17184821.232000] sd 0:0:0:0: Attached scsi removable disk sda
[17184821.280000] sd 0:0:0:0: Attached scsi generic sg0 type 0
[17184821.528000] sda: Unit Not Ready, sense:
[17184821.528000] : Current: sense key: Unit Attention
[17184821.532000]     Additional sense: Medium format corrupted
[17184821.552000] sda : READ CAPACITY failed.
[17184821.552000] sda : status=1, message=00, host=0, driver=08
[17184821.552000] sd: Current: sense key: Unit Attention
[17184821.556000]     Additional sense: Medium format corrupted
[17184821.560000] sda: test WP failed, assume Write Enabled
[17184821.564000] sda: assuming drive cache: write through
[17184821.580000] sda: Unit Not Ready, sense:
[17184821.580000] : Current: sense key: Unit Attention
[17184821.580000]     Additional sense: Medium format corrupted
[17184821.604000] sda : READ CAPACITY failed.
[17184821.604000] sda : status=1, message=00, host=0, driver=08
[17184821.604000] sd: Current: sense key: Unit Attention
[17184821.604000]     Additional sense: Medium format corrupted
[17184821.612000] sda: test WP failed, assume Write Enabled
[17184821.612000] sda: assuming drive cache: write through
[17184821.616000]  sda:<3>Buffer I/O error on device sda, logical bloc
k 0
[17184821.616000 ] Buffer I/O error on device sda, logical block 0
[17184821.616000]  unable to read partition table
[17184821.620000] Buffer I/O error on device sda, logical block 1
[17184821.620000] Buffer I/O error on device sda, logical block 2
[17184821.620000] Buffer I/O error on device sda, logical block 3
[17184821.620000] Buffer I/O error on device sda, logical block 4
[17184821.620000] Buffer I/O error on device sda, logical block 5
[17184821.620000 ] Buffer I/O error on device sda, logical block 6

Your host cheated. Although it was unable to get READ_CAPACITY to work, it went ahead and tried to read the partition table of the drive.  The READ_10 command (to read the first 7(!?!) logical blocks on the drive) also failed.

[17184821.812000] sda: Unit Not Ready, sense:
[17184821.812000] : Current: sense key: Unit Attention
[17184821.812000]     Additional sense: Medium format corrupted
[17184821.836000] sda : READ CAPACITY failed.
[17184821.836000] sda : status=1, message=00, host=0, driver=08
[17184821.836000] sd: Current: sense key: Unit Attention
and then it continues to repeat itself.
--

I would expect READ_CAPACITY to be answered from firmware - no need for the flash device to be "powered up" for read.
This looks beyond simple format or fs corruption to me.  It isn't that the data is bad on the drive, but that the device is not successfully communicating as a mass storage device......correction: it is communicating as a mass storage device, but is reporting a serious error.  The requests are successful but the status fields indicate errors.

Restating:
USB communication : looks good
Mass Storage device comm. : looks appropriate
Storage media status : failure
File system status : moot

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug