How to uninstall NOS on Edgecore Switches with ONIE

[stordis-toc]

Introduction

This guide explains how to uninstall the currently installed Network Operating System (NOS) from an Edgecore switch and return the device to the ONIE environment.

The exact procedure depends on the platform type. Some switches use a GRUB-based boot menu, while others use a U-Boot loader.

After the uninstall process is completed, the switch boots into ONIE and is ready for installation of a new NOS image.

 

Prerequisites

  • Console access to the switch.
  • A terminal emulator such as PuTTY, Tera Term, or minicom.
  • Access to the current NOS in order to reboot the switch.
  • Active console monitoring during the reboot process.

 

Method 1: Switches with GRUB

Use this method on Edgecore switches that show a GRUB boot menu during startup.

STEP 1: Reboot the switch from the currently installed NOS.

Monitor the console output during the reboot process.

STEP 2: In the GRUB menu, select ONIE.

GNU GRUB version 2.02

OpenSwitch Primary Image
OpenSwitch Secondary Image
OpenSwitch Development -- NFS root
*ONIE
DIAG: Accton Diagnostic

STEP 3: In the ONIE menu, select ONIE: Uninstall OS.

ONIE: Install OS
ONIE: Rescue
*ONIE: Uninstall OS
ONIE: Update ONIE
ONIE: Embed ONIE

STEP 4: Wait for the uninstall process to complete.

The uninstall process may take a long time. Do not power off the switch during this stage.

ONIE: OS Uninstall Mode ...
discover: Uninstall mode detected. Running uninstaller.
Erasing internal mass storage device: /dev/sda4
Deleting partition 4 from /dev/sda
Erasing internal mass storage device: /dev/sda5
Deleting partition 5 from /dev/sda

STEP 5: Confirm that the switch returns to ONIE after the uninstall.

When the process is finished, the switch should boot back into ONIE and be ready for a new NOS installation.

 

Method 2: Switches with U-Boot

Use this method on platforms that do not show GRUB and instead provide a U-Boot style loader prompt.

STEP 1: Reboot the switch from the currently installed NOS.

STEP 2: Interrupt the boot process when prompted.

Hit any key to stop autoboot:

STEP 3: At the loader prompt, run the uninstall command.

run onie_uninstall

STEP 4: Wait until the uninstall process finishes and the switch returns to ONIE.

 

Expected Result

  • The currently installed NOS is removed from the switch.
  • The switch returns to the ONIE environment.
  • The device is ready for installation of a new supported NOS image.

 

Important Notes

  • The uninstall procedure is destructive and removes the installed operating system.
  • Console access is strongly recommended because boot menu interaction is required.
  • Some platforms show the boot menu only briefly, so monitor the console carefully.
  • If the switch returns to ONIE after uninstall, this is expected behaviour.

 

Troubleshooting

  • GRUB menu not visible: Reboot the switch again and monitor the console output from the beginning.
  • Wrong ONIE option selected: Reboot the switch and select ONIE: Uninstall OS.
  • Unable to interrupt boot on U-Boot platforms: Reboot the switch again and press a key repeatedly as soon as the prompt appears.
  • Switch remains in ONIE: This is normal after the uninstall process and means the device is ready for a fresh NOS installation.

 

Procedure completed

The existing NOS has been removed successfully and the switch is now in the ONIE environment, ready for installation of a new NOS image.

 

Edgecore original article: How to uninstall NOS on Edgecore Switches with ONIE

For more free resources, visit: https://stordis.com/free-resources/

 

Comments 0

Articles in this section