Announcement

Collapse
No announcement yet.

Unable to insitu upgrade from 6.1.0 to 7.0.0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unable to insitu upgrade from 6.1.0 to 7.0.0

    Hi everyone,

    Obviously running an older version of piCoreplayer (6.1.0) and thought I would start the process of upgrading incrementally from 6.1.0 to 7.0.0 to 8.0.0 to 8.1.0.

    When I try to do the upgrade it starts off fine:

    /cgi-bin/insitu_update_stage1.cgi?ACTION=initial

    "[ INFO ] Internet accessible.
    [ INFO ] Checking <main repo> pCP repository accessible.
    [ INFO ] You are currently using piCorePlayer v6.1.0
    [ INFO ] Step 1. - Downloading insitu.cfg...
    [ OK ] Successfully downloaded insitu.cfg
    "

    I choose the piCorePlayer 7.0.0 and the status says OK and then I hit the Next > button. It proceeds to:

    /cgi-bin/insitu_update_stage1.cgi?CORE=pcpCore&VERSION=piCo rePlayer7.0.0&ACTION=download

    "[ INFO ] You are downloading the update script.
    [ INFO ] Step 2A. - Removing the old update script...
    [ INFO ] Step 2B. - Downloading the new update script for piCorePlayer7.0.0...
    [ OK ] Successfully downloaded the new update script.
    "
    and once again the status is ok.

    Now when I click on the piCorePlayer insitu update Next > button it proceeds to
    /cgi-bin/insitu_update_stage2.cgi?ACTION=download&CORE=pcpC ore&VERSION=piCorePlayer7.0.0

    but nothing happens. The webpage is empty with the exception of the banner for the main menu (e.g. piCorePlayer SQUEEZE AUDIO DEVICE). Logging into the pi 3B+ it doesn't appear any processes are running for any updates. Looking in the /tmp folder shows this:

    [email protected]:/tmp$ ls -alg
    total 32
    drwxrwxrwt 7 root 280 Jan 2 10:29 ./
    drwxrwxr-x 17 root 360 Dec 31 1969 ../
    -rw-r--r-- 1 staff 131 Dec 31 1969 bootlog.txt
    -rw-r--r-- 1 root 1897 Dec 31 20:49 dropdown.cfg
    -rw-r--r-- 1 root 371 Dec 31 14:17 footer.html
    -rw-r--r-- 1 root 0 Dec 31 1969 k5_skip
    -rw------- 1 staff 0 Dec 31 18:48 newdep.lst
    drwxr-xr-x 2 root 60 Jan 2 10:29 pcp_insitu_update/
    -rw-r--r-- 1 staff 15418 Dec 31 18:48 pcp_sizelist
    drwxr-xr-x 2 staff 40 Dec 31 14:17 slimupdate/
    drwxrwxr-x 3 staff 60 Dec 31 1969 tce/
    drwxrwxr-x 81 staff 1620 Dec 31 1969 tcloop/
    -rw------- 1 root 363 Dec 31 18:53 tmp.VpZeAM
    drwxr-xr-x 2 staff 60 Dec 31 18:48 upgrade_ext/

    Not quite sure what is going wrong. Any ideas greatly appreciated.

    Thanks.

    #2
    I don't know the answer but ... assuming things are not now broken ... is there a patch or minor update to 6.1.0 to apply first?
    I have a recollection of a patch being needed for one of the updates,
    Paul Webster
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
    and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

    Comment


      #3
      It might be better in the long run, if you have another SD card, to start from scratch and go straight to pCP 8.1.0

      Comment


        #4
        Originally posted by Paul Webster View Post
        I don't know the answer but ... assuming things are not now broken ... is there a patch or minor update to 6.1.0 to apply first?
        I have a recollection of a patch being needed for one of the updates,
        Thanks for the reply.

        Everything there is up to date. The script is there in the right place for the 7.0.0 upgrade but I am hesitant to run it from the command line as I am not sure if I will see any errors that might occur.

        Comment


          #5
          Originally posted by Greg Erskine View Post
          It might be better in the long run, if you have another SD card, to start from scratch and go straight to pCP 8.1.0
          Thanks. Am trying to exhaust this option first before embarking on that. Need to borrow an SD card reader/writer from a friend to burn anything.

          Cheers.

          Comment


            #6
            walking through the install script and have identified at least one spot where things don't happen:

            # As all the insitu update is done in one file, it may be better to define this here
            UPD_PCP="/tmp/pcp_insitu_update"

            #================================================= =======================================
            # Prepare download directories - Do we really need boot and tce directory???
            #----------------------------------------------------------------------------------------
            pcp_create_download_directory() {
            if [ -d $UPD_PCP ]; then
            sudo rm -rf $UPD_PCP
            [ $? -ne 0 ] && FAIL_MSG="Can not remove directory $UPD_PCP"
            fi
            sudo mkdir -m 755 $UPD_PCP
            [ $? -ne 0 ] && FAIL_MSG="Can not make directory $UPD_PCP"
            sudo mkdir ${UPD_PCP}/boot
            [ $? -ne 0 ] && FAIL_MSG="Can not make directory ${UPD_PCP}/boot"
            sudo mkdir ${UPD_PCP}/tce
            [ $? -ne 0 ] && FAIL_MSG="Can not make directory ${UPD_PCP}/tce"
            sudo mkdir ${UPD_PCP}/mydata
            [ $? -ne 0 ] && FAIL_MSG="Can not make directory ${UPD_PCP}/mydata"
            }


            so the script that gets downloaded:

            [email protected]:/var/www/cgi-bin$ more insitu_update_stage2.cgi
            #!/bin/sh

            # Version: 7.0.0

            successfully makes the main directory:


            [email protected]:/tmp/pcp_insitu_update$ ls -alg
            total 4
            drwxr-xr-x 2 root 60 Jan 4 10:00 ./
            drwxrwxrwt 7 root 260 Jan 4 10:00 ../
            -rw-r--r-- 1 root 90 Jan 4 10:00 insitu.cfg

            but it fails to create any of the subdirectories for the install (boot, tce, mydata) nor does it give any notice/message that it fails :-(

            Comment


              #7
              If it wont run, it likely means something is missing from your system. Too much has changed in pCP since 6.1, I just don't remember. I would just set it up from scratch using the latest installation.
              piCorePlayer a small player for the Raspberry Pi in RAM.
              Homepage: https://www.picoreplayer.org

              Please donate if you like the piCorePlayer

              Comment


                #8
                Originally posted by paul- View Post
                If it wont run, it likely means something is missing from your system. Too much has changed in pCP since 6.1, I just don't remember. I would just set it up from scratch using the latest installation.
                Ok, thanks.

                Comment


                  #9
                  Solution

                  I ran into this today as well and found the issue.

                  I ran the script manually from the cli (/var/www/cgi-bin/ins...2.cgi) and saw a BASH error relating to an unexpected "(" on line 316. I looked at that line and it's properly formed but there is a double quote right before the parenthesis so I figured there was a missing double quote earlier in the script. Indeed if you search backwards from 316 for a double-quote you'll see a line that defaults the repo env var that is missing the trailing double quote.

                  I added the missing double quote and then re-attempted the upgrade via the Web UI and it worked without issue.

                  I did have a problem that after rebooting the WiFi settings weren't being used but a quick replacement of wpa_supplicant.conf and a second reboot fixed that.

                  Comment


                    #10
                    Are you referring to pCP 6.1.0 to 7.0.0?

                    Comment


                      #11
                      Originally posted by Greg Erskine View Post
                      Are you referring to pCP 6.1.0 to 7.0.0?
                      I was running 6.1.0 trying to upgrade to 7.0.0, just as the OP. When I ran the 7.0.0 insitu_update_stage2.cgi it would render a page with just a header. After correcting the typo in insitu_update_stage2.cgi it ran successfully.

                      Comment


                        #12
                        The error is in line 242 of https://repo.picoreplayer.org/insitu...ate_stage2.gz:

                        Broken: [ "$PCP_REPO" = "" ] && PCP_REPO="https://repo.picoreplayer.org/repo
                        Corrected: [ "$PCP_REPO" = "" ] && PCP_REPO="https://repo.picoreplayer.org/repo"

                        Comment


                          #13
                          Hi makegofast,

                          The error doesn't exist in newer versions of insitu_update_stage2.cgi

                          What version do you have? (Found at top of code)

                          insitu_update_stage2.cgi is downloaded during the insitu-update process. It is not initially installed. So it is possible for people to have different versions of this file downloaded.

                          If you start the insitu-update process from the pCP GUI, the second step will download the latest version.

                          If you want to keep the old version for testing, rename it first.

                          regards
                          Greg

                          Comment


                            #14
                            Hey Greg,

                            I'm facing the same issue. I started at v5, sequentially upgrading to v6.1.0. When trying to go from 6.1.0 to 7, the update process stopped as described by the other two users. I've tried quite a few things via the gui and got nowhere. Seems whatever script is misbehaving persists.

                            Of course, I could wipe the card and reinstall, but what fun is that? Instead, I'm trying to follow along with the group to troubleshoot what is going wrong. I'm pretty solid with Linux, but I'm not a web developer, so I'd need a bit of pointed guidance on how the update process moves through the cgi scripts if anyone wants my input / logs on troubleshooting.

                            Comment


                              #15
                              hi ndemarco,

                              Check that the directory /home/tc/www doesn't exist. If it does, delete it and reboot.

                              regards
                              Greg Erskine

                              Comment

                              Working...
                              X