Juniper OS recovery

Juniper switch or router can get a filesystem corrupted and won't boot.  You have to reinstall the OS using two options:

  • Load the OS via TFTP server
  • Load the OS from the USB stick

First, when the OS is booting and you see "Loading /boot/defaults/loader.conf" message, hit space bar key to get into the loader cli:

Then from here you can either install the OS from TFTP server. Lets assume, that the switch management port (172.16.50.100/24) is directly connected to ftp server (172.16.50.10/24). You need to configure the IP address on the switch and start the installation:

loader> set ipaddr=172.16.50.100 loader> set netmask=255.255.255.0 loader> set serverip=172.16.50.10 loader> install --format tftp://172.16.50.100/jinstall-xxx-signed.tgz

 

If you want to install the OS from the usb stick, you need to first format it using FAT32, copy the software, turn off the switch or router, insert the stick, turn the switch or router back on, get into the loader command line and run the following command:

loader> install --format file:///jinstall-xxx-signed.tgz

Good luck!