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

    • Managing SONiC Images

      SONiC Installer The SONiC Installer is a command-line utility included with the SONiC software. It allows users to install an alternate image on a designated partition if the device is already running SONiC. This tool facilitates the installation of ...
    • 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
    • What is SONiC

      The Software for Open Networking in the Cloud or alternatively abbreviated and stylized as SONiC, is a free and open source network operating system based on Linux. It was originally developed by Microsoft and the Open Compute Project. In 2022, ...
    • Management Interface Configuration (SONiC)

      Configure the management interface (eth0) for network administration in SONiC. Default Configuration: By default, eth0 uses DHCP to dynamically obtain an IP address from a DHCP server. Static IP Configuration: Command Line: sudo config interface ip ...
    • Interface Configuration in SONiC

      To manage interface settings in SONiC, use the following commands. Change Interface Speed To modify the speed of an interface, use the command: sudo config interface speed <interface> <speed_in_Mbps> Example: sudo config interface speed ethernet10 ...