This article provides information about the methods to reset EX2200 switches to the factory-default configuration. Due to physical hardware differences, the EX2200 factory-default reset procedure differs from the EX3200 and EX4200 series switches.
The request system zeroize Junos CLI command erases all data, including configuration and log files, as shown below:
lab@EX2200> request system ?
Possible completions:
certificate Manage X509 certificates
configuration Request operation on system configuration
halt Halt the system
license Manage feature licenses
logout Forcibly end user's CLI login session
power-off Power off the system
reboot Reboot the system
scripts Manage scripts (commit, op, event)
services Request service applications information
snapshot Archive data and executable areas
software Perform system software extension or upgrade
storage Request operation on system storage
CurrentlyErase all data, including configuration and log files <--
{master:0}
lab@EX2200> request system
However, there was an issue with this command; as per PR511216, the command does not work as expected in Junos versions prior to 11.1. Even if it is executed, the existing configuration is still available.
For Junos versions prior to 11.1, the recommendation is to use one of the following methods to return EX2200 to factory-defaults:
Execute the following commands:
lab@EX2200> request system configuration rescue delete
lab@EX2200> start shell user root
Password:
root@EX2200% cd /config
root@EX2200% rm -rf juniper.conf*
root@EX2200% cd /config/db/config
root@EX2200% rm -rf juniper.conf.*
root@EX2200% reboot
Or
Reformat
Install using TFTP or external USB from loader prompt:
Example: loader> install --format source
For more information, refer to:
2020-02-03: Minor, non-technical edit.