"Kill" SD-Card to get it reborn :)

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello
Somehow i smashed my SD-Card (Reekin 1GB)in my SD-ATMEGA-Circuit.
So i can't format it anymore, but it still has 5 mp3-Files on it, that i can access.
Panasonic SD-Formater doesn't work.
So how do i have to handle the thing, to put it back to life?
Writing zeros all the time?
I think, i have to use CMD24 or 25 right?

Please give me a proposal in Pseudocode.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Personally I'd use WinHex and just write 0 to the MBR so that Windows will see it as "blank". Only thing is that you need a licence for WinHex to write otherwise it's read only. So next suggestion is to attach it to a Linux machine and just dd from /dev/zero to it something like

dd if=/dev/zero of/dev/sde1 bs=512 count=64

(use fdisk -l to check first whether it's sde1 or whatever)

But how about just using good old fashioned FDISK in WinDOS?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No do not fill MBR with zeroes. I tried it once, and WinXP formatted it without MBR. The FAT partition started directly from sector 0.

This may work with some devices but may not work with all of them, at least when the card info registers say is it formatted with or without MBR, and the actual format differs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

oh yeah, i should have mentioned, that i tried it with winhex, but after putting the card in again, the files were there again.
SD-Formatter brings me "Card is write-protected."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

The problem is not yet solved. ;)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

i tried it with winhex, but after putting the card in again, the files were there again.

Then you probably didn't get WinHex to write the modified sectors back to the disk (or you don't have a registered copy in which case WinHex is read-only)

To be honest I find the quick way to wipe drives is using Linux. Assuming the card appears as /dev/sdc then just do something like:

dd if=/dev/zero of=/dev/sdc bs=512 count=64

to wipe the first 64 sectors (for example). Before you do this use "fdisk -l" and make ABSOLUTELY sure that you have identified the correct target (such as /dev/sdc in this example) because if you get it wrong you completely blitz your main Linux system.

(oh and do this with root privileges)