How to Upgrade/Downgrade SONiC ?

How to Upgrade/Downgrade SONiC ?

 SONiC Installer

This is a command line tool available as part of the SONiC software. If the device is already running the SONiC software, this tool can be used to install an alternate image in the partition. This tool has the facility to install an alternate image, list the available images and to set the next reboot image.

sonic-installer install

This command is used to install a new image on the alternate image partition. This command takes a path to an installable SONiC image or URL and installs the image.

Usage:sonic-installer install

Example:

admin@sonic:~$ scp servername@ipaddress:/image-file (To copy image file)

admin@sonic:~$ sonic-installer install filename.bin


New image will be installed, continue? [y/N]:y


sonic-installer list

This command displays information about currently installed images, currently running image and image set to be loaded in next reboot.

Usage:
sonic-installer list

Example:

admin@sonic:~$ sonic-installer list 
Current: SONiC-OS-HEAD.XXXX
Next: SONiC-OS-HEAD.XXXX
Available: 
SONiC-OS-HEAD.XXXX
SONiC-OS-HEAD.YYYY

 

sonic-installer set_default

This command is be used to change the image which can be loaded by default in all the subsequent reboots.

Usage:
sonic-installer set_default <image_name>

Example:

admin@sonic:~$ sonic-installer set_default SONiC-OS-HEAD.XXXX

sonic-installer set_next_boot

This command is used to change the image that can be loaded in the next reboot only. Note that it will fallback to current image in all other subsequent reboots after the next reboot.

Usage:
sonic-installer set_next_boot <image_name>

Example:

admin@sonic:~$ sonic-installer set_next_boot SONiC-OS-HEAD.XXXX

sonic-installer remove

This command is used to remove the unused SONiC image from the disk. Note that it's not allowed to remove currently running image.

Usage:
sonic-installer remove <image_name>

Example:

admin@sonic:~$ sonic-installer remove SONiC-OS-HEAD.YYYY

Image will be removed, continue? [y/N]: y


Updating GRUB...
Done
Removing image root filesystem...
Done
Command: grub-set-default --boot-directory=/host 0

Image removed


    • Related Articles

    • Which SONiC versions are supported by PalC Networks?

      PalC Networks support the following versions of SONiC : SONiC 202311 SONiC 202305 SONiC 202211 SONiC 202205 SONiC 202111
    • Is SONiC suitable for my use case?

      SONiC (Software for Open Networking in the Cloud) is designed to be a highly flexible and scalable network operating system, making it suitable for a wide range of use cases. Here are some scenarios where SONiC could be an excellent fit: 1. Data ...
    • Username and Password Configuration in SONiC

      Adding and Managing Users To configure usernames and passwords in SONiC, follow these steps: Add a New User To add a new user, use the command: sudo useradd <new-username> Example: admin@sonic:~$ sudo useradd new-username Change User Password To set ...
    • What is the SONiC NetPro Support Suite?

      The SONiC NetPro Support Suite is an all-in-one, comprehensive network support system offered by PalC Networks, designed to ensure your network operates at peak efficiency. It provides 24/7 assistance and professional guidance that goes far beyond ...
    • How to Configure snmp in broadcom sonic

      SNMP Overview Simple Network Management Protocol (SNMP) is a widely used application-layer protocol that enables centralized monitoring and management of network devices such as switches, routers, and servers. It supports real-time alerts, ...