LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   howto recover a SDHC card, after getting a buffer i/o error mesg from dmesg(1)? (https://www.linuxquestions.org/questions/linux-newbie-8/howto-recover-a-sdhc-card-after-getting-a-buffer-i-o-error-mesg-from-dmesg-1-a-882516/)

tuxboom747 05-24-2011 04:01 PM

howto recover a SDHC card, after getting a buffer i/o error mesg from dmesg(1)?
 
hello linux world

after reading a SDHC (camera) card with my computer in a non-HC compatible
card reader, i guess i destroyed the partition table.

After getting a SDHC-compatible reader i found it seems there is no part. table on the card and no fdisk(1), badblocks(1) can read that card.

Seems they will wait forever to get a part table.

dmesg says:
[ 7463.499706] sd 13:0:0:0: Attached scsi generic sg3 type 0
[ 7464.022814] sd 13:0:0:0: [sdc] 1024 512-byte logical blocks: (524 kB/512 KiB)
[ 7464.024932] sd 13:0:0:0: [sdc] Write Protect is off
[ 7464.024936] sd 13:0:0:0: [sdc] Mode Sense: 03 00 00 00
[ 7464.026935] sd 13:0:0:0: [sdc] No Caching mode page present
[ 7464.026940] sd 13:0:0:0: [sdc] Assuming drive cache: write through
[ 7464.031931] sd 13:0:0:0: [sdc] No Caching mode page present
[ 7464.031934] sd 13:0:0:0: [sdc] Assuming drive cache: write through
[ 7494.452612] usb 1-5: reset high speed USB device using ehci_hcd and address 8
-- last line repeated several times --

has anyone a solution on how to recover the card?

Thanks in advance.

pljvaldez 05-24-2011 06:32 PM

From an SDHC card reader, I would make a copy of the card with dd. Something like dd if=/dev/sdc of=/home/user/cardimage.img bs=8M. Then run testdisk on the image file and see if you can restore the partition table. If not, you should be able to recover the photos from the card using photorec.

tuxboom747 06-08-2011 03:35 PM

[SOLVED]
Thank you, pljvaldez

I found out the card is definitely physically damaged.

After trying dd(1) and testdisk four, five times I tried rebooting the box with the card pluged in, but than the maschine hangs and gave me a lot of "no partition table found" errors. "Hangs" here means the maschine did not going on within the boot process I hat to press the reset button.

Before that, some times I found also the maschine was frozen when I pluged the stick in a slot: Scroll and Pause keyboard keys were blinking and no mouse nor the keyboard were responding, anymore.
Clear, I first thought it's the card reader, so I tried some other cards, but they all worked fine.

And finaly running dd and testdisk without any positive results, I gave up.

To my luck, there's no big loss, the physical card itself only.

Again Thank you.


All times are GMT -5. The time now is 10:04 PM.