SDHC card suddenly inaccessible

Dear experts,

I have problems accessing an SDHC card (Transcend SDHC6, 16GB) that previously worked in my system (openSUSE 12.1, 64bit)

It used to be recognized upon insertion in the cardslot and showed up on the desktop…

As one file couldn’t be accessed properly when I wanted to copy it to the HD, I copied all other data from the card to the HD, formatted the card and moved the files back. Then I ejected the card. Now it is not recognized at all anymore on the 2 machines I have access to (the one running 12.1 and another one with 11.4). It is not shown on the desktop or mounted anywhere.

However, when I remove or insert the card, the system takes still notice of it. With dmesg, I get the following reports:

 9445.017110] mmc0: card b368 removed

...

 9446.724669] mmc0: new high speed SDHC card at address b368
 9446.725487] mmcblk0: mmc0:b368 SDC   14.9 GiB 
 9446.726657]  mmcblk0: p1

Anything I could do to access the data or at least to re-initialize the card? Or has it gone dead?

Thanks for your help!

found something more in the output of dmesg:

 9479.466478] sdhci: ===========================================
 9479.468540] mmc0: Got command interrupt 0x00030000 even though no command operation was in progress.
 9479.468542] sdhci: =========== REGISTER DUMP (mmc0)===========
 9479.468546] sdhci: Sys addr: 0x00000000 | Version:  0x00000400
 9479.468550] sdhci: Blk size: 0x00000000 | Blk cnt:  0x00000000
 9479.468554] sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
 9479.468558] sdhci: Present:  0x01ff0000 | Host ctl: 0x00000001
 9479.468562] sdhci: Power:    0x0000000e | Blk gap:  0x00000000
 9479.468566] sdhci: Wake-up:  0x00000000 | Clock:    0x00004007
 9479.468570] sdhci: Timeout:  0x00000009 | Int stat: 0x00000000
 9479.468575] sdhci: Int enab: 0x00ff00c3 | Sig enab: 0x00ff00c3
 9479.468578] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
 9479.468582] sdhci: Caps:     0x01e021a1 | Max curr: 0x00000040
 9479.468584] sdhci: ===========================================
 9479.560867] mmc0: error -123 whilst initialising SD card
 9480.268451] mmc0: new high speed SDHC card at address b368
 9480.268822] mmcblk0: mmc0:b368 SDC   14.9 GiB 
 9480.270565]  mmcblk0: p1
 9481.485103] mmc0: card b368 removed

When I try to mount it manually (as root)

mount -t vfat /dev/mmcblk0 /tmp

I get:

[11364.605243] FAT: bogus number of reserved sectors
[11364.605249] VFS: Can't find a valid FAT filesystem on dev mmcblk0.
[11364.619721] hfs: can't find a HFS filesystem on dev mmcblk0.
[11364.637049] VFS: Can't find a Minix filesystem V1 | V2 | V3 on device mmcblk0.
[11364.682806] REISERFS warning (device mmcblk0): sh-2021 reiserfs_fill_super: can not find reiserfs on mmcblk0
[11364.683419] EXT3-fs (mmcblk0): error: can't find ext3 filesystem on dev mmcblk0.
[11364.683803] EXT2-fs (mmcblk0): error: can't find an ext2 filesystem on dev mmcblk0.
[11364.709676] ISOFS: Unable to identify CD-ROM format.
[11364.710206] EXT4-fs (mmcblk0): VFS: Can't find ext4 filesystem
[11385.573501] FAT: bogus number of reserved sectors
[11385.573507] VFS: Can't find a valid FAT filesystem on dev mmcblk0.

any clues?

imalipusram wrote:
> any clues?

It sounds like the format didn’t work properly. I would try formatting
again, using a different device to format it, in case there is some
problem with the method you already used. e.g. format it in a camera.

Thanks, but formatting is the last thing I would want to try at the moment. Mounting is rejected as there is no valid filesystem recognized. What about the “2nd copy of the FAT” that used to exist at least long time ago on DOS systems? Is there any?
When I use the disk partitioning options within yast, the SDHC is displayed a a HD with the filesystem ID “0x0C Win95 FAT32”. Also there, mounting it does not work.

mmcblk* are the two cards I cay see with “ls -al /dev” But there is only one card in my machine. They seem both attached to the same card, as they disappear when I remove the SDHC.

It seems that with

dd if=/dev/mmcblk0 of=/somedir/somefile and
dd if=/dev/mmcblk0p1 of=/somedir/someotherfile

I can dump the contents of the card to a file. Anything useful I could do with it?

imalipusram wrote:
> djh-novell;2429087 Wrote:
>> . e.g. format it in a camera.
>
> Thanks, but formatting is the last thing I would want to try at the
> moment.

You seem to have omitted something from your problem report then. AIUI,
the card presently contains data that was copied to it from a backup
that you have elesewhere, so I see no reason not to format it.

> It seems that with
>
> dd if=/dev/mmcblk0 of=/somedir/somefile and
> dd if=/dev/mmcblk0p1 of=/somedir/someotherfile
>
> I can dump the contents of the card to a file. Anything useful I could
> do with it?

I expect you could bind mount it and/or use whatever diagnostic tools
there are for FAT filesystems. I’m not familiar with them, sorry.

I probably solved the problem, although I don’t understand completely, why:

I found a tool named “TestDisk” by Christophe GRENIER on the net(http://www.cgsecurity.org/wiki/Main_Page](http://www.cgsecurity.org/wiki/Main_Page)), and ran it as root. It reported that the boot sector of the SDHC was faulty. Thus, after a backup with dd (see some posts before), I used TestDisk to write a new boot sector. After that, the card still could not be mounted. Then, I tried the “Laufwerksverwaltung 3.0.2” from the 12.1 installation (probably named “Disk Drive Administration” or alike in English) that allowed me to check and mount the card and extract (possibly) all the data. Previously, I had tried fschk -vfat before (which did not work), so I guess writing the boot sector was sort of the clue to rescue the memory card.