Had a 256Gb microsd card trashed by simply imaging a linux build onto it (retropie).
It locks up my widows pc on insertion. Sometimes I can see the boot partition but windows is very unhappy so no chance to format. Even diskpart locks up, if inserted after running it refuses to see it.
Raspberry Pi imager lists the card reader as ‘read only’ and is greyed out.
If you want a gui, install gparted (sudo apt install gparted) on raspberry pi and see if you can address the card that way. You should be able to see the partitions/resize/format. If you can’t make it through basic disk commands without errors, the card is probably toast.
Windows is fickle with Linux filesystems in my experience, one of the many tools in my drawer is a live distribution of gparted on a little 32gb thumb drive, can’t recommend having one on hand enough.
This is not related to the uConsole; next time you’ll get faster replies if you ask a general Linux user-group.
As has been previously said, a GParted live image is worth its weight in gold. The copy on my desk used to be a compact disc for i686 to use in place of my Windows XP installation, now it’s any architecture and contained in a Ventoy drive, and it’s still very useful. The trick is to use https://rufus.ie. MS Windows is not a great choice for filesystem maintenance as, while there is a plethora of exiting tools, the userland itself is buggy and brittle; Windows is simply too unstable to trust to do something so critical, and this really can’t be understated because it is the flash drive equivalent to sticking your videocassette into a VCR that has a nasty habit of shredding tapes.
What you might try is, using the GParted live image or another Linux system (*BSDs aren’t a great choice for their current lack of wide filesystem support), check smartctl(8) to see if your drive is toast or just corrupted, then use cfdisk(8) to rewrite the drive table, setting aside maybe 10GB of data (i.e. don’t let your partitions touch the last 10 gigabytes) for use by the block controller. testdisk(8) is also an option if there’s critical data you need back. After the table is written GParted may have an easier time accessing the drive, but if it doesn’t, the invocations mkfs.vfat -F 32 /path/to/boot;mkfs.ext4 -L ROOT /path/to/root; will probably still work and allow the drive to be used with Linux.
Your SD card is probably damaged but avoiding the damaged section of the drive will allow you to get further use out of it, especially using a read-only distro. It was probably corrupted by Windows reading or writing a particularly bad part of the block device and having poorly written logic for handling such an event - which is an uncharitable assumption, but describes the behavior I’ve seen quite a few times from the system.
This is what “the fuss” is about Linux - people evangelize it because the alternative is people constantly writing in with peripherals borked by a company that doesn’t and has never cared.
Rather time to destroy the original card and to put it into the appropriate waste bin. If an SDCard, that includes MicroSD, goes into read only mode it means that a catastrophic problem has been detected by the internal controller. This is done to protect the contents and is irreversible. The nasty part is that it can happen while being used, happily accepting data which is lost on a power cycle. Much time ago, can’t remember exactly when, this was a regular occurrence with cheap MicroSD cards on Raspberry Pi that would loose the boot configuration on power cycle, or digital cameras where you would be able to review photos that where lost when moving the card to a PC. For this reason every card giving me problems I junked immediately.
There are countless other reasons to choose Linux over Windows. The most important reason, in my opinion, is that the FOSS community focuses on functionality rather than the pressure to constantly release new versions in order to make money. I have nothing against making money, but it should be the result of making good products, not the reason for creating a new product.
I think some of it has to do with the quality of SD cards becoming worse over time. I’ve got some older cards that I’ve used in multiple devices over the years, including Pis, and they’re still fine. (I don’t use them for anything serious, but I’m surprised they’ve lasted this long!)
Seems like the cards being made today are either total trash if they are fake, of questionable quality if they are weird brands that aren’t fakes, or even if they are trusted brands they don’t seem to last as long as they used to.
If you’re running Linux on the card, it’s probably worth looking into guides online to turn off or at least tone down a lot of the logging, and also consider whether to use a swap file and what settings to use for it. Default logging and swap could be doing lots of writes to the SD and over time it might not be able to handle that much abuse.
I’d be curious to know if different filesystems matter for SD longevity. I’ve never strayed from the default ext4, but maybe some other option would be healthier for the SD?
Just this week I did a shutdown of my Pi4B ssh gateway and my Pi4B webserver to be able to replace the micro SD cards that have been in use for about 5 years continuously. Both had a SanDisk Ultra micro SD card which replaced with a Raspberry micro SD card ( = SanDisk).
There are two problems with micro SD cards:
Bad quality, in particular unknown brands
Rough handling like pulling power instead of shutdown.
Somehow the cards are better now, many years ago I returned some expensive SD cards to SanDisk because of write protect failure, but in the last years I have not had any problems with SanDisk. It is well possible that the problem I experienced with expensive cards is that these were a new generation of fast cards which I wanted because high transfer rate taking photos in burst mode and to offload the cards to my pc. Since then SanDisk has improved.
My data and my working time are too valuable to me to save money in the wrong place. That’s why I only buy branded products from reliable suppliers. Mostly SanDisk or Samsung. I choose cards that are significantly larger than I need (extends lifetime by wear leveling) and minimize write accesses, as already described by @adcockm. So far I never had any issues.
P.S.: I have to take that with a grain of salt, since I don’t have any experience with Kingston. Maybe “industrial” is just a marketing gimmick for them.