Author Topic: Corrupted micro-SD card that can't be read  (Read 1169 times)

0 Members and 1 Guest are viewing this topic.

Offline Jason

  • Administrator
  • Master
  • *****
  • Posts: 3772
  • Humanist. Skeptic. Husband.
Corrupted micro-SD card that can't be read
« on: November 23, 2019, 02:53:18 pm »
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.
« Last Edit: November 23, 2019, 03:01:04 pm by Jason Wallwork »
"With all its sham, drudgery, and broken dreams, it is still a beautiful world." - Max Ehrmann, Desiderata

Offline fox

  • Member
  • Master
  • *
  • Posts: 1979
Re: Corrupted micro-SD card that can't be read
« Reply #1 on: November 23, 2019, 05:48:53 pm »
Could you do it from a terminal? Alternatively, try to write something to it with Etcher?
Ubuntu 21.04 on 2019 5k iMac
Ubuntu 20.04 on Dell XPS 13 2 in 1

Offline ssfc72

  • Member
  • Master
  • *
  • Posts: 1839
Re: Corrupted micro-SD card that can't be read
« Reply #2 on: November 23, 2019, 08:41:57 pm »
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???
« Last Edit: November 24, 2019, 08:12:04 am by ssfc72 »
Mint 19.1 on a Dell 14" Inspiron notebook, HP Pavilion X360, 11" k120ca notebook (Linux Lubuntu), Dell 13" XPS notebook computer (MX Linux)
Cellphone Samsung A50, PCMobile pay as you go

Offline Jason

  • Administrator
  • Master
  • *****
  • Posts: 3772
  • Humanist. Skeptic. Husband.
Re: Corrupted micro-SD card that can't be read
« Reply #3 on: November 24, 2019, 06:00:28 am »
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.
« Last Edit: November 24, 2019, 06:07:53 am by Jason Wallwork »
"With all its sham, drudgery, and broken dreams, it is still a beautiful world." - Max Ehrmann, Desiderata

Offline Jason

  • Administrator
  • Master
  • *****
  • Posts: 3772
  • Humanist. Skeptic. Husband.
Re: Corrupted micro-SD card that can't be read
« Reply #4 on: November 24, 2019, 06:01:47 am »
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).
"With all its sham, drudgery, and broken dreams, it is still a beautiful world." - Max Ehrmann, Desiderata