Recovering from a Failed Software Installation
Description: If the Junos OS appears to have been installed but the CLI does not work, or if the device has no software installed, you can use this recovery installation procedure to install the Junos OS.
If a Junos OS image already exists on the switch, you can either install the new Junos OS package in a separate partition, in which case both Junos OS images remain on the switch, or you can remove the existing Junos OS image before you start the new installation process.
QFX5100, QFX5200, EX4600, QFX10000, and OCX Series switches do not have a separate partition to reinstall a Junos OS image.
A recovery image is created automatically on these switches. If a previously-running switch is powered on and unable to boot using a Junos OS image, you can boot the switch using the recovery Junos OS image by selecting an option in the “Select a recovery image” menu.
We suggest creating a system snapshot on your switch onto the
external USB flash drive, and using the snapshot for recovery purposes.
The system snapshot feature takes a “snapshot” of the
files currently used to run the device—the complete contents
/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 Creating a Snapshot and Using It to Boot a QFX3500 and QFX3600 Series Switch or Creating a Snapshot and Using It to Boot a QFX Series Switch.
System snapshot is not supported on QFX5200 and QFX10000 switches.
To perform a recovery installation:
- Power on the switch. The loader script starts.
- After the message
Loading /boot/defaults/loader.confappears, you are prompted with the following message:
Hit [Enter] to boot immediately, or space bar for command prompt.
Press the Spacebar to enter the manual loader. The loader> prompt appears.
The loader prompt does not appear on QFX5100, QFX5200, EX4600, QFX10000, and OCX Series switches.
On QFX5100, QFX5200, EX4600, QFX10000, and OCX Series switches only, a recovery image is automatically saved if a previously-running switch is powered on and unable to boot using a Junos OS image.
The “Select a recovery image” menu appears on the console when one of these switches is booted and unable to load a version of Junos OS. Follow the instructions in the “Select a recovery image” menu to load the recovery version of Junos OS for one of these switches.
You can ignore the remainder of this procedure if you are using a QFX5100, QFX5200, EX4600, QFX10000, or OCX Series switch.
- Enter the following command:
loader> install [– –format] [– –external] source
format—Enables you to erase the installation media before installing the installation package. If you do not include this option, the system installs the new Junos OS in a different partition from that of the most recently installed Junos OS.
external—Installs the installation package onto external media (a USB stick, for example).
source—Represents the name and location of the Junos OS package, either on a server on the network or as a file on an external media, as shown in the following two examples:
Network address of the server and the path on the server; for example,
Junos OS package on a USB device (commonly stored in the root drive as the only file), for example,
The installation now proceeds normally and ends with a login prompt.