Help recovering corrupted (but I can see data?) SD

  • I'm reasonably sure I had a brownout situation/too high power draw that caused some corruption on my SD.

    Now when I boot up, it gives me the 'filesystem corruption has been detected' blah blah 120 seconds warning.

    I do let it try to recover, but it fails:

    At the end of the recovery I get: "fsck.ext4 unable to set superblock flags on /dev/mmcblk0p2"

    /dev/mmcblk0p2 WARNING Filesystem still has errors

    Forced fsck failed. Your system is broken beyond repair.

    Please re-install libreelec.

    If I take the SD and connect it to my pi running arch linux, I'm able to mount it and view the directory structure.

    I tried recovering the superblock with e2fsck -b (block) /dev/sdb2 , and it complains variously, and then booting does has the same result.

    Can anyone suggest how else to fix this please?

    thanks

    • Official Post

    The best (and quickest) way to fix this is to reformat your SD card, reinstall LibreELEC and *cough* restore your backup.

    Apparently you already tried what could be tried, and still the errors keep on coming.

    I'd say: admit defeat, because sd cards will corrupt from time to time. Keep a good backup when things are running okay for occasions like these.

  • Since I can access the SD it seems like I should be able to fix this, at least to be able to run a backup :)

    Maybe you can suggest how to manually move the config over since I can copy files from the SD.

    thanks

  • The best (and quickest) way to fix this is to reformat your SD card, reinstall LibreELEC and *cough* restore your backup.

    Apparently you already tried what could be tried, and still the errors keep on coming.

    I'd say: admit defeat, because sd cards will corrupt from time to time. Keep a good backup when things are running okay for occasions like these.

    Yes, the easiest way to fix an SD card is to format it. Before that, if you still have access to your SD card data, you need to make a backup, otherwise you have to use a data recovery tool to recover the files in the corrupt SD card.