SD card got corrupted: trying to reformat: do not care about files or recovery

Using TestDisk to repair the filesystem
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
zoop
Posts: 2
Joined: 02 Jul 2022, 07:31

SD card got corrupted: trying to reformat: do not care about files or recovery

#1 Post by zoop »

hey folks it's been quite a journey finding this forum. I hope you are all having a fine day and able to help me.
somehow I've corrupted a SD card to the point it is not readable by windows or linux. (I'm using Mint)
I have tried using cmd to reformat the drive with failures and fianlly found my way to the software TestDisk
I've also read the testdisk pfd (very informative thanks for that! it may come in handy)
I've followed 7.4 Repairing FAT32, exFAT and NTFS boot sector using TestDisk

To be clear: I don't care about the data on this drive. I'm just trying to give life back to the SD card so that it's usable again
here's what I understand
The drive doesn't show up at all in Windows
The drive shows up in Linux under the Gparted (or disks) as a raw format.
Opening testdisk (in linux) shows

Code: Select all

TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org

  TestDisk is free software, and
comes with ABSOLUTELY NO WARRANTY.

Select a media (use Arrow keys, then press Enter):
>Disk /dev/sdf - 15 GB / 14 GiB - Generic STORAGE DEVICE
Here I'm hitting proceed
it's auto-choosing intel so I'm continuing with that.

Code: Select all

Disk /dev/sdf - 15 GB / 14 GiB - Generic STORAGE DEVICE
chooses Intel

it now reads

Code: Select all

Disk /dev/sdf - 15 GB / 14 GiB - Generic STORAGE DEVICE
     CHS 15193 64 32 - sector size=512

here per the instructions I'm choosing Advanced.
No Partition Available

Through trial and error I've found that writing a copy of MBR
to the first sector now gives the following options

Code: Select all

Disk /dev/sdf - 15 GB / 14 GiB - CHS 15193 64 32

     Partition                  Start        End    Size in sectors
> 2 * Sys=44               559240  34  5 1118481   4  8 1145324612
  1 * Sys=4C               559244  34  5 1131626   4  8 1172237380

I'm not sure what to do here as the only options are "image creation" "quit" and "type"
I've saved each partition to a image in a folder on the Linux computer but not sure what to do from here.
Thanks for any support or guidance you are able to give!

PS: if
I'm hitting Analyse the following message dispalying

Code: Select all

Disk /dev/sdf - 15 GB / 14 GiB - CHS 15193 64 32
Current partition structure:
     Partition                  Start        End    Size in sectors

[b]Partition sector doesn't have the endmark 0xAA55[/b]

here I'm hitting quick search
it runs Analyse cylinder

and I get the following

Code: Select all

Disk /dev/sdf - 15 GB / 14 GiB - CHS 15193 64 32
Current partition structure:
     Partition                  Start        End    Size in sectors

> 1 * Sys=4C               559244  34  5 1131626   4  8 1172237380              

 Warning: Bad ending sector (CHS and LBA don't match)
  2 * Sys=44               559240  34  5 1118481   4  8 1145324612

 Warning: Bad starting head (CHS and LBA don't match)
  3 * Sys=44               559240  34  5 1118481   4  8 1145324612

 Warning: Bad starting head (CHS and LBA don't match)
  4 * Sys=44               559240  34  5 1118481   4  8 1145324612

 Warning: Bad starting head (CHS and LBA don't match)
    Next
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
>[Quick Search]  [ Backup ]

recuperation
Posts: 2719
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: SD card got corrupted: trying to reformat: do not care about files or recovery

#2 Post by recuperation »

Testdisk is a recovery tool and not a format tool. Therefore it is not suitable for your format intentions.

zoop
Posts: 2
Joined: 02 Jul 2022, 07:31

Re: SD card got corrupted: trying to reformat: do not care about files or recovery

#3 Post by zoop »

Allright that makes perfect sense.
Thanks for the answer. Do you know of any tools that can help in formatting a SD card that is messed up?

recuperation
Posts: 2719
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: SD card got corrupted: trying to reformat: do not care about files or recovery

#4 Post by recuperation »

If your card is broken no software will help you.

https://www.sdcard.org/

Locked