Having problems formatting after installing

Hello,
I was using a 16GB card and SD card wasn't installed properly and It lost contact during operation. I can still access /boot, but it won't boot in raspberry pi. I changed to another SD card to keep using octoprint.

When I try to format it says "Card is write protected". I tried to use diskpart, but it said "RAW is not supported". I tried SD card formatter, still nothing. I used Mini tool partition wizard, EasUS partition master and almost every other windows in-built tool I could find on internet, but nothing seems to work.

Any suggestion would help!

Hello @kokofruits_1!

A short question: How did you shutdown OctoPrint before? Shutdown via menu or just pulled the plug?

Don't. Use BalenaEtcher and follow the instructions to flash the entire microSD all at once.

I assume the card is just dead...

That tool is ok imo. It also got a resize sd card option.

I think you're right. I guess it went to read only mode for data rescue.

The effort is completely lost because BalenaEtcher just repeats all that and overcopies the allocation table and partitions. Additionally, Windows/Apple purposely/willfully have not included mount support for ext4 partitions so they'll throw "helpful" messages that suggest that it can "fix" the problem. In their terms, they're changing an ext4 partition into something that's not UNIX-like.

Oh I got your don't wrong. I thought you're advising against that tool in general :man_facepalming:
Yeah you're right in this scenario it's unnecessary.