Upgrading PICOS by Using Upgrade2 for S5860-20SQ/S5860-24XB-U
Introduction
PICOS supports upgrade2 method for system upgrade. There will be two separate systems on the device after the upgrade2 operation: PICOS and PICOS2. One of them will be the running system and the other will stay inactive. PICOS and PICOS2 system files and their respective configuration files are located in /mnt/open/picos/ of the flash. A list and brief description of these files is as follows.
* uImage1.itb * pica1.sqsh * config1/backup_files //User-defined backup files list * config1/backup.tar.gz //Backup of latest.tar.gz * config1/latest.tar.gz //The newest configuration files * uImage2.itb * pica2.sqsh * config2/backup_files * config2/backup.tar.gz * config2/latest.tar.gz |
The upgrade2 installer installs the new system into the inactive system’s file. The inactive system will be overwritten. After this operation, the new system is the inactive system and then the installer modifies the boot menu to make the newly installed system to be the default boot system. Finally, the system will come up running the new network operating system when boots up normally after the upgrading is finished,.
Upgrade2 method supports system rollback function. The "nos-rollback" command can be used to revert to a previous version of the installed software package. Moreover, if it fails to upgrade, the system can automatically rollback to the old system. This can reduce the network interruption risk due to the failure of system upgrade process and ensure the systems’ continuous availability. You can refer to section Rollback Procedure for details.
We recommend using upgrade2 method to upgrade the NOS as there are functions of system backup and rollback.
Preparation before Upgrading
Table 1. Checklist before Upgrading
No. | Checking Items | Checking Standard | Results |
1 | Checking the Running PICOS Version | The currently running system software version is lower than the software version to be installed. | |
2 | Building Upgrade Environment | Build an upgrade environment to get the upgrade software according to the need. | |
3 | Getting the Required Upgrade Software | Obtain the required supporting upgrade software. | |
4 | Backing up Important Data in Flash | All the important data in Flash is backed up. |
Checking the Running PICOS Version
Use the version command to check the version of the running system software.
admin@PICOS# run show version Copyright (C) 2009-2023 Pica8, Inc. =================================== Base ethernet MAC Address : 64:9d:99:d2:04:53 Hardware Model : S5860-24XB-U Linux System Version/Revision : 4.3.3.2/4b5f523 Linux System Released Date : 12/14/2023 L2/L3 Version/Revision : 4.3.3.2/4b5f523 L2/L3 Released Date : 12/14/2023 OVS/OF Version/Revision : 4.3.3.2/4b5f523 OVS/OF Released Date : 12/14/2023
Building Upgrade Environment
Please make sure that you have set up an HTTP, TFTP or FTP protocol upgrading environment to get the upgrade software, the basic requirements are as follows:
- PC can log in to the device through serial or SSH.
- The communication between the server and the device works well.
- The upgrading file used by the device has already been stored on the server.
Getting the Required Upgrade Software
Please contact Pica8 technical support engineers at the following website for the latest version of upgrade software.
http://www.pica8.com/support/customer
Backing up Important Data in Flash
Before upgrading, save the important data in Flash to the local PC through FTP or TFTP, and then upload it to the switch after the upgrade is completed.
Upgrading Notes
- You can log in to a device through its console port or using SSH. After successful login, you can run upgrade2 commands on the Linux prompt to upgrade the system.
- Downgrade to an earlier version is NOT supported by using upgrade2 command.
- When using FTP/TFTP to download the image, user should verify that the "binary" mode is being used. If the "binary" transfer mode is not being used, the image can be modified during download, and the upgrade will fail during the md5 check.
- The image file is a .bin file, for example S5860-24XB-U-picos-e-4.4.3.2-2f6f578-fs.bin.
- The image is platform dependent, that is, the image_name should be consistent with the platform, otherwise the upgrade script will abort.
Upgrading Procedure
The upgrading procedure in this document gives an example of upgrading on N3048EP-ON from PICOS 3.1.0 to 3.1.1 using upgrade2 command.
NOTE: Usage of upgrade2 command: USAGE Upgrade system with local new image SYNOPSIS upgrade2 [image_name] [factory-default] DESCRIPTION image_name - Image with bin format file(*.bin) PICOS upgrade is done via the command "upgrade2" in bash (launching a shell script named "upgrade2.sh"). This script will upgrade the image and back up configuration files automatically. Image name is in the form of .bin from version 3.1.0, which should be copied to the /cftmp directory before running upgrade2 command. The no-md5-check option is removed from PICOS 3.1.0. If there is an MD5 file in the /cftmp directory, the upgrade script will check package integrity with MD5. Else if there is no MD5 file in the /cftmp directory, then skip the MD5 check step. The option factory-default is used to reset the configuration to factory default when performing upgrade, but it retains the license files from the previous version. |
Upgrade2 Procedure
Step1 Stop PICOS service before upgrade.
admin@PICOS:~$ sudo systemctl stop picos
Step2 Copy the upgrade package (in the form of .bin) and the MD5 file to /cftmp directory by either FTP, TFTP, HTTP or SCP according to the actual upgrade environment. The following example uses the SCP method.
admin@PICOS:~$ sudo scp pica8@10.10.50.22:/tftp/build/daily/S5860-24XB-U/S5860-24XB-U-picos-e-4.4.3.2-2f6f578-fs.bin /cftmp admin@XorPlus$ sudo scp pica8@10.10.50.22:/tftp/build/daily/S5860-24XB-U/S5860-24XB-U-picos-e-4.4.3.2-2f6f578-fs.bin.md5 /cftmp
NOTE:
If management VRF is enabled, and the FTP/TFTP/HTTP/SCP server is connected via the Eth0/1 port, you need to add the string sudo ip vrf exec mgmt-vrf before the SCP command when executing the scp operation. The format is as follows:
admin@PICOS:~$ sudo ip vrf exec mgmt-vrf scp pica8@10.10.50.22:/tftp/build/4.4.3.2/S5860-24XB-U/S5860-24XB-U-picos-e-4.4.3.2-2f6f578-fs.bin /cftmp
admin@PICOS:~$ sudo ip vrf exec mgmt-vrf scp pica8@10.10.50.22:/tftp/build/4.4.3.2/S5860-24XB-U/S5860-24XB-U-picos-e-4.4.3.2-2f6f578-fs.bin.md5 /cftmp
If sudo ip vrf exec mgmt-vrf is not added, find the next hop routing information from the default VRF. For the usage of VRF, refer to the VRF configuration guide.
Step3 Execute the sync operation.
admin@PICOS:~$ sync
Step4 Change directory to /cftmp.
admin@PICOS:~$ cd /cftmp
Step5 Run upgrade2 command to begin upgrading.
admin@PICOS:~$ sudo upgrade2 S5860-24XB-U-picos-e-4.4.3.2-2f6f578-fs.bin
After finishing upgrade, the switch will reboot automatically, the system will come up running the new network operating system.
NOTE: It will take 20 - 30 minutes to finish upgrading PICOS. During the upgrade process, please be patient and do not perform any operation until the upgrade is complete, otherwise, the upgrade may be interrupted. |
Rollback Procedure
The upgrade2 method supports system rollback function. The "nos-rollback" command can be used to revert to a previous version of the installed software package. Moreover, if it fails to upgrade, the system can automatically rollback to the old system.
NOTE: Usage of nos-rollback command: admin@PICOS:~$ sudo nos-rollback USAGE Rollback to the previous system after next reboot SYNOPSIS nos-rollback |
The rollback procedure is as follows:
Step1 Run nos-rollback command for manually rollback.
admin@PICOS:~$ sudo nos-rollback
Step2 Reboot system manually to finish rollback.
admin@PICOS:~$ sudo reboot
You need to manually reboot the system after issued "nos-rollback" command and the system switching takes effect. After rebooting successfully, the system will come up running the previous version of network operating system.
Verifying Version after Upgrading
admin@PICOS# run show version Copyright (C) 2009-2023 Pica8, Inc. =================================== Base ethernet MAC Address : 64:9d:99:d2:04:53 Hardware Model : S5860-24XB-U Linux System Version/Revision : 4.3.3.3/4c5a643 Linux System Released Date : 12/26/2023 L2/L3 Version/Revision : 4.3.3.3/4c5a643 L2/L3 Released Date : 12/26/2023 OVS/OF Version/Revision : 4.3.3.3/4c5a643 OVS/OF Released Date : 12/26/2023
Copyright © 2024 Pica8 Inc. All Rights Reserved.