Trying to save Kodi configuration files from a card that will no longer boot, but will create image

  • We had a power outage and when the power came back on my raspberry pi 4 running Libre Elec will not boot. I was able to read the card with Win32img and create an image, so my suspicion is that the boot files are corrupted but that the file system is still intact.

    I created a new card with an install of Libre ELEC that’s working fine and I would like to move all my Kodi configuration files over to the new card. Is there a way I can access the old card or the image of the old card and copy those files over to the new install.

    I don’t have a computer with fixed Linux but I can always a boot up in distro if needed. If I can do it through windows or Mac all the better. I have several computers that I can use and several raspberry pis I can use.

    If it’s possible to do this and somebody could walk me through it that would be amazing. If this isn’t the right place for this topic could you please direct me to where it should go.

    Thank you

  • I don’t have a computer with fixed Linux but I can always a boot up in distro if needed. If I can do it through windows or Mac all the better. I have several computers that I can use and several raspberry pis I can use.

    Fire up your favorite Live Linux distro to access the EXT4 data partition of LibreELEC,

    and copy the two important folders to a secure location: addons + userdata.

    You can now boot from USB on the RPi4 if you updated its firmwares.

    Using a (small) SSD should keep your data a bit more safer than your typical SDcard.

  • Using a (small) SSD should keep your data a bit more safer than your typical SDcard.

    Is this a thing? I never had problems with SD cards on previous raspberry pi’s. The 4s seem to be particularly susceptible to data corruption though. I’ve had to repair files within the boot up routine via a checkdisk like utility several times.


    I used LinuxReader from Sysinterals to mount the image and copy the files. then I copied them to USB and tried to use File Manager within Kodi to move over to the SD card. That didn’t work so I used SSH and was able to copy over the .kodi directory from the .storage directory. I used a great little freeware called WinSCP to do this.

    That got me 90% of the way there but for some reason not all of the xml files showed up in the image. Particularly from the modified estuary skin that I created in the addons folder. The directory structure was different on the image than it was when the image used to boot up. I don’t know why but I got all my plug-ins and most of my settings over.

    If there’s an easier way in a way to repair an unbootable SD card that used to work, I would love to hear it.

    Also anything about SD cards being more susceptible to data loss.

  • For example, SDcards have no TRIM functionality, SSDs do have that. So SDcards can wear out much quicker, depending on the amount of usage.

    And there is the Backup/Restore tool in the LibreELEC Settings Add-on, to make the regular backups of the most important folders.

    If there’s an easier way in a way to repair an unbootable SD card that used to work, I would love to hear it.

    This is unfortunately not a forum for disk repairs. If you can save your files by accessing the SDcard in a Linux machine, then that's your option as far as I'm concerned. And the backup option already mentioned.