Gentoo Archives: gentoo-user

From: Bill Kenworthy <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] The sudden disappearance of ....WHAT??? (I/O error on a SD flash card?!)
Date: Sun, 26 Mar 2017 07:10:57
Message-Id: 3ee76d64-5347-a4d6-c395-a69b39658a8d@iinet.net.au
In Reply to: Re: [gentoo-user] The sudden disappearance of ....WHAT??? (I/O error on a SD flash card?!) by tuxic@posteo.de
1 On 26/03/17 14:25, tuxic@××××××.de wrote:
2 > On 03/26 05:50, tuxic@××××××.de wrote:
3 >> On 03/26 11:21, Adam Carter wrote:
4 >>> Step 1: dd the contents into an image
5 >>>
6 >>> ddrescue is probably a better option than plain dd.
7 >>>
8 >>> step 2: put the sdcard to one side.
9 >>>> step 3: loopback mount a copy of the image (not the original)
10 >>>> step 4: try recovering the filesystem on the loopback, if it fails ... try
11 >>>> something else on another image copy
12 >>>
13 >>>
14 >>> Yep, once you've got the image mounted loopback, you can run
15 >>> testdisk/photorec depending on how bad it is.
16 >>
17 >> Hi all,
18 >>
19 >> thanks a lot for all help! :)
20 >>
21 >> Currently I am ddresucueing the flashcard to the harddisc.
22 >> Next I will try to mount the sdcard.
23 >>
24 >> What reliable sdcard-reader can one recommend ?
25 >> (...sorry if this sentence sounds harsh...I it by no means meant
26 >> that way...I am no native speaker... :)
27 >>
28 >> Cheers
29 >> Meino
30 >>
31 >>
32 >
33 > Hi,
34 >
35 > Is the assumption correct, that -- if ddrescue could read each
36 > partitions of the sdcard without stuttering, retries and errors --
37 > the sdcard itsself is ok and "only" the logical structure
38 > (fs, superblock etc) got damaged?
39 > Or do I overlook something?
40 >
41 > (Background: I dont want to put a sdcard into the bin, if
42 > fdisking & reformatting that beast would gives me back an ok
43 > media...)
44 >
45 > Cheers
46 > Meino
47 >
48 >
49 >
50 >
51
52 The dd gets you the best chance to work on the data before it completely
53 fails. In my experience the sdcard will only get worse ending with
54 total failure - if it hasn't already.
55
56 If the dd dump comes up rubbish and cant be recovered, the actual sdcard
57 will be worse. You can run "strings" against the image to see if there
58 is any text in there (or even cat the /dev/sdcard node through strings)
59 to see if the bits are still there.
60
61 I dont know of a cdparanoia type recovery utility for sdcards but I
62 suspect sdcard design means that approach wont work.
63
64 BillK

Replies