RPi2 OE to LE upgrade failing

  • I have been running OE for many years, on several different generations of hardware (AMD E45, RPi1, Matrix TBS2910 amd RPi2).
    Most recently, my main installation has been running OE v6.0.3 on the RPi2.
    I have just attempted to update that system to LE7.0.2 by placing the LibreELEC-RPi2.arm-7.0.2.tar file in the updates folder.

    Following the archive extraction, md5 checks and image file copying, the system rebooted itself, as expected. First it displayed the rainbow screen, then a LibreELEC welcome splash.

    Unfortunately, there was a powercut during this process.

    Now, when the system boots up it gets into a loop, displaying the Kodi v16.1 Jarvis splash briefly (less than a second) approximately every ten to 15 seconds.

    The system is not rebooting - an ssh session stays permanently connected.

    The Kodi crash log ends as follows:

    So, it would seem that my database has become corrupted.

    The Database folder has the following content:

    However, there is the complication that my 'real' database is held on a file server running MariaDB. The server is protected by UPS - unfortunately, the media systems are not!

    Can I simply delete the remnants of the Addons20 database and the db update will restart?

    Will a similar problem exist on my database server and, if so, how can I clean that up?

    Other systems, still running OE6.0.3, still seem to be working correctly, with a complete database.

    Edited once, last by PeterB (July 5, 2016 at 1:23 PM).

    • Official Post

    If SSH is permanently connected and to see if the installation went fine and you only have problems with your DBs, just rename the /storage/.kodi folder to something else. That's like a factory reset, but all old settings and configs are stored in the folder you renamed .kodi to. So I would try:

    Code
    mv /storage/.kodi /storage/kodi-backup

    The problem might be, that kodi seems to restart permanently, if you always get a new Kodi splash. So I don't know if

    Code
    systemctl stop kodi

    will work to avoid kodi from restarting. Probably it's "kill" instead of "stop". I'm not sure. But maybe Kodi needs to be stopped from restarting to properly mv the .kodi folder.

    If it boots fine after that, we know the installation went fine and you can dig deeper.

    For the note....always provide the full logs. Maybe that's more helpful for the devs.

  • Thanks for your swift response


    The problem might be, that kodi seems to restart permanently, if you always get a new Kodi splash. So I don't know if

    Code
    systemctl stop kodi

    will work to avoid kodi from restarting. Probably it's "kill" instead of "stop". I'm not sure. But maybe Kodi needs to be stopped from restarting to properly mv the .kodi folder.


    Yep, since kodi was quitting and restarting, the appropriate systemd command is systemctl stop ... no need for a kill signal

    Code
    systemctl stop kodi
    mv /storage/.kodi /storage/kodi-backup
    systemctl start kodi


    and kodi starts up in its 'initial' mode just fine.

    I guess that if I copy my advancedsettings.xml and sources.xml back into that virgin folder, I will find out whether my central database is also mangled.


    For the note....always provide the full logs. Maybe that's more helpful for the devs.


    Sure, but it seemed pretty clear that the problem was highlighted in those final lines. Full logs can always follow of required.
    [hr]
    Okay, almost all is back in order and working. I'm using my original /storage/.kodi folder and all of my settings / configurations are okay ... except that I've had to comment out the following from my advancedsettings.xml:

    Code
    <!--  <musicdatabase>
        <type>mysql</type>
        <host>172.22.0.100</host>
        <port>3306</port>
        <user>XXXX</user>
        <pass>XXXX</pass>
      </musicdatabase> -->


    If I leave that in, then I get the original

    Code
    [code]
    ERROR: SQL: [MyMusic56] The table does not exist


    [/code]
    error.

    So, while the /storage version of the database has MyMusic56, it appears not to exist in the MariaDB database.

    What do I need to do to create MyMusic56 data in MariaDB? Would removing MyMusic56.db from /storage (leaving just the MyMusic52 version) help?

    Edited once, last by PeterB (July 5, 2016 at 3:35 PM).