13) Upgrade from console - Illegal number



  • APU 64-bit 4G nanoBSD
    Starting from 2.3-ALPHA version from 1 or 2 days ago.
    Using console option 13 to try to upgrade:

    Enter an option: 13
    
    >>> Updating repositories... done.
    >>> Mounting second partition to run upgrade... done.
    >>> Updating repositories... done.
    pkg: No packages installed
    return: Illegal number: -1
    pkg: No packages installed
    **** WARNING ****
    Reboot will be required!!
    Secondary partition is up to date
    Proceed with upgrade? (y/N) y
    >>> Setting secondary partition as active... done.
    pkg: No packages installed
    *** Welcome to pfSense 2.3-ALPHA-nanobsd (amd64) on Kalikot-rt-01 ***
    
     WAN (wan)       -> re1        -> v4/DHCP4: 10.49.209.3/22
     LAN (lan)       -> re2        -> v4: 10.49.64.250/22
     OPT1 (opt1)     -> re0        -> v4: 10.49.68.250/22
    
     0) Logout (SSH only)                  9) pfTop
     1) Assign Interfaces                 10) Filter Logs
     2) Set interface(s) IP address       11) Restart webConfigurator
     3) Reset webConfigurator password    12) pfSense Developer Shell
     4) Reset to factory defaults         13) Upgrade from console
     5) Reboot system                     14) Disable Secure Shell (sshd)
     6) Halt system                       15) Restore recent configuration
     7) Ping host                         16) Restart PHP-FPM
     8) Shell
    
    Enter an option: Shutdown NOW!
    shutdown: [pid 21168]
    
    *** FINAL System shutdown message from root@Kalikot-rt-01.np.net.inf.org ***
    
    System going down IMMEDIATELY
    
    System shutdown time has arrived
    
    pfSense is now shutting down ...
    
    Oct  9 11:08:11 lighttpd[33519]: (server.c.1567) server stopped by UID = 0 PID = 1
    ovpns3: link state changed to DOWN
    ovpnc2: link state changed to DOWN
    ovpnc1: link state changed to DOWN
    ovpnc4: link state changed to DOWN
    Waiting (max 60 seconds) for system process `vnlru' to stop...done
    Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
    Waiting (max 60 seconds) for system process `syncer' to stop...
    Syncing disks, vnodes remaining...0 0 done
    All buffers synced.
    Uptime: 1d3h8m16s
    PC Engines APU BIOS build date: Apr  5 2014
    
    

    It gets that "Illegal number: -1" - I didn't know that -1 had been outlawed? In what country?

    I quickly did a config backup (in case something bad was about to happen) and then said "y" to upgrade anyway. It quickly redisplayed the console menu and then proceeded to reboot.

    It came back up on the other slice, so some code ran that switched the slice (new code that I saw Renato had done the other day):

         ___
     ___/ f \
    / p \___/ Sense
    \___/   \
        \___/
    
    Welcome to pfSense 2.2.5-DEVELOPMENT  ...
    
    Creating symlinks......ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
    32-bit compatibility ldconfig path: /usr/lib32
    done.
    External config loader 1.0 is now starting...
    Launching the init system... done.
    Initializing...................... done.
    Starting device manager (devd)...done.
    Loading configuration......
    
    *******************************************************************************
    * WARNING!                                                                    *
    * The current configuration has been created with a newer version of pfSense  *
    * than this one! This can lead to serious misbehavior and even security       *
    * holes! You are urged to either upgrade to a newer version of pfSense or     *
    * revert to the default configuration immediately!                            *
    *******************************************************************************
    
    done.
    Updating configuration...done.
    Cleaning backup cache........done.
    Setting up extended sysctls...done.
    Setting timezone...done.
    Configuring loopback interface...done.
    Starting syslog...done.
    Starting Secure Shell Services...done.
    Setting up polling defaults...done.
    Setting up interfaces microcode...done.
    Configuring loopback interface...done.
    Creating wireless clone interfaces...done.
    Configuring LAGG interfaces...done.
    Configuring VLAN interfaces...done.
    Configuring QinQ interfaces...done.
    Configuring WAN interface...done.
    Configuring LAN interface...done.
    Configuring OPT1 interface...done.
    Configuring CARP settings...done.
    Syncing OpenVPN settings...done.
    Configuring firewall......done.
    Starting PFLOG...done.
    Setting up gateway monitors...done.
    Synchronizing user settings...done.
    Starting webConfigurator...done.
    Configuring CRON...done.
    Starting DNS Resolver...done.
    Starting NTP time client...done.
    Starting DHCP service...done.
    Configuring firewall......done.
    Generating RRD graphs...done.
    Starting syslog...done.
    Starting CRON... done.
    
    

    The other slice still had 2.2.5-DEVELOPMENT on it.
    For now I will download the latest snapshot upgrade image for 64-bit 4G nanoBSD and use that from 2.2.5-DEVELOPMENT to upgrade to 2.3-ALPHA back on the other slice. That gets out of the problem easily, as it happens.

    Maybe the upgrade code changes in the 2.3-ALPHA build that I had were in progress, or maybe there is some bug that still needs fixing?



  • The 2.3->2.3 nanobsd upgrades are still a work in progress. Renato's at BSDCon Brazil right now so probably won't get feedback on that one until next week.

    The -1 being an invalid number looks like a weird error from pkg. The issue I think is somewhere in the (mis)handling of /var/db/pkg on nanobsd (it's probably empty), it's something Renato was working on earlier in the week and will be back on it next week. Same applies to those using RAM disk for /var on a full install and upgrading.



  • I will try again in a few hours to go from the snapshot version that I used to recover/upgrade (2.3-ALPHA (amd64) built on Thu Oct 08 19:06:50 CDT 2015) to whatever changes are automagically found by the console option 13 script. That was working previously. Coming from very latest code might be a good consistent set of code that Renato had finished with before taking a "jolly" (do you call them that in the USA?).

    I will report back if it is good or not - then at least people will know if the console option 13 upgrade method is working or not at present (well, at least if it is in a working state or not for the nanoBSD case).



  • I just did:

    • Boot from 2.2.5-DEVELOPMENT on slice 1.

    • Upgrade to 2.3-ALPHA (amd64) built on Tue Oct 13 01:35:25 CDT 2015 FreeBSD 10.2-STABLE
      (this gets put on slice 2. System is now booting from slice 2 - good)

    • Try console menu 13 "Upgrade from Console".

    Enter an option: 13
    
    >>> Updating repositories... done.
    >>> Mounting second partition to run upgrade... done.
    >>> Updating repositories... done.
    pkg: No packages installed
    return: Illegal number: -1
    pkg: No packages installed
    **** WARNING ****
    Reboot will be required!!
    Secondary partition is up to date
    Proceed with upgrade? (y/N) y
    >>> Setting secondary partition as active... done.
    pkg: No packages installed
    *** Welcome to pfSense 2.3-ALPHA-nanobsd (amd64) on Test-rt-01 ***
    
     WAN (wan)       -> re1        -> v4/DHCP4: 10.49.209.3/22
     LAN (lan)       -> re2        -> v4: 10.49.64.250/22
     OPT1 (opt1)     -> re0        -> v4: 10.49.68.250/22
    
     0) Logout (SSH only)                  9) pfTop
     1) Assign Interfaces                 10) Filter Logs
     2) Set interface(s) IP address       11) Restart webConfigurator
     3) Reset webConfigurator password    12) pfSense Developer Shell
     4) Reset to factory defaults         13) Upgrade from console
     5) Reboot system                     14) Disable Secure Shell (sshd)
     6) Halt system                       15) Restore recent configuration
     7) Ping host                         16) Restart PHP-FPM
     8) Shell
    
    Enter an option:
    
    

    And it then auto-reboots and comes back on slice 1 running 2.2.5-DEVELOPMENT.

    Maybe this is because slice 1 contains a version 2.2.* system. Maybe 2.3 is not capable of doing a package-style upgrade of a 2.2.* target slice to 2.3?

    But this will be a very typical upgrade sequence in future:

    Slice 1: 2.2.5 running
    Slice 2: 2.2.4 old version

    a) Upgrade from 2.2.5 to 2.3
    Slice 1: 2.2.5 old version
    Slice 2: 2.3 running

    b) Upgrade from 2.3 to 2.3.1
    Slice 1: 2.3.1 running
    Slice 2: 2.3 old version

    Upgrade (b) requires that the 2.3 upgrade code can upgrade a target slice that contains an old version of pfSense. Potentially someone might have upgraded direct from 1.2.3 to 2.3! In that case the old slice would have 1.2.3 on it. It could be tricky.

    Maybe in these scenarios a "Duplicate Slice" should be done first. That brings the (old) target slice up to match the current slice (2.3) and then the upgrade code can apply the upgrade…



  • Just pinging this thread to say all the symptoms are still the same. I guess there is no progress just yet on the whole nanoBSD dual-slice upgrade process for 2.3.



  • I see that Renato has done some more work on the upgrade stuff, but still no joy here for nanoBSD upgrade from console option (13). I get the same "illegal number" message. It switches slices but the other slice still has the old code on it.
    Just pinging this thread every few weeks so I can still see it in the list :)



  • There is now a Redmine issue for this: https://redmine.pfsense.org/issues/5483
    so look there for discussion and progress.


Log in to reply