JunOS : How to upgrade from USB stick

By | May 5, 2014

There are several ways to update your JunOS software but one of the common and safe method is doing through the CLI and a USB memory stick.

First, get your software from Juniper.net first and save it to a MSDOS formatted USB stick.

Then, follow those steps (as root, through serial console is highly recommended) :

1. Connect the USB stick to your Juniper device (you should have an output on the console after connecting the device letting you know the device name). Note that you need to be into the Unix shell to perform the following step, the prompt will be displayed as ” % “.

Try to locate your device and his volume doing the following command :

ls /dev/

(in this example the device and volume will be “da1” and “da1s1“)

2. Mount your USB drive using the following commands :

mkdir /tmp/usb
mount -t msdosfs /dev/da1s1 /tmp/usb

3. This step is optional, but I recommend you copy the software package to the flash memory of your switch or router before continuing. Simply do :

cd /tmp/usb
cp jinstall-Your-Package-Name.tgz ../

4. Enter into the CLI environment (doing ” cli ” command) and start the installation process :

request system software add jinstall-Your-Package-Name.tgz no-validate no-copy

5. You will now receive a message once the installation will be completed. Then you need to reboot your device to load the new software :

request system reboot

NOTE  : If the software update failed, the device should boot to the rescue image on your previous JunOS version. If this is happening, probably your jPackage was corrupted. Download again and make sure you copy the image on the flash instead of executing the installation directly from your USB stick.