Backtrack:  
 
by lunarg on July 30th 2024, at 12:14

To factory reset a Cisco Catalyst 9200 series switch (e.g. when you can no longer log in or have forgotten the password), you can factory reset the switch through physical access and a serial console connection.

  1. First, connect the serial console cable and verify whether you have access to the serial console. Also, verify whether you have physical access to the switch and can unplug the power.
  2. Unplug the power cable to power down the switch. While holding down the button at the left top corner (next to the "S" LED), plug in back in. Keep the button pressed for at least 10 seconds, until the "S" LED is solid green. The console output will also state the boot from "packages.conf" has been aborted, and the "switch:" prompt is showing.
  3. Type the following commands in order:
    MANUAL_BOOT=yes
    SWITCH_IGNORE_STARTUP_CFG=1
    boot flash:packages.conf
    The last command will boot the switch but will not load the stored configuration. After the boot sequence is completed, you will have a switch with an empty configuration and can make changes.

Note that the factory reset is only definitive if you save the now empty configuration once the boot process is completed. If you do not do this, and power cycle the switch, it will reload the original configuration.