1 |
> I was handed what seems to be a corrupt xD flash card to extract the last |
2 |
> photo from it. When the WinXP system at work coughed and died on it |
3 |
> (couldn't read it) I thought that my Linux would do better. Anyhow, I've |
4 |
> inserted it into my Fuji camera and this is what dmesg shows: |
5 |
> |
6 |
> =================================================== |
7 |
> usb 2-1: new full speed USB device using uhci_hcd and address 4 |
8 |
> usb 2-1: configuration #1 chosen from 1 choice |
9 |
> scsi2 : SCSI emulation for USB Mass Storage devices |
10 |
> usb-storage: device found at 4 |
11 |
> usb-storage: waiting for device to settle before scanning |
12 |
> Vendor: FUJIFILM Model: USB-DRIVEUNIT Rev: 1.00 |
13 |
> Type: Direct-Access ANSI SCSI revision: 00 |
14 |
> SCSI device sda: 256000 512-byte hdwr sectors (131 MB) |
15 |
> sda: Write Protect is off |
16 |
> sda: Mode Sense: 07 00 00 00 |
17 |
> sda: assuming drive cache: write through |
18 |
> SCSI device sda: 256000 512-byte hdwr sectors (131 MB) |
19 |
> sda: Write Protect is off |
20 |
> sda: Mode Sense: 07 00 00 00 |
21 |
> sda: assuming drive cache: write through |
22 |
> sda: unknown partition table |
23 |
> sd 2:0:0:0: Attached scsi removable disk sda |
24 |
> sd 2:0:0:0: Attached scsi generic sg0 type 0 |
25 |
> usb-storage: device scan complete |
26 |
> ==================================================== |
27 |
|
28 |
First thing that i see is: |
29 |
where the hell is /dev/sda1? Yes, there should be a FAT partition on |
30 |
that xD card, but it's not there. |
31 |
|
32 |
So first step: |
33 |
Re-create a primary FAT partition without formatting it (for example use |
34 |
cfdisk) |
35 |
|
36 |
> Mount fails: |
37 |
> ==================================================== |
38 |
> $ mount /dev/sda |
39 |
> mount: wrong fs type, bad option, bad superblock on /dev/sda, |
40 |
> missing codepage or other error |
41 |
> In some cases useful info is found in syslog - try |
42 |
> dmesg | tail or so |
43 |
> ==================================================== |
44 |
> |
45 |
> and dmesg then shows: |
46 |
> ==================================================== |
47 |
> FAT: bogus number of reserved sectors |
48 |
> VFS: Can't find a valid FAT filesystem on dev sda. |
49 |
> FAT: bogus number of reserved sectors |
50 |
> VFS: Can't find a valid FAT filesystem on dev sda. |
51 |
> ==================================================== |
52 |
> |
53 |
> This is what fdisk shows: |
54 |
> ==================================================== |
55 |
> # fdisk /dev/sda |
56 |
> Device contains neither a valid DOS partition table, nor Sun, SGI or OSF |
57 |
> disklabel |
58 |
> Building a new DOS disklabel. Changes will remain in memory only, |
59 |
> until you decide to write them. After that, of course, the previous |
60 |
> content won't be recoverable. |
61 |
> |
62 |
> Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) |
63 |
> |
64 |
> Command (m for help): p |
65 |
> |
66 |
> Disk /dev/sda: 131 MB, 131072000 bytes |
67 |
> 5 heads, 50 sectors/track, 1024 cylinders |
68 |
> Units = cylinders of 250 * 512 = 128000 bytes |
69 |
> |
70 |
> Device Boot Start End Blocks Id System |
71 |
> |
72 |
> Command (m for help): |
73 |
> |
74 |
> ==================================================== |
75 |
> |
76 |
> Is there a Linux (or even M$Windoze?) way of me recovering the last photo, |
77 |
> that doesn't involve reconstructing raw data with a hexeditor? |
78 |
|
79 |
Maybe your are abled to mount the FAT partition after you "fixed" the |
80 |
partition table. Well, "fixing" it basically means: delete it, and |
81 |
create a new one. Typically, the FAT partition simply comsumes the whole |
82 |
disk. There should be a fair chance, that (c)fdisk chooses the same |
83 |
start/end-sectors for the partition like any other tool (including the |
84 |
camera). |
85 |
|
86 |
Good luck! |