microSD Card Health
microSD cards (mSD) are mass-manufactured compact flash memory. These were originally designed as removable storage, similar to thumb drives.
- Sequential read/write (R/W) speeds: How quickly sectors are written in sequential order (usually relevant to large files)
- Random R/W Input/Output Operations per Second (IOPS): How well a card can handle scattered R/W operations (usually relevant to OS operation)
- Limited Write Endurance: SD cards have a limited number of read/write (R/W) operations, commonly referred to as endurance. Lower quality/non-brand name may not indicate lower endurance, but certain brands give a higher probability of a higher endurance card.
- Performance Variability: A higher performance class does not mean a card will perform better under all circumstances. These classes are usually measured for specific benchmarks, such as sequential R/W and random seek.
- Less protection from power loss: In the event of a power outage, a computer’s hard drive or solid state drive can flush memory to the drive using built in circuitry in the event of a catastrophic outage (loose cable, power blackout). SD cards lack this protection on their own, and can instantly become corrupt in the event of an outage, especially during a write operation.
- Wear leveling, Error Correction Code (ECC), S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology), TRIM, Thermal Throttling: These are all technologies that SSDs and HDDs use that help prolong the life of the drive and help recover from accidents. As a result of not having these, mSD cards are more prone to data corruption and complete memory failure.
Things you can do to help prevent forest fires mSD corruption
- Buy known brands (Samsung, SanDisk, Kodak, Lexar)
- Verify your card after buying (Disk Genius, fsck/chkdsk, h2testw/f3, SD formatter)
- Don’t unplug SD cards while devices are on; for computers wait until they are safely ejected/unmounted
- Don’t allow the battery/power to die while a computer/gaming device is in use
- Safely shutdown your device (not just sleep) when finished
- Avoid hard resets (like use of the reset button) when your device is in use; use Safe Restart/Shutdown when possible (L2 + R2 + Start/Select)
How to verify a SD card with DiskGenius (Windows)
Disk Genius is proprietary software with a utility that allows you to search for bad sectors on a mSD card.
To start, place the card in an SD card reader in your computer.
Start Disk Genius, you should see all hard drives and memory devices.
Select the SD card you just placed, right click on it, and select “Verify or Repair Bad Sectors”.
In the dialogue, select “Verify”.
Once the report is finished, you’ll be able to see the R/W speed for all sectors on the mSD card. The more slow sectors (Poor, Severe), the lower performance your SD card is, and can be an indication of a failing SD card. It can only take one bad sector to make flashing an OS image fail.
Recovering Boot Logs with Disk Genius
Using the file browser on the left, if your SD card is readable, you can recover boot logs.
These could potentially help with debugging a bad install or debug a broken (but previously working) install if weird behavior occurs.
Logs are located in /opt/muos/log
.