> I was handed what seems to be a corrupt xD flash card to extract the last > photo from it. When the WinXP system at work coughed and died on it > (couldn't read it) I thought that my Linux would do better. Anyhow, I've > inserted it into my Fuji camera and this is what dmesg shows: > > =================================================== > usb 2-1: new full speed USB device using uhci_hcd and address 4 > usb 2-1: configuration #1 chosen from 1 choice > scsi2 : SCSI emulation for USB Mass Storage devices > usb-storage: device found at 4 > usb-storage: waiting for device to settle before scanning > Vendor: FUJIFILM Model: USB-DRIVEUNIT Rev: 1.00 > Type: Direct-Access ANSI SCSI revision: 00 > SCSI device sda: 256000 512-byte hdwr sectors (131 MB) > sda: Write Protect is off > sda: Mode Sense: 07 00 00 00 > sda: assuming drive cache: write through > SCSI device sda: 256000 512-byte hdwr sectors (131 MB) > sda: Write Protect is off > sda: Mode Sense: 07 00 00 00 > sda: assuming drive cache: write through > sda: unknown partition table > sd 2:0:0:0: Attached scsi removable disk sda > sd 2:0:0:0: Attached scsi generic sg0 type 0 > usb-storage: device scan complete > ====================================================
First thing that i see is: where the hell is /dev/sda1? Yes, there should be a FAT partition on that xD card, but it's not there. So first step: Re-create a primary FAT partition without formatting it (for example use cfdisk) > Mount fails: > ==================================================== > $ mount /dev/sda > mount: wrong fs type, bad option, bad superblock on /dev/sda, > missing codepage or other error > In some cases useful info is found in syslog - try > dmesg | tail or so > ==================================================== > > and dmesg then shows: > ==================================================== > FAT: bogus number of reserved sectors > VFS: Can't find a valid FAT filesystem on dev sda. > FAT: bogus number of reserved sectors > VFS: Can't find a valid FAT filesystem on dev sda. > ==================================================== > > This is what fdisk shows: > ==================================================== > # fdisk /dev/sda > Device contains neither a valid DOS partition table, nor Sun, SGI or OSF > disklabel > Building a new DOS disklabel. Changes will remain in memory only, > until you decide to write them. After that, of course, the previous > content won't be recoverable. > > Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) > > Command (m for help): p > > Disk /dev/sda: 131 MB, 131072000 bytes > 5 heads, 50 sectors/track, 1024 cylinders > Units = cylinders of 250 * 512 = 128000 bytes > > Device Boot Start End Blocks Id System > > Command (m for help): > > ==================================================== > > Is there a Linux (or even M$Windoze?) way of me recovering the last photo, > that doesn't involve reconstructing raw data with a hexeditor? Maybe your are abled to mount the FAT partition after you "fixed" the partition table. Well, "fixing" it basically means: delete it, and create a new one. Typically, the FAT partition simply comsumes the whole disk. There should be a fair chance, that (c)fdisk chooses the same start/end-sectors for the partition like any other tool (including the camera). Good luck!
signature.asc
Description: OpenPGP digital signature