Upgrade Junos on SRX
Install Software via CLI (Method 1 – from Junos software copied to SRX)
Follow these steps to copy the software to the SRX device and then perform the software installation via the CLI:
- Copy software to SRX via SCP or FTP to /var/tmp:
user@srx> scp
username@<ip address of local scp server>:junos-srxsme-12.1X46-D40.2-domestic.tgz /var/tmp/junos-srxsme-12.1X46-D40.2-domestic.tgz
OR
user@srx> request system software add no-copy validate ftp://ftp.server.ip.address/path/to/junos-srxsme-12.1X46-D40.2-domestic.tgz
OR
user@srx> ftp <ip address of local ftp server> (and login)
user@srx> lcd /var/tmp/
user@srx> bin
user@srx> get junos-srxsme-12.1X46-D40.2-domestic.tgz
user@srx> bye - Install software with the commands below. For detailed instructions, refer to Installing the Software.
For example:
From the local file in /var/tmp
user@srx> request system software add no-copy validate /var/tmp/junos-srxsme-12.1X46-D40.2-domestic.tgz
user@srx> request system reboot - When complete run:
show system snapshot media internal
If the two version displayed do not match, see here.
Problems Upgrading
Cannot copy image to srx
You try to scp the junos from your desktop to the SRX and you get:
[root@workstation ~]# scp junos-srxsme-someversion.tgz root@my.srx.domain.com:/var/tmp
subsystem request failed on channel 0
scp: Connection closed
[root@workstation ~]#
Add the following to the current configuration on the srx
set system services ssh sftp-server
commit
and you should be back in business
Error in rescue.conf
You upgrade and you get the following message
Verified manifest signed by PackageProductionECP256_2020 method ECDSA256+SHA256
Hardware Database regeneration succeeded
Validating against /config/juniper.conf.gz
mgd: commit complete
Validation succeeded
Validating against /config/rescue.conf.gz
/config/rescue.conf.gz:75:(21) syntax error at ‘rfc-complaint’
[edit system phone-home]
‘rfc-complaint;’
syntax error
Validation failed
ERROR: Configuration validation failed with /altroot/cf/packages/install-tmp/junos-20.4R1.12
Note the “Validating against /config/rescue.conf.gz”
This indicates the rescue configuration will not play nicely with the new version of Junos. To fix/update the rescue configuration, make sure the current configuration does not have the item indicated in it (in this case we would “delete system phone-home”) save that configuration, then to re-create the rescue configuration
request system autorecovery state save
Then you can upgrade Junos
https://kb.juniper.net/InfoCenter/index?page=content&id=KB16652#cli_tftp