[CentOS] USB flash drive stopped working properly....

Mon Feb 26 22:25:22 UTC 2007
John Summerfield <debian at herakles.homelinux.org>

Mark Hull-Richter wrote:
> It happened again - the directory comes up as blank, and the icon for
> the flash drive won't unmount.
> 
> Here's what I get in /var/log/messages:
> 
> Feb 26 12:43:46 localhost kernel: usb 1-8: new high speed USB device
> using address 15
> Feb 26 12:43:46 localhost kernel: scsi13 : SCSI emulation for USB Mass
> Storage devices
> Feb 26 12:43:46 localhost kernel:   Vendor: SanDisk   Model: U3 Titanium
> Rev: 2.18
> Feb 26 12:43:46 localhost kernel:   Type:   Direct-Access
> ANSI SCSI revision: 02
> Feb 26 12:43:46 localhost kernel: SCSI device sdb: 4013713 512-byte hdwr
> sectors (2055 MB)
> Feb 26 12:43:46 localhost kernel: sdb: Write Protect is off
> Feb 26 12:43:46 localhost kernel: sdb: assuming drive cache: write
> through
> Feb 26 12:43:46 localhost kernel: SCSI device sdb: 4013713 512-byte hdwr
> sectors (2055 MB)
> Feb 26 12:43:46 localhost kernel: sdb: Write Protect is off
> Feb 26 12:43:46 localhost kernel: sdb: assuming drive cache: write
> through
> Feb 26 12:43:46 localhost kernel:  sdb: unknown partition table
> Feb 26 12:43:46 localhost kernel: Attached scsi removable disk sdb at
> scsi13, channel 0, id 0, lun 0
> Feb 26 12:43:46 localhost scsi.agent[10634]: disk at
> /devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.0/host13/target13:0:0/13
> :0:0:0
> Feb 26 12:43:47 localhost fstab-sync[10710]: added mount point
> /media/MHRTITAN for /dev/sdb
> 
> It seems that the partition table is not being recognized....
> 
> It mounts fine on my Windows XP under VMWare on the same machine.



Next time,
dd if=/dev/sda count=1 | xxd | less

I don't propose to decode the partition table (I could, but it would 
take me longer than I'd do free), but I suspect that the invalid 
partition table will be clearly wrong, maybe all binary zeros.

To see what a good partition table looks like, dump /dev/hda or some other.

The important stuff is here:

00001b0: 0000 0000 0000 0000 39cb 0200 0000 0001  ........9.......
00001c0: 0100 83fe 3f02 3f00 0000 04bc 0000 8000  ....?.?.........
00001d0: 0103 06fe 3f04 43bc 0000 827d 0000 0000  ....?.C....}....
00001e0: 0105 83fe ffff c539 0100 3f14 a804 00fe  .......9..?.....
00001f0: ffff 05fe ffff 044e a904 00a6 5009 55aa  .......N....P.U.

and the 55aa at the end is crucial: if that's not 55aa, nothing else 
matters.

btw I suggest using dd to take a full copy while it's working. If 
necessary, you can play with parted, extract the bits and gain an 
education later.




-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu

Please do not reply off-list