arrow-left

All pages
gitbookPowered by GitBook
1 of 7

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Image Upgrade from APB

circle-exclamation

Note: The introduction of key enhancements, specifically LACP support and the SONiC operating system upgrade, dictates a direct upgrade path to APB version 2.10.0 from legacy versions is unavailable.

ONIE Install approach is recommended.

hashtag
Image Upgrade from APB

To upgrade image to a newer version from APB CLI, use the following command:

CLI Example:

To verify, Please run below command:

Selecting APB on next boot

To specify APB image on next reboot, use the following command:

Reference

Comment

Command

nextboot-image < image_name>

Description

Set next image to be loaded after the reboot

Parameters

image_name- Can be obtained from "show boot"

Mode

EXEC

List the available images using the following command:

hashtag
CLI Example

Select image to boot on next reboot using below command:

Removing available images

You can remove unused or old images from the device to optimize disk utilization using the "cleanup-images" and "remove-image" commands.

hashtag
Reference

Command

remove-image < image_name>

Description

hashtag
CLI Example

Reference

Image Management

The switch image is the executable code running on the device. APB can be upgraded to the device

  • ONIE to APB

  • APB to APB

The typical upgrade process for the image consists of the following steps:

  1. Load a new firmware image and boot image onto an SFTP, HTTP, SCP, or TFTP server on your network.

  2. Transfer the new images to the switch

  3. Specify the new image as the one to be loaded the next time a switch reload occurs

  4. Reload the switch

Command

copy scp <server_url> [timeout <interval> ] { opbnos-image }

Description

Copies new file OS image from remote SCP server and install to the switch

Parameters

Server_url username@ipaddress:filepathandname

timeout timeout

interval Specifies the maximum time (in seconds) to wait for the server to reply to the connection request. The timeout interval is from 1 to 100 seconds.

opbnos-image Copies OS image.

Mode

EXEC

pbnoscli# show boot
arrow-up-right

Remove specific image from the switch

Parameters

ImageName - Can be obtained from "show

boot"

Mode

EXEC

Command

cleanup-images

Description

Remove all available images from the switch

Parameters

ImageName - Can be obtained from "show

boot"

Mode

EXEC

Rebooting the Switch

You can reload/reboot the switch using the below command:

pbnoscli# save   
  save                  Copy Running configuration to Startup configuration
pbnoscli# save 
Saving Configuration

pbnoscli# reboot 
Check if running config is saved
Do you want to reboot the device [y/n]: y
pbnoscli# copy scp avizuser@10.2.2.10:/mnt/ws/images/opbnos/R2.8.0/nvidia/opb-nos-mellanox-20250207.2.8.0.bin opbnos-image
The authenticity of host '10.2.2.10 (10.2.2.10)' can't be established.
ECDSA key fingerprint is SHA256:+S2EmXkMAA6WYu6VKodKZtsha3HpVzLCnpG95yEqqlQ.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.2.2.10' (ECDSA) to the list of known hosts.
avizuser@10.2.2.10's password:
opb-nos-mellanox-20250215.2.8.0.bin                                                         100% 1467MB 109.8MB/s   00:13
New image will be installed, continue? [y/N]: y

//After installation is complete, perform a reboot
pbnoscli# reboot
pbnoscli# show boot
Current: OPBNOS-master.0-dirty-20250213.013329
Next: OPBNOS-master.0-dirty-20250207.160956  
Available:
OPBNOS-master.0-dirty-20250207.160956  
OPBNOS-master.0-dirty-20250213.013329


pbnoscli# show version

Aviz OPB NOS Version: 2.8.0
Distribution: Debian 11.11
Kernel: 5.10.0-18-2-amd64

Platform: x86_64-mlnx_msn4600c-r0
HwSKU: ACS-MSN4600C
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2040X05753
Model Number: MSN4600-CS2FC
Hardware Revision: A1
Uptime: 18:07:38 up  3:20,  3 users,  load average: 0.11, 0.57, 0.71
Date: Mon 24 Feb 2025 18:07:38

Docker images:
REPOSITORY                TAG                              IMAGE ID       SIZE
docker-syncd-mlnx         latest                           c530e940d41c   898MB
docker-syncd-mlnx         master.0-dirty-20250207.160956   c530e940d41c   898MB
docker-snmp               latest                           27018d6fc1c5   408MB
docker-snmp               master.0-dirty-20250207.160956   27018d6fc1c5   408MB
docker-platform-monitor   latest                           b48d9e8798f6   881MB
docker-platform-monitor   master.0-dirty-20250207.160956   b48d9e8798f6   881MB
docker-orchagent          latest                           83e221477668   396MB
docker-orchagent          master.0-dirty-20250207.160956   83e221477668   396MB
docker-lldp               latest                           b8dda16e3032   403MB
docker-lldp               master.0-dirty-20250207.160956   b8dda16e3032   403MB
docker-eventd             latest                           cfc31e8b5c59   361MB
docker-eventd             master.0-dirty-20250207.160956   cfc31e8b5c59   361MB
docker-database           latest                           7099928b9e6f   361MB
docker-database           master.0-dirty-20250207.160956   7099928b9e6f   361MB
docker-sflow              latest                           8f7d4b72342d   361MB
docker-sflow              master.0-dirty-20250207.160956   8f7d4b72342d   361MB
docker-nagr               latest                           2d4c3653029e   804MB
docker-nagr               master.0-dirty-20250207.160956   2d4c3653029e   804MB
fv                        latest                           a55f748c07a0   173MB
                    latest                           a55f748c07a0   173MB
pbnoscli# show boot
Current: OPBNOS-master.0-dirty-20250213.013329
Next: OPBNOS-master.0-dirty-20250213.013329
Available:
OPBNOS-master.0-dirty-20250213.013329
OPBNOS-master.0-dirty-20250209.063638
pbnoscli# nextboot-image OPBNOS-master.0-dirty-20250209.063638
pbnoscli# remove-image <image-name>
//Example - remove-image SONiC-OS-2.1.1_RELEASE.0-dirty-20220718.065117
pbnoscli#cleanup-images

Installing APB from ONIE

To install APB from ONIE, please follow the below steps:

  • Login using the console port and reboot the switch

  • Enter ONIE mode

ONIE
  • Select 'ONIE: Uninstall OS' to clean up installed images

circle-info

This step takes a few minutes and reboot the switch after cleanup is complete

  • The Switch will reboot and boot into 'ONIE: Install OS' mode, run the below command to stop auto-discovery

circle-info

The 'onie-discovery-stop' command is deprecated and will be removed in 2019.02.

If you are using the latest version of ONIE, Use 'onie-stop' instead.

  • Assign 'eth0' with a management-IP to copy image from remote server

  • If server is present on different network using below command to add a default route

  • Image can be installed using HTTP or SCP:

    • SCP -

  • HTTP -

    • start HTTP-server on image directory, on a linux server below command can be used to achieve this

  • On the switch console use the below command to install the image using HTTP, This will download and install the OPBNOS

ONIE-Uninstaller
ONIE:/ # onie-discovery-stop 
ONIE:/ # ifconfig eth0 <mgmt-ip> netmask <netmask> up
//Example - ifconfig eth0 10.4.4.72 netmask 255.255.254.0 up
ONIE:/ # route add default gw <gw-ip>
//Example - route add default gw 10.4.4.1 
//Copy image - 
ONIE:/ # scp <user>@<server-ip>:/<dir>/opb-nos.bin opbnos.bin
//Example - scp aviz@10.2.2.10:/images/opb/opb-nos.bin opbnos.bin 

//Install copied image -
ONIE:/ # onie-nos-install <image-name.bin>
//Example - onie-nos-install opbnos.bin
aviz@10.2.2.10:/images/opb$ python3 -m http.server 8030
ONIE:/ # onie-nos-install http://<IP>:<port>/<opb-nos.bin>
//Example - onie-nos-install http://10.2.2.10:8030/opb-nos-20220714.2.1.1.bin

Installing APB from USB Drive

To install APB from USB Drive, Please follow the below steps:

  • Login using the console port and reboot the switch

  • Enter ONIE mode

  • Select 'ONIE: Uninstall OS' to clean up installed images

  • The Switch will reboot and boot into 'ONIE: Install OS' mode, run the below command to stop auto-discovery

  • Enter the following command to create a USB mount location on the system

  • Enter the following command to mount the USB. The vfat option is used for FAT32 formatted drives

  • Install the software from the USB drive, where /mnt/media specifies the path where the USB partition is mounted

ONIE:/ # onie-discovery-stop 
ONIE:/ # mkdir /mnt/media
ONIE:/ # mount -t vfat /mnt/media
Example - ONIE:/ # mount -t vfat /dev/sdb1 /mnt/media
ONIE:/ # onie-nos-install /mnt/media/opbnos.bin