Allen BrownWed Dec 3 21:16:28 PST 2008
I spent last month in Australia. I collected two weeks of
pictures, amounting to approximately 5GB, onto a 16GB SD
card. Until the card stopped being readable by my Nokia
n800.
I then bought a new 16GB SD card and stored the rest of
the two weeks on it. Another 5GB.
The second SD card is still good. I have transferred those
pictures to my main computer. I plan to edit and post them soon.
The first SD card is a problem. If not for the pictures on it
I would simply throw it away. But those pictures are irreplaceable.
When I plug in the first SD card dmesg reports
21638.906250] mmc1: unrecognised SCR structure version 5
A friend (who is much more familiar with kernel internals)
said:
It would appear that the relevant code is:
scr_struct = UNSTUFF_BITS(resp, 60, 4);
if (scr_struct != 0) {
printk("%s: unrecognised SCR structure version %d\n",
mmc_hostname(card->host), scr_struct);
mmc_card_set_bad(card);
return;
}
So it only expects "0" in the field, and you have two bits picked.
This doesn't bode well.
Indeed our attempts to plug it in and read raw data from the
scsi device have failed. I wondered if I could get anything
useful by disabling the check above.
That takes me to recompiling the kernel. I followed along on
http://www.howtoforge.com/kernel_compilation_ubuntu_p2
and https://help.ubuntu.com/community/Kernel/Compile
I'm not sure if my Ubuntu system doesn't match the author's.
But I had to takes some steps they don't mention. And their
description is ambiguous in some places. But I finally
managed to compile the kernel. However, the instructions
don't go far enough. Under the 2.4 kernel (which I got good
at compiling) there was a separate install step. There is
no mention of that on these web sites. And yet, it seems clear
that this is necessary.
OK, so I can copy the kernel easily enough to /boot and modify
the grub file. But what about the modules? I don't know what
to do. And all of this is a waste of time if I can't modify
the modules. After all, the code I need to modify is almost
certainly in the sd module. (I haven't bothered to search it
down since first I wanted to test run a kernel I had compiled.)
So the questions I have are:
1. Is this a reasonable approach to recovering a broken SD card?
2. Do you know of a good way to recover an SD card?
3. How do you install the kernel modules?
--
Allen Brown abrown at peak.org http://brown.armoredpenguin.com/~abrown/
A bus station is where a bus stops. A train station is where a train
stops. On my desk, I have a workstation. What more can I say? -- anon