You are not logged in.
Hi all,
I have an 16GB micro-sd card which had a really bad time when the computer hard-crashed/rebooted while I was copying files to it. It's not completely bricked but shows up as only having 512KB capacity:
Entries in dmesg when inserting the card:
[22027.642273] mmc0: new SD card at address b368
[22027.652105] mmcblk0: mmc0:b368 SMI-S 512 KiBOutput of fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytesFirst I was thinking about using rufus on windows, which does a great job at fixing corrupted ID'ing of removable drives, but it only works on usb drives and I only have internal pci card readers. I tried (on my wife's computer with win installed) and it doesn't see the card at all, even with the 'show all drives' advanced option ticked.
What (hopefully linux) tools can I use to fix this? I know it's not strictly arch related but I figured it must have happened to someone here before, just couldn't get a hit with the search (probably using wrong terms).
All help most welcome!
(edited post title to remove ambiguity on the type of card, originally wrote "compact flash")
Last edited by wellohead (2021-04-27 17:28:03)
Offline
You didn't say which type of filesystem is on the card or mention partition layout.
TestDisk maybe? https://wiki.archlinux.org/index.php/File_recovery
Offline
Thanks for the reply.
Well, I probably wansn't clear about this in the original post but I don't need to recover anything from the card. It contained a single vfat partition spanning the whole available memory (a real partition, not superdisk-style).
My goal is to get the card to show its real storage capacity of 16GB so I can continue to use it again (after proper re-partitioning and and formatting of course). I looked at the manufacturer's website (Lexar) but they only have data-recovery utilities available for download, nothing to re-initialize cards or similar.
Last edited by wellohead (2021-04-24 14:26:08)
Offline
From the link I posted: "TestDisk allows to fix partition tables, recover deleted partitions" - isn't that what you were after?
Could you try formatting the card in other hardware, like a phone or camera for instance (there have been posts on this forum about internal card readers not working correctly)?
Did you have a go with gparted?
Last edited by paulkerry (2021-04-26 20:41:30)
Offline
Hi. The problem is not with the partitioning or lost data. The card now 'announces' itself as a 512KB card instead of 16GB) so that's what fdisk and every other tool assumes. I'm looking for a way to restore how the card presents itself properly to the system. The card wasn't new but very seldom written to, so no cell-wear problem there. Right now I'm looking into the sdcard.org whitepapers to see if there's a way to reprogram the protected registers in SPI mode, so I'll close this for now, not gonna be newbie-corner nor arch-related.
Thanks for the helping advices though, appreciated!
Offline
Please don't mark your thread as [Closed], this is reserved for threads that have been locked by the mods from any further posts.
Offline