Support Support Downloads Knowledge Base Service Request Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[EX/QFX] Configuration is lost after reboot or a power cycle



Article ID: KB31245 KB Last Updated: 31 Dec 2016Version: 1.0

On a switch running Junos 12.3 or later, the configuration may be lost after a reboot. This can occur in a unique case when a load factory-default was first executed on the switch and then a staging configuration is loaded and committed once.

If at this point, the switch is rebooted or shutdown (graceful power-off or power unplugged), the elements from the last load factory-default command may cause the switch to lose the staged configuration and boot up in amnesiac mode.

Note: Committing the configuration just once is important here. If additional configuration changes are made and committed after the initial commit, the issue will not occur.


The switch lost its saved configuration in ~ 5 minutes after it boots up. A user can log into the switch within the first few minutes using the credentials stored previously.

After the first few minutes, the switch goes into amnesiac mode and the user is able to login with the default credentials (root/ no password).


Using load factory default causes the addition of the following snippet in the configuration. A couple of configuration files from /etc/config are loaded and merged. The device specific configuration file has the below lines:

set system commit factory-settings reset-virtual-chassis-configuration;
set system commit factory-setting reset-chassis-lcd-menu;

When an additional configuration is merged with this factory-default configuration and committed just once, the ‘system commit factory-settings’ continues to remain in the configuration and causes the issue in the next system boot up.

These settings causes the chassis auto-image upgrade process in concert with ZTP (Zero touch provisioning) to run after the system is booted up, leading to the loss of the user defined configuration.

These files are deleted by a second commit by MGD process when any configuration is changed after first commit post load factory-default. This does not occur with the first commit after the 'load factory-default' because MGD process does not detect any change.


Use the delete command

If any part of the factory default settings is not required, the best way to completely avoid this situation is to use the delete command in the edit mode to erase entire existing configuration prior to adding the desired configuration.

Using commit_confirmed + commit

If you started with load factory-default, it is best to load the desired changes and perform commit_confirmed + commit. This deletes the "system commit factory settings".

Making incremental configuration changes with interim commits

A single commit post the 'load factory-default' stage is not detected by the mgd process.

Additional changes can be made after the first commit and it will commit the changes. This is expected to delete the "system commit factory-settings". Two subsequent commit without any changes between them will not make a difference.

Note: Deletion of system commit factory-settings is recommended to be executed post load-factory default. For more information, refer to Reverting to the Factory-Default Configuration by Using the load factory-default Command

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Security Alerts and Vulnerabilities

Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search