SD Card corrupted

  • Libreelec on Pi model 3b

    On boot I get the message

    Filesystem corruption has been detected!
    To prevent an automatic repair attempt continuing,
    press any key or power off your system within the next 120 seconds

    Then

    "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.

    Obviously I haven't backed up the card :rolleyes: .Any way of recovery other than full re-install and re-setup?

    I can still see contents of card on my Mac

    Thanks.

    • Official Post

    Libreelec on Pi model 3b

    Yes, SDcards are still not my favourite storage solution. They don't have TRIM support like SSDs do.

    An alternative would be to use the RPi3 capability of USB booting. Then you can use an USB stick or even an external SSD drive (via USB), and have LibreELEC run that way. Doing backups is still very much recommended no matter which option you choose.

    Any way of recovery other than full re-install and re-setup?

    It depends on the extend of the disk damage. You could try to have a Linux machine ready (or even an Android box if you're handy), and have the machine mount the SD card with its EXT4 storage partition. Then you can see which files you can copy to a safe location.

  • OK - so I managed to mount the partition and get what seems to be all the files off. Nothing would write to it or format it though, so the card has gone in the bin.

    After I've re-installed, what files or directories should I copy onto the new card from the old, in order to recover the setup (database, settings, sources etc).

    And do I have to worry that I'll be copying from an older installation to a new one?

    Thanks.

    • Official Post

    what files or directories should I copy onto the new card from the old, in order to recover the setup (database, settings, sources etc).

    All root files in the userdata folder, the Database folder, possibly the keymap folder, and the Thumbnails folder.

    For add-ons, copy the ./kodi/addons folder as well as the userdata/addon_data folder.

    You'll need to re-enable all add-ons one by one after that.

  • SD memeory card formatter didn't touch it either. Tried two mac machines, a linux vitual machine (though impossible to tell if the USB passthrough caused additionl problems) and a windows machine. Doesn't matter: Only a fiver for a new card.

  • Thanks all - decided to ditch the card and start new. I don't need the potential unreliabiliyt of a dodgy card.

    Will also adapt the Pi3 to boot from USB and then change to a spare USB pendrive.