...
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 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. |
5 | Checking Total Disk Space | The total disk space should be more than 3700M. |
6 | Checking the Partition Type | The type of partition should be GPT. |
7 | Checking Whether ONIE is Pre-loaded | The ONIE should be pre-loaded. |
Checking the Running PICOS Version
...
Checking Whether ONIE is Pre-loaded
Use On PowerPC & ARM platforms, we need to use the fw_printenv command to check whether the switch is pre-loaded with ONIE, which will be used to load PICOS on the switch. When using upgrade2 to upgrade the switch, you should make sure that ONIE is pre-loaded.
...
Usage of Upgrade2 Command
NOTE: admin@Xorplus$sudo upgrade2 USAGE Upgrade system with local new image SYNOPSIS upgrade [image_name] [no-md5-check] [factory-default] [use-prev-config] DESCRIPTION image_name(*.bin/*.tar.gz) - Image should be saved in /cftmp no-md5-check - Disable check of the image file for MD5 factory-default - recovery the configuration to factory default use-prev-config - Use previous config, and syslog trace backup-file=(*.lst) - Specify a user defined backup list PICOSupgradeis done via the command "upgrade2" in bash (launching a shell script named "upgrade2.sh" in "/pica/bin/shell" directory). This script will upgrade the image and back up configuration files automatically. Image name is in the form of .tar.gz, which should be copied to the /cftmp directory before running upgrade2 command. By default, this script will check image integrity with MD5. It needs the MD5 file in the /cftmp directory. Otherwise, the script will abort. User can set the parameter of "no-md5-check" to disable MD5 checking. When you want to restore factory settings after the upgrade, you can use the factory-default option when running upgrade2 command. |
Anchoruse prev config use prev config
Usage of Use-prev-config Option
use prev config | |
use prev config |
...
The differences of upgrade2/rollback with or without use-prev-config option are described in the following table. By default, upgrade2 and rollback is performed without use-prev-config option.
upgrade2 (From old version to new version) | rollback (From current version to old version) | |
with use-prev-config | 1. Load the configuration file of old version after system rebooting. 2. If there is a command line in the old version configuration file that is not supported in the new system, skip it and continue loading the remaining configuration. | 1. Load the configuration file of current version after system reboot. 2. If there is a command line in the current configuration file that is not supported in the old system, skip it and continue loading the remaining configuration. |
without use-prev-config | 1. Load the configuration file of old version after rebooting. 2. If there is a command in the old version configuration file that is not supported in the new system, load default configuration file. | Load the old version configuration file after rebooting. |
Usage of Backup-file=(*.lst) Option
During the upgrade process, the switch can automatically back up the following files or files in the following folders:
/etc/passwd /etc/shadow /etc/group /etc/gshadow /etc/resolv.conf /etc/network/interfaces /etc/picos/picos_start.conf /etc/picos/switch-public.key /etc/picos/pica.lic /etc/picos/license.conf /pica/config/pica_startup.boot /ovs/ovs-vswitchd.conf.db /ovs/function.conf.db /ovs/var/lib/openvswitch/pki/ /ovs/portGroup.conf.db /ovs/npb/htdocs/backend/web_api/dns_list.json /ovs/npb/htdocs/backend/web_api/snmp_acl.json /home /root /cftmp/ |
If you want to save user files that are not in the above default backup file list, you need to first create or specify a .lst file and then add all those files that need to be backed up to this .lst file. You can use the backup-file=(*.lst) option to achieve this, where (*.lst) is the user created file with .lst format or specify the file path to this file, for example:
...
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. |
Anchorrollback rollback
Rollback Procedure
rollback | |
rollback |
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: admin@Xorplus$sudo nos-rollback USAGE Rollback to the previous system after next reboot SYNOPSIS nos-rollback [use-prev-config] DESCRIPTION iuse-prev-config - Use previous config, and syslog trace For details about the usage of use-prev-config, please refer to Usage of Use-prev-config Option. |
The rollback procedure is as follows:
...