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:
Example: junos-arm-32-15.1-20160612_15.1X53-D50_bsdx.1.tgz
junos-arm-32-15.1-20160612_15.1X53-D50_bsdx.1.tgz
‘show system storage’
switch> request system software add package
Where package.tgz is junos-arm-*. Example:junos-arm-32-15.1-20160612_15.1X53-D50_bsdx.1.tgz
Where package.tgz is junos-arm-*.
fpc0:--------------------------------------------------------------------------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
junos-install-media-net-arm-32-15.1-20160612_15.1X53-D50_bsdx.1.tgz
Example: u-boot> setenv ipaddr 10.204.96.65 u-boot> setenv gatewayip 10.204.111.254 u-boot> setenv netmask 255.255.240.0 u-boot> setenv serverip 10.204.96.200 u-boot> save
u-boot> setenv ipaddr 10.204.96.65 u-boot> setenv gatewayip 10.204.111.254 u-boot> setenv netmask 255.255.240.0 u-boot> setenv serverip 10.204.96.200 u-boot> save
set bootcmd=sf probe 0; sf read $loadaddr 0x3c0000 0x10000; if imi $loadaddr; then source $loadaddr; else echo "U-Boot script corrupted!!"; fi;
‘run bootmcd’
Example (when build is present under /tftpboot/namita/): install tftp://10.204.96.200/namita/builds/junos-install-media-net-ex-arm-32-15.1-20160319_sazmac_bsdx-clang.0.tgz
install tftp://10.204.96.200/namita/builds/junos-install-media-net-ex-arm-32-15.1-20160319_sazmac_bsdx-clang.0.tgz
junos-install-media-usb-arm-32-*.gz
junos-install-media-usb-arm-32-15.1-20160612_15.1X53-D50_bsdx.1.img.gz
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
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
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 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) root@ex-2300:RE:0%
‘dd’
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 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) root@ex-2300:RE:0%
root@ex-2300> request system reboot
Autoboot in 1 seconds... (press Ctrl-C to interrupt)
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 ...
user@ex-2300> show version