Performing a Recovery Installation
If Junos OS on your device is damaged in some way that prevents the software from loading correctly, you may need to perform a recovery installation using an emergency boot device (for example, a USB flash drive) to restore the default factory installation. Once you have recovered the software, you need to restore the device configuration. You can either create a new configuration as you did when the device was shipped from the factory, or if you saved the previous configuration, you can simply restore that file to the device.
Starting in Junos OS Release 14.1, you can also use a system snapshot as a bootup option when your Junos OS or configuration is damaged. The system snapshot feature takes a “snapshot” of the files currently used to run the device—the complete contents of the /config directories, which include the running Juniper Networks Junos OS, the active configuration, and the rescue configuration, as well as the host OS—and copies all of these files into an external USB flash drive. See Understanding How to Back Up an Installation on Switches.
System snapshot is not supported on QFX10002 switches.
If at all possible, you should try to perform the following steps before you perform the recovery installation:
Ensure that you have an emergency boot device to use during the installation. See Creating an Emergency Boot Device for QFX Series Switches for information on how to create an emergency boot device.
Copy the existing configuration in the file
/config/juniper.conf.gzfrom the device to a remote system, such as a server, or to an emergency boot device. For extra safety, you can also copy the backup configurations (the files named
/config/juniper.conf.n, where n is a number from 0 through 9) to a remote system or to an emergency boot device.
The recovery installation process completely overwrites the entire contents of the internal flash storage.
Copy any other stored files to a remote system as desired.
To reinstall Junos OS:
Insert the emergency boot device into the QFX Series device.
Reboot the QFX Series device.
Do not power off the device if it is already on.[edit system]user@device> request system reboot
If you do not have access to the CLI, power cycle the QFX Series device.
The emergency boot device (external USB install media) is detected. At this time, you can load the Junos OS from the emergency boot device onto the internal flash storage.
The software prompts you with the following options:
External USB install media detected. You can load Junos from this media onto an internal drive. Press 'y' to proceed, 'f' to format and install, or 'n' to abort. Do you wish to continue ([y]/f/n)? f
Type f to format the internal flash storage and install the Junos OS on the emergency boot device onto the internal flash storage.
If you do no want to format the internal flash storage, type y.
The following messages are displayed:
Installing packages from external USB drive da1 Packages will be installed to da0, media size: 8G Processing format options Fri September 4 01:18:44 UTC 2012 -- IMPORTANT INFORMATION -- Installer has detected settings to format system boot media. This operation will erase all data from your system. Formatting installation disk .. this will take a while, please wait Disabling platform watchdog - threshold 12 mins Determining installation slice Fri September 4 01:27:07 UTC 2012
The device copies the software from the emergency boot device, occasionally displaying status messages. Copying the software can take up to 12 minutes.
When the device is finished copying the software, you are presented with the following prompt:
*** Fri September 4 01:19:00 UTC 2012*** Installation successful.. Please select one of the following options: Reboot to installed Junos after removing install media (default) ... 1 Reboot to installed Junos by disabling install media ............... 2 Exit to installer debug shell ...................................... 3 Install Junos to alternate slice ................................... 4 Your choice: 4 NOTE: System installer will now install Junos to alternate slice Do not power off or remove the external installer media or interrupt the installation mechanism.
Select 4 to install Junos OS to the alternate slice of the partition, and then press Enter.
Remove the emergency boot device when prompted and then press Enter. The device then reboots from the internal flash storage on which the software was just installed. When the reboot is complete, the device displays the login prompt.
Create a new configuration as you did when the device was shipped from the factory, or restore the previously saved configuration file to the device.