Recovery

If the SONiC image in the system becomes corrupted, it may be necessary to perform recovery procedures to correct the image.

Recovery using ONIE

The user can recover a Nokia community SONiC device by reinstalling the SONiC image from a local image through the Open Network Install Environment (ONIE). This method is typically used when it is not possible to boot the existing image.

  • Ensure the RS-232 console is connected to the front port; the rate depends on the platform, for example, 9600 baud or 115200 baud.
  • Have the ability to power cycle the device.
  • Ensure the local image file is available, for example, in the directory /tmp/IMAGE_FILE.bin, on a USB drive or an SD card, or another method supported on your platform (for example, over the network).

Use this procedure for recovery purposes. For a standard upgrade, see Upgrading to a customer-compiled SONiC software image for instructions.

This procedure uses the UEFI GRUB menu and ONIE installer. The boot-timing windows are short.

The examples in this task show reimaging of a 202411 software version.

  1. Use the following steps to run the ONIE boot.
    1. Display the GNU GRUB menu by pressing the up arrow key during power on.
    2. Select ONIE from the GNU GRUB menu as shown in the following figure.
    3. Select ONIE: Install OS from the ONIE boot options.
    4. Go to step 2.
    Figure 1. GNU GRUB menu
    ONIE starts automatic discovery by default.
  2. Stop the ONIE automatic discovery before running a manual installation.
    ONIE:/ # onie-stop
    discover: installer mode detected.
    Stopping: discover... done.
  3. If you are transferring the SONiC image over the network, configure the management IP address and default route.
    Configure the ONIE management interface and default route
    ONIE:/ # ifconfig eth0 10.12.19.7 netmask 255.255.255.0
    ONIE:/ # ip route add 0.0.0.0/0 via 10.12.19.1
    The management interface and default route are configured for transferring the image over the network.
  4. Make the SONiC image available locally using one of the following methods.
    • Copy the image over the network using SCP.

      Example

      ONIE:/ # scp <user>@<server-with-sonic-image>:<path-to-sonic-image-binary> <local-destination>
    • Copy the image from a USB drive or SD card.

      Example

      ONIE:/ # fdisk -l
      ONIE:/ # mkdir /mnt/usb
      ONIE:/ # mount /dev/sdb1 /mnt/usb
      ONIE:/ # cp /mnt/usb/sonic-image.bin /root/
  5. Reinstall the image (from your local storage, a USB drive or SD card, or over your network), using the onie-nos-install command.
    Reinstall image from local disk
    ONIE:/ #
    ONIE:/ # ls /tmp
    sonic-marvell-prestera-arm64.bin
    ONIE:/ #
    ONIE:/ # onie-nos-install /tmp/sonic-marvell-prestera-arm64.bin
    The system installs the SONiC image.
  6. After the installation completes, allow the device to reboot and boot the installed SONiC image.
    The device boots using the installed SONiC image and displays the SONiC login prompt.
  7. When the reinstallation completes, use the show version command to verify the SONiC image software version and build details.
    admin@router:~$ show version
     
    SONiC Software Version: SONiC.HEAD.1086978-202411-ce988a8c
    SONiC OS Version: 13
    Distribution: Debian 13.1
    Kernel: 6.12.41+deb13-sonic-arm64
    Build commit: ce988a8c
    Build date: Fri Nov  7 11:55:35 UTC 2025
    Built by: gitlab-runner@sonic-armv16
     
    Platform: arm64-nokia_ixs7215_52xb-r0
    HwSKU: Nokia-7215-A1
    ASIC: marvell
    ASIC Count: 1
    Serial Number: 124080XXXX
    Model Number: 3HE18723AAXXXX
    Hardware Revision: 0
    The output confirms that the expected SONiC image is reinstalled and active.