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 09:02:02
Message-Id: 3b168014-e378-4312-6e38-d36c3944c59b@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 15:26, tuxic@××××××.de wrote:
2 > On 03/26 03:04, Bill Kenworthy wrote:
3 >> On 26/03/17 14:25, tuxic@××××××.de wrote:
4 >>> On 03/26 05:50, tuxic@××××××.de wrote:
5 >>>> On 03/26 11:21, Adam Carter wrote:
6 >>>>> Step 1: dd the contents into an image
7 >>>>>
8 >>>>> ddrescue is probably a better option than plain dd.
9 >>>>>
10 >>>>> step 2: put the sdcard to one side.
11 >>>>>> step 3: loopback mount a copy of the image (not the original)
12 >>>>>> step 4: try recovering the filesystem on the loopback, if it fails ... try
13 >>>>>> something else on another image copy
14 >>>>>
15 >>>>>
16 >>>>> Yep, once you've got the image mounted loopback, you can run
17 >>>>> testdisk/photorec depending on how bad it is.
18 >>>>
19 >>>> Hi all,
20 >>>>
21 >>>> thanks a lot for all help! :)
22 >>>>
23 >>>> Currently I am ddresucueing the flashcard to the harddisc.
24 >>>> Next I will try to mount the sdcard.
25 >>>>
26 >>>> What reliable sdcard-reader can one recommend ?
27 >>>> (...sorry if this sentence sounds harsh...I it by no means meant
28 >>>> that way...I am no native speaker... :)
29 >>>>
30 >>>> Cheers
31 >>>> Meino
32 >>>>
33 >>>>
34 >>>
35 >>> Hi,
36 >>>
37 >>> Is the assumption correct, that -- if ddrescue could read each
38 >>> partitions of the sdcard without stuttering, retries and errors --
39 >>> the sdcard itsself is ok and "only" the logical structure
40 >>> (fs, superblock etc) got damaged?
41 >>> Or do I overlook something?
42 >>>
43 >>> (Background: I dont want to put a sdcard into the bin, if
44 >>> fdisking & reformatting that beast would gives me back an ok
45 >>> media...)
46 >>>
47 >>> Cheers
48 >>> Meino
49 >>>
50 >>>
51 >>>
52 >>>
53 >>
54 >> The dd gets you the best chance to work on the data before it completely
55 >> fails. In my experience the sdcard will only get worse ending with total
56 >> failure - if it hasn't already.
57 >>
58 >> If the dd dump comes up rubbish and cant be recovered, the actual sdcard
59 >> will be worse. You can run "strings" against the image to see if there is
60 >> any text in there (or even cat the /dev/sdcard node through strings) to see
61 >> if the bits are still there.
62 >>
63 >> I dont know of a cdparanoia type recovery utility for sdcards but I suspect
64 >> sdcard design means that approach wont work.
65 >>
66 >> BillK
67 >>
68 >>
69 >>
70 >
71 > Hi Bill,
72 >
73 > I got mixed results: There are three partitions on the sdcard from
74 > which I could fully recover (even mount it directly via loop device)
75 > the first and the third one.
76 >
77 > The second one is screwed up.
78 >
79 > Running fsch.ext4 against the image it starts with "bad superblock"
80 > and suggests two alternatives.
81 >
82 > I started fsch.ext4 again while using -b to define the alternate
83 > superblock and it starts to ask me *zillions of question, which
84 > I all answered with 'yes' in a first attempt (I have a backup of the
85 > image...).
86 > The result was an image, which I could mount again.
87 > But beside 'lost+found' with some small rests of something which
88 > may be files in a previous life nothing was there....
89 >
90 > Currently it looks to me, that something has totally messed up the fs
91 > there.
92 >
93 > What do you think?
94 >
95 > Cheers
96 > Meino
97 >
98 >
99 >
100 >
101 >
102 Sounds like its toast :(
103
104 I have never had a lot of luck with any of the ext file systems - you
105 have to baby them and they corrupt very easily compared to others. I
106 try and avoid them ...
107
108 BillK

Replies