Unable to Read Micro SD Card

  • SpinRite v6.1 Release #3
    Guest:
    The 3rd release of SpinRite v6.1 is published and may be obtained by all SpinRite v6.0 owners at the SpinRite v6.1 Pre-Release page. (SpinRite will shortly be officially updated to v6.1 so this page will be renamed.) The primary new feature, and the reason for this release, was the discovery of memory problems in some systems that were affecting SpinRite's operation. So SpinRite now incorporates a built-in test of the system's memory. For the full story, please see this page in the "Pre-Release Announcements & Feedback" forum.
    /Steve.
  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in please checkout the “Tips & Tricks” page for some very handy tips!

    /Steve.
  • BootAble – FreeDOS boot testing freeware

    To obtain direct, low-level access to a system's mass storage drives, SpinRite runs under a GRC-customized version of FreeDOS which has been modified to add compatibility with all file systems. In order to run SpinRite it must first be possible to boot FreeDOS.

    GRC's “BootAble” freeware allows anyone to easily create BIOS-bootable media in order to workout and confirm the details of getting a machine to boot FreeDOS through a BIOS. Once the means of doing that has been determined, the media created by SpinRite can be booted and run in the same way.

    The participants here, who have taken the time to share their knowledge and experience, their successes and some frustrations with booting their computers into FreeDOS, have created a valuable knowledgebase which will benefit everyone who follows.

    You may click on the image to the right to obtain your own copy of BootAble. Then use the knowledge and experience documented here to boot your computer(s) into FreeDOS. And please do not hesitate to ask questions – nowhere else can better answers be found.

    (You may permanently close this reminder with the 'X' in the upper right.)

Davourak

New member
Oct 22, 2020
4
0
I have a 128 GB micro SD card that I was using in a smartphone. I took it out and used it in a card reader, as I wanted to backup all its data and transfer some of it to a new card.
However, part way through the copying, it stopped reading the card, after copying about 5 MB of data (out of many GB).
Now I cannot read the card at all. It is seen by the computer but it will not mount, as the OS says that the partition is unknown in Disks on Ubuntu. The same in gparted. I.e. they can see that there is a 128 GB partition, but have no idea what type it is.
So what can be done to read the data from the card? To at least get the partition type recognised properly again, so I can copy data from it. I don't need to use the card again after I get the data, it is a few years old.
Apologies if this is posted in the wrong place.
 
Definitely sounds like the filesystem got corrupted. Did you turn off the smartphone before ejecting the card? I mean, a complete shutdown. Just pulling it out with the OS still running might cause corruptions like this.

I would try running a low level tool, like fsck. Maybe Spinrite? If nothing helps, you might be out of luck, and the card could be physically damaged. Those puppies are small and sensitive even to small static electric discharges from our own body.
 
  • Like
Reactions: darkcactus
Definitely sounds like the filesystem got corrupted. Did you turn off the smartphone before ejecting the card? I mean, a complete shutdown. Just pulling it out with the OS still running might cause corruptions like this.

I would try running a low level tool, like fsck. Maybe Spinrite? If nothing helps, you might be out of luck, and the card could be physically damaged. Those puppies are small and sensitive even to small static electric discharges from our own body.
This is what I tried and the result:

$ sudo fsck /dev/sdh1
fsck from util-linux 2.34
e2fsck 1.45.5 (07-Jan-2020)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdh1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
 
hello,

Restart or reboot of the device often resolves SD card won't read error on phone, PC or Mac. First unplug the SD card reader from your phone or computer. Restart and then reconnect the SD card via card reader. Check if you phone or computer is able to read the SD card.
 
I've had cheap SD cards fail, because they were actually smaller than stated on the label. If you look at the empty card with a PC, it looks like all the space is there, but once you cross the actual capacity barrier, the address lines 'wrap' and overwrite the boot block, thus destroying the controller firmware and the whole thing becomes unreadable. Hopefully this isn't the case with your card, but I thought I'd alert folks to this possibility.

Also, some card manufacturers have actually had cheap knockoffs make it into big-box stores in retail packaging. For a failed famous-manufacturer compact flash card, their tech support had me read the little numbers on the edge of the card. Wherein he announced, "That's a counterfeit." To their credit, they replaced it with a real card, when I sent the bad one in.

I used to also have SanDisk micro-SD cards fail in Samsung phones, until at the suggestion of the Samsung rep at Best Buy, I tried using Samsung-branded cards. They were the same price and speed, and I've not a single card fail in any of my family's phones since. With the latest generation phones, they come with so much base memory, I've not felt the need to add more card-based memory.
 
I think somebody recommended for me to use Photorec once on a wonky memory card. I think it worked. I think that one is a Windows program. I also seem to remember ddrescue for Linux, and a few variants on that. Maybe gddrescue. Not sure about that one. It's been a long time. Obviously, on this forum, you can try a SpinRite Level 2 on the card if you can get it into a card reader that SR can talk to. Also, try a different card reader and a different cable if one generates failures. As @Steve has pointed out, running a Level 2 SpinRite on memory devices a couple of times a year has therapeutic value. That's harder to do on a bunch of memory cards than it is for hard drives. And it's hard to track that for hard drives. See my burn in procedure below. Windows CHKDISK may not be the best thing to start off with for data recovery since it will orphan any erroneous files it finds.

No idea what to do if your card is counterfeit. There may be nothing you can do.

Here are some thoughts for problem prevention with new cards. Buy name brand cards. I like Samsung. I think Sandisk is good, and Kingston, and Patriot. It's been a while since I studied the market, and I don't know who's bought whom. If you're going to be hitting the card with lots of writes (like in a Raspberry Pi), go for the extreme endurance or pro version. If it's a major maker which is reputable, look for a 2 year, 3 year, or 5 year warranty. Buy your cards from a reputable brick and mortar vendor, even if by mail. I've started shying away from buying memory cards and batteries on Amazon or Ebay. Sometimes things from those sources are counterfeit. It's a big problem. Sometimes they are returned and resold. I don't ever want a USED memory storage device. Sources I would gravitate toward include Best Buy, Target, Walmart, Office Max / Office Depot, Staples, Adorama, B & H Photo, etc.

This is easy to say, hard to do. Don't trust memory cards. I used to teach electronics at DeVry University. I told my students don't trust memory cards and memory sticks. Have a backup of your content. Caveat, even now, though, I have some photos on camera's that I haven't moved off. When I do move them off to my PC, they get backed up online that evening with JungleDisk via AWS that @Steve mentioned years ago. I don't necessarily recommend that for new users, but I'm still using it.

I like to burn in memory devices including memory cards, USB sticks, and SSD's before trusting them. The trouble I go to increases with the amount of data storage. At a minimum, I'm going to format the card and run a Windows CHKDISK on it. You can do this by right clicking on the card in Windows File Explorer (at least in Windows 7), properties, tools, check for errors. UNCHECK the automatically fix errors box and CHECK the search for bad sectors box. This makes sure each sector is read. This process is NON DESTRUCTIVE, and can be used with a card with data. As the instructions in SpinRite say for Level 2, this "brings the drive's attention to each sector" and alerts the controller to any anomalies it doesn't like. A SpinRite Level 2 would do something similar, but would try to correct errors. Hopefully there are none for a new card. The reason I uncheck the automatically fix errors box is that this tends to orphan files which are found to be in error.

By the way, you don't HAVE to format big cards with EXFAT. If you want to use a card with Linux for example, you can format with NTFS or FAT32. You may wish to use FAT32 for Android devices. You may have to use an external utility to do so. Make sure it's reputable. This article talks about that.


If the card is bigger, say over 32 GB or 64 GB, I go to a bit more trouble. I will do a SpinRite Level 4 on it. Yes, I said Level 4. It will read, invert, write, read, invert, write the card. Yes it uses up 2 full write cycles. But, then I know every memory cell has been thoroughly tested and the controller should have reset all it's magic error correction. Before the SpinRite, I fill the device with random data. In that case, it uses 3 write cycles. See below. If doing SpinRite is not practical, IE rebooting with a card reader on a port that works, I have an alternative method.

Years ago, I wanted to do some of this type of testing on a HDD. But, it works for SSD's and memory devices too. I Googled something like generate file with random data. I get pages such as this for Linux:


And commands such as this:

dd if=/dev/urandom of=target-file bs=1M count=1000

I don't remember exactly what I did years ago. But, it was similar to that. That command will generate an output file with 1 GB of random data. By changing the count, I generated files of 1 MB, 2 MB, 4 MB, 8 MB, 16 MB, 32 MB, 64 MB, 128 MB, 256 MB, 512 MB, 1 GB, 2 GB, 4 GB, and 8 GB. I keep them hanging around on my PC for when I want to do testing of storage devices. So, I would copy as many of these as I can to the memory card, USB stick, SSD, or even HDD to fill it up completely. For what it's worth, I just did this to a 2 TB SSD. Took a while. If you highlight all the random data files in Windows Explorer, select copy, then paste them into the memory card, Windows will offer to rename them as many times as necessary to make the copies. Just keep doing this over and over. Note that a 32 GB card, for example, won't have 32 GB of available space after formatting. So, I couldn't just copy 4 of the 8 GB files. Once the card is full of random data, I run the CHKDISK on it with the search for bad sectors box turned on. As an alternative, you can run SpinRite Level 2 or Level 4 after storing the data. A fill with data procedure plus a SpinRite Level 2 will only use up one write cycle. A fill with data procedure plus a SpinRite Level 4 will use up 3 write cycles.

Crossing my fingers so as to not jinx myself. Using these procedures, I rarely have failed memory cards. But wait, there's more. As mentioned above, you should run a SpinRite Level 2 or this CHKDISK search for bad sectors a couple of times per year. A solid state memory device can leak away it's data within a year if it's never powered on and allowed to do it's housekeeping. After testing, erase most or all the random data AND empty the trash if it's relevant for such devices on your PC. Initial writes to the card may be slow until its controller has had a chance to do the block erases necessary to write new data. Always try to leave at least 10 % of a memory device empty so it can do housekeeping. Once you're through testing, you may wish to format the card in the camera or whatever you want to use it in just to make sure that device is happy.

Hope you find this info useful.

May your bits be stable and your interfaces be fast. :cool: Ron
 
  • Like
Reactions: darkcactus
Testdisk and Photorec are very useful in Linux,and I have used them before for this. Not a point and click experience, but usable enough if you read the instructions and follow them.
 
I recently purchased a couple High Endurance micro SD cards, Samsung and Sandisk. They were all 32GB and I decided to run a level 4 Spinrite pass before putting them to work. I've made a habit of running Spinrite on flash drives, especially the higher capacity ones. I never ran Spinrite to micros before. The micro slot in my laptop doesn't work so I tried 2 adapters I had, an older Sandisk SD to USB A, and a newer Anker SD/ micro to USB B. Since my laptop is USB C only I had to use another adapter to plug them in. A lot of adapters there! Anyway, I was finally able to get a 32GB micro to work with the Sandisk adapter using a micro to SD adapter. The Anker would just hang Spinrite when scanning for devices using both slots, SD and micro. The level 4 ran about 4.5 hours and there were no noticeable retry pauses which I always get with flash drives. I tried a 64GB micro next and it didn't work. I haven't run enough tests to be sure, but it seems like the adapter has a lot to do with if Spinrite will work or not. Almost all my micro SD cards are Sandisk and more recently a couple Samsungs. I will probably have to get a true adapter for USB C to eliminate all those adapters which are possibly or probably a problem.

So far I've only got to run Spinrite on one micro, but unless I happened to get an exceptionally good one to work, it seems the error rate on micros is far less than all the flash drives I've tested to date. Any suggestions on a micro SD to USB C adapter would be welcome. I'll do some research in the mean time since I am now curious if micro SDs in general have better error rates than flash drives. I use a lot of flash drives and even though everything on them is backed up I would rather use one I am reasonably sure I can trust. Many have at least some encrypted data so 1 bad bit will be a problem.
 
I bought a cheap USB3 hub, which also has a card reader built into it, so you might want to go look for this, I bought a unit branded Orico, which works well, and which is fast as well. At least USBC to USB3 adapters are common.
 
Many years ago I had an SD card from a phone that couldn't be read in the laptop, until the card reader's driver was updated. The manufacturer however, never put out an updated Windows driver for the hardware though. Fedora OS seemed to have a driver that was capable of accessing it so that's what I ended up using.
 
I tried another card adapter and no luck. I used initdisk to reformat and still no go with Spinrite. I did do some reading on 'high endurance' devices and tests on standard flash drives. Of the few 'standard' ones tested on one site a Sandisk cruzer failed at about 600 write cycles., a few others fared better. Some of my flash drives are old enough that they may be in that range. While reading I ran across a couple Transcend High Endurance USBA flash drives, apparently released early this year. Interesting the prices for their 128, 256, and 512GB are pretty close, so I ordered a 512GB out of curiosity. You never have enough flash drives, or adapters!

The Jetflash writes 1 bit per cell as opposed to multiple bits per cell and are supposed to be faster and more reliable, 10x the lifespan from what Transcend says. I downloaded the software for it, some utilities and a recovery app. There is a 5 year warranty on the device. If anyone is interested in getting one be careful which Jetflash you order as not all of them are high endurance. By coincidence I just installed Ubuntu on a flash drive, so the Jetflash high endurance would be a good place to move it to.

When my Jetflash arrives next week I'll format it and try running Spinrite on it. I'll post the results.
 
Guess I left that out, Transcend JetFlash 920 USB Flash Drive (512GB). Transcend's website lets you select different versions for side by side comparison It's supposed to show up Wednesday and it'll probably take a few days of playing with it to see if it lives up to their claims, at least speed wise. Currently I carry a 256GB Samsung with USB A and C. It is actually a USB C with an adapter to USB A that fits into one side. My only gripe about it, and not really a major one is the USB C cap does not stay on. I always think the small USB C connector as being somewhat fragile and the cap seems like a good idea.

It may change, but my plans for the Jetflash is to replace the Samsung as my carry on me backup of important files. The Samsung is partitioned with Tails for a bootable OS, a general storage partition, and an encrypted partition. I may change the bootable partition to Umbuntu with persistence on the Jetflash. I don't have much experience with Umbuntu yet, but it seems to be well liked and pretty secure from what I've read. For now I have the 'test' LTS version on a flash drive to play with.

Pure speculation, but I wonder if the Jetflash prices of the 128/ 256/ 512GB versions are fairly close because they are the same device with different firmware. I went with the 512GB mainly for that reason, I wasn't really thinking of getting the 512GB but looking at the prices I figured why not. That will make it the largest flash drive I have so far. Seeing all the retries on the ones I have using Spinrite, I am real curious how the Jetflash compares. I'll post an update once I get to play with the Jetflash a while.
 
I just remembered a piece of software sitting unused on my laptop for some time. A few years ago I bought a Seagate USB hard drive. I downloaded their software called "Seatools". I did a quick search on Seatools, went to the Seagate site and it is still there for download. I checked and it is still the same version I have installed. I started it and it worked for 2 non-destructive tests (short and long generic) on my laptop's 512GB NVME drive. Both passed although NVME was not listed in the doc. Out of curiosity I tried a micro SD card and it just seemed to hang. The card was formatted with initdisk. I tried my old Sandisk SD reader with adapters and it ran both the short and long tests- actually the long test is still running. I did do a Windows format (FAT32) before switching adapters but don't thing that made any difference since it was already FAT32. There is an option to repair errors I didn't enable yet. One thing I noticed was the first adapter showed the SD card/ adapter as 'mass storage' and it didn't run. The Sandisk adapter showed as 'generic' and it seems to be working OK.

Seagate's Seatools may be worth looking into until SR 6.1 gets released. With the right adapter it seems to work with micro SDs. I have a few large disks waiting to test and I think I'll let Seatools loose on one with 'fix' enabled and see what happens. I don't know if there is a size limitation yet, and I am certainly not switching away from SR, but in the mean time it looks interesting and may be worth trying.