• Welcome to Peterborough Linux User Group (Canada) Forum.
 

Corrupted micro-SD card that can't be read

Started by Jason, November 23, 2019, 02:53:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jason

I've gotten myself into an odd situation.

I'm still working on the NextCloud presentation. After many setbacks, I managed to get NC working locally on my laptop and I discovered a "bug" in the documentation.

I wanted to try it on my Raspberry Pi 3B. I was using Berryboot to install Ubuntu on it and decided to change course. So I just cancelled the install using the cancel button and turned off the Pi by unplugging it. In hindsight, I should have looked for a way to shutdown Berryboot.

The microSD card is now corrupted. I can't even get gparted (inside Ubuntu 18.04.3) to read it so I can't reformat it or even create a new partition table. It errors out trying to recognize the drive (retry, cancel, ignore).

I just wondered if anybody has run across this and how to fix it in Linux. I did a brief search and only saw Windows tools. I don't have Windows installed on my only computer that has an SD card reader.

I tried the Gnome Disks application as well. You can see the error messages for both below.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

Could you do it from a terminal? Alternatively, try to write something to it with Etcher?
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

ssfc72

#2
I had the same problem with a micro SD card a few weeks ago.  I never was able to find a way to reformat the SD card.

The only thing that would even see the SD card was the Disks program in the MInt Cinnamon distro.  I tried to format the card from the tools in the Disks program, but it refused to format the card. :-(

The sd card was in my cell phone and as far as I know it was working and I never removed the SD card without the phone being powered off.

edit - The 16 GB SD card shows up as being 2 TB, when the card is recognised???
Mint 20.3 on a Dell 14" Inspiron notebook, HP Pavilion X360, 11" k120ca notebook (Linux Lubuntu), Dell 13" XPS notebook computer (MXLinux)
Cellphone Samsung A50, Koodo pre paid service

Jason

#3
Quote from: fox on November 23, 2019, 05:48:53 PM
Could you do it from a terminal? Alternatively, try to write something to it with Etcher?

I don't know what command to use from a terminal. I've used cfdisk before but never with an SD card. Not sure if it works the same way. As for Etcher, it doesn't see the card at all.

I'll look online to see if you can use fdisk or cfdisk in Linux with SD cards. But I think the problem is that it can't read the card at all - it seems to be entirely confused. When I got gparted to load after hitting retry probably 25 times or more, it said the partition table didn't exist. When I tried to create it, ended up getting the same error with the same three options. So I think the partition table is corrupted but in such a bad way that even the drive meta-information can't be read (size of the drive, filesystem, etc). I recall having issues with USB drives like this in Windows but always when I went into Linux, I could reformat them and that fixed it.

It could just be that it was a failing SD card and it happened to quite at that particular time. I'll probably have to give up a Linux solution down and try Windows utilities. I don't do much on the laptop so it's not too huge a deal to install Windows on it and reinstall Ubuntu.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

Jason

Quote from: ssfc72 on November 23, 2019, 08:41:57 PM
The only thing that would even see the SD card was the Disks program in the MInt Cinnamon distro.  I tried to format the card from the tools in the Disks program, but it refused to format the card. :-(

I had the same thing when I tried to format it in Disks. It sees it but won't format. It generates the error message you see in the second screenshot (click it to see the full-sized version).
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13