Support Support Downloads Knowledge Base Juniper Support Portal 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] Upgrading Junos on EX2300 and EX3400



Article ID: KB31201 KB Last Updated: 12 Jun 2019Version: 4.0

This article explains how to upgrade the EX2300 and EX3400. It elaborates on the cleanups needed to ensure enough storage is available to perform a clean upgrade using TFTP and USB.

The Junos runtime image used on the switch is junos-arm-32-*.tgz. The current package size is ~240MB. When a new image needs to be installed on the system, it is necessary to ensure all members subjected to the upgrade have enough storage. In order to ‘unpack and install’ the image, make sure there is 1.5 times the package space after the image is pushed to the switch.


To upgrade Junos OS, copy the software package to the switch/FTP/HTTP server and use the command-line interface (CLI) to install the new software.

During a successful upgrade, the upgrade package removes all files from /var/tmp and completely re-installs the existing software. It retains configuration files and similar information such as secure shell and host keys from the previous version.

For software installation on EX2300 and EX3400 switches:

  • Use the junos-arm* build for CLI upgrade.

  • Ensure at least 600MB of disk space is available in the system before downloading the software installation package to /var/tmp. Use the command, ‘show system storage’ to get the available space.

  • In the event of less available memory space, use, ‘request system storage cleanup’ and/or manually delete any other log or unwanted files (in /var/tmp, /var/log, etc.) from the system.

After ensuring the required memory space, begin the following software upgrade process:

CLI to install a new package on the switch

switch> request system software add package

Replace “package” with one of the following paths:

Where package.tgz is junos-arm-*.


After the software installation is done, switch reboot is required. After the reboot has completed, log in and verify that the new version of the software is properly installed.

The following sample shows a sequence of typical installation operations performed on an EX3400 switch. At each step, the available free space on the switch is noted as well.

After loader prompt upgrade:

Filesystem Size Used Avail Capacity Mounted on
/dev/md0.uzip 18M 18M 0B 100% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/gpt/junos 1.4G 414M 909M 31% /.mount
/var/jail/etc 1.4G 414M 909M 31% /.mount/packages/mnt/jweb-ex32-f5d6f26a/jail/var/etc
/var/jail/run 1.4G 414M 909M 31% /.mount/packages/mnt/jweb-ex32-f5d6f26a/jail/var/run

/var/jail/tmp 1.4G 414M 909M 31% /.mount/packages/mnt/jweb-ex32-f5d6f26a/jail/v

Software upgrade from loader prompt (from TFTP):

Software upgrade from the loader prompt will format the switch and restore the factory-default configurations.

The build to be used for installation from the loader prompt is junos-install-media-net-*
  1. Copy the required image on the TFTP server to the required directory.

  2. Reboot the switch. Stop at uboot ( ^C or space to stop autoboot – depending on the uboot version; for older uboot -> press space)

  3. Set the switch-management IP address ,netmask and gateway IP.
    u-boot> setenv ipaddr
    u-boot> setenv gatewayip
    u-boot> setenv netmask
    u-boot> setenv serverip
    u-boot> save
  4. Check connectivity to TFTP server and set the following env var:
    1. set bootcmd=sf probe 0; sf read $loadaddr 0x3c0000 0x10000; if imi $loadaddr; then source $loadaddr; else echo "U-Boot script corrupted!!"; fi;
    2. save
    3. Type ‘run bootmcd’. At the option menu, type 5(More options) and then 5(Boot prompt). The switch will drop to the loader.

  5. Load the build from loader.
    Example (when build is present under /tftpboot/namita/):
    install tftp://

USB install

USB image installation will format the switch and restore the factory-default configurations. The build to be use for USB upgrade is junos-install-media-usb-arm-32-*.gz
  1. Install Junos on the EX switch using USB:
    Connect USB device to the switch:

    root@ex-2300:RE:0% ls -l /dev/da*
    crw-r----- 1 root operator 0x4a Jul 4 07:51 /dev/da0
    crw-r----- 1 root operator 0x4b Jul 4 07:51 /dev/da0p1
    crw-r----- 1 root operator 0x4c Jul 4 07:51 /dev/da0p2
    crw-r----- 1 root operator 0x5b Jul 4 07:52 /dev/da1 <<< USB device
    crw-r----- 1 root operator 0x5c Jul 4 07:52 /dev/da1s1
    crw-r----- 1 root operator 0x5d Jul 4 07:52 /dev/da1s1a

  2. Copy image to USB
    Copy ‘junos-install-media-usb-arm-32-15.1X53-D50.2.img’ image to USB device using the ‘dd’ command.

    root@ex-2300:RE:0% gunzip junos-install-media-usb-arm-32-15.1X53-D50.2-limited.img.gz

    root@ex-2300:RE:0% ls –l | grep –i usb
    -rw-r--r-- 1 root wheel 331710976 Jun 11 21:06 junos-install-media-usb-arm-32-15.1X53-D50.2.img

    root@ex-2300:RE:0% pwd

    root@ex-2300:RE:0% dd if=junos-install-media-usb-arm-32-15.1X53-D50.2.img of=/dev/da1 bs=1m
    316+1 records in
    316+1 records out
    331710976 bytes transferred in 84.647980 secs (3918711 bytes/sec)

  3. Reboot the EX switch:
    root@ex-2300> request system reboot
  4. When the message   "Autoboot in 1 seconds... (press Ctrl-C to interrupt) " is displayed, press [Ctrl]+[C] to enter the Main Menu. 

  5. From the OAM/Main Menu, select “[B]oot menu”; and then select “Boot from [U]SB” option to install USB image.
    Main Menu

    1. Boot [J]unos volume
    2. Boot Junos volume in [S]afe mode
    3. [R]eboot
    4. [B]oot menu
    5. [M]ore options

    Choice: 4
    Boot Menu

    1. Boot [P]revious installed Junos packages
    2. Boot Junos in [S]ingle user mode
    3. Boot from [R]ecovery snapshot
    4. Boot from [U]SB
    5. Boot to [O]AM shell
    6. Snapshot [B]oot menu
    7. [M]ain menu

    Choice: 4
    Attempting to boot from USB ...
  6. After USB image installation is done, log in and verify that the new version of the software is properly installed.
    user@ex-2300> show version
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos 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