Juniper upgrade

1. SRX210 Upgrade example
> show version
Hostname: srx1
Model: Dell J-SRX210H-POE
JUNOS Software Release [10.3R2.11]
2. verify image md5
% md5 /var/tmp/junos-srxsme-11.4R11.4-domestic.tgz
MD5 (/var/tmp/junos-srxsme-11.4R11.4-domestic.tgz) = 6a19bc0ceac9913c053a90214ee61cb1
3. backup config
Back up the currently running and active file system so that you can recover to
a known, stable environment in case something goes wrong with the upgrade.
> request system snapshot

The /root file system is backed up to /altroot, and /config is backed up to
/altconfig. The /root and /config file systems are on the router’s flash disk, and
the /altroot and /altconfig file systems are on the router’s hard disk.

Roll back to previously installed version:
>request system software rollback

4. copy files
Copy the jinstall package to the router. We recommend that you copy it to the
/var/tmp directory, which is a large file system on the hard disk.
you can check the diskspace with
>show system storage
1st method using SCP:
I used a secure copy:
>scp jinstall-8.4R2.3-domestic-signed.tgz andree@some-router.bc.net:/var/tmp/
 
2nd method using usb pen drive:
% ls /dev/da*
/dev/da0        /dev/da0s1c     /dev/da0s2c     /dev/da0s3e     /dev/da0s4a
/dev/da0s1      /dev/da0s2      /dev/da0s3      /dev/da0s3f     /dev/da0s4c
/dev/da0s1a     /dev/da0s2a     /dev/da0s3c     /dev/da0s4
root@srx1% umass1: Verbatim STORE N GO, rev 2.10/a.00, addr 4
da1 at umass-sim1 bus 1 target 0 lun 0
da1: <Verbatim STORE N GO 1.00> Removable Direct Access SCSI-6 device
da1: 40.000MB/s transfers
da1: 30400MB (62259200 512 byte sectors: 255H 63S/T 3875C)root@srx1% ls /dev/da*
/dev/da0        /dev/da0s2      /dev/da0s3c     /dev/da0s4a     /dev/da1s2
/dev/da0s1      /dev/da0s2a     /dev/da0s3e     /dev/da0s4c
/dev/da0s1a     /dev/da0s2c     /dev/da0s3f     /dev/da1
/dev/da0s1c     /dev/da0s3      /dev/da0s4      /dev/da1s1
%mkdir /tmp/usb
%mount -t msdosfs /dev/da1s1 /tmp/usb
> request system snapshot media usb partition
Clearing current label…
Partitioning usb media (/dev/da1) …
Partitions on snapshot:
Partition  Mountpoint  Size    Snapshot argument
s1a    /           9.7G    none
s2a    /altroot    9.7G    none
s3e    /config     745M    none
s3f    /var        8.2G    none
s4a    recovery    895M    none
Copying ‘/dev/da0s1a’ to ‘/dev/da1s1a’ .. (this may take a few minutes)
Copying ‘/dev/da0s2a’ to ‘/dev/da1s2a’ .. (this may take a few minutes)
Copying ‘/dev/da0s3e’ to ‘/dev/da1s3e’ .. (this may take a few minutes)
Copying ‘/dev/da0s3f’ to ‘/dev/da1s3f’ .. (this may take a few minutes)
Copying ‘/dev/da0s4a’ to ‘/dev/da1s4a’ .. (this may take a few minutes)
The following filesystems were archived: / /altroot /config /var recovery
 

5. Install the new software package
Install the new software package, as shown below, where package-name is the
full filename.

> request system software add /var/tmp/jinstall-8.4R2.3-domestic-signed.tgz validate
For a software package on a remote server:
ftp://hostname/pathname/package.tgz
tftp://hostname/pathname/package.tgz
or local attached usb drive

6. Reboot the router to start the new software:
>request system reboot

7. verify new software
Log in and verify the version of software running after the router reboots. Issue
>show version

8. request system snapshot
After you have upgraded or downgraded the software and are satisfied that the new software is successfully running, issue the request system snapshot command to back up the new software.
NOTE: After you issue the request system snapshot command, you cannot return to the previous version of the software, because the running copy and backup copy of the software are identical.
Once the software is installed and the switch has booted into the new version of Junos, be sure to copy the contents of the primary root partition to the alternate root partition so that the switch boots the same version of Junos regardless of which root partition it has booted from.
> request system snapshot media internal slice alternate
This process takes a while, upwards of 5-7 minutes.
—-
atoonk@policy2> request system snapshot
Copying ‘/’ to ‘/altroot’ .. (this may take a few minutes)
Copying ‘/config’ to ‘/altconfig’ .. (this may take a few minutes)
The following filesystems were archived: / /config
9. Verify new version
> show version
Hostname: srx1
Model: Dell J-SRX210H-POE
JUNOS Software Release [11.4R11.4]
EX2200 Upgrade Example:
-connect ethernet to Management port me0, and set ip address, allow ssh
-download jinstall
% md5 /var/tmp/jinstall-ex-2200-12.3R6.6-domestic-signed.tgz
> show version
Model: ex2200-24t-4g
JUNOS Base OS boot [11.4R1.6]
JUNOS Base OS Software Suite [11.4R1.6]
JUNOS Kernel Software Suite [11.4R1.6]
JUNOS Crypto Software Suite [11.4R1.6]
JUNOS Online Documentation [11.4R1.6]
JUNOS Enterprise Software Suite [11.4R1.6]
JUNOS Packet Forwarding Engine Enterprise Software Suite [11.4R1.6]
JUNOS Routing Software Suite [11.4R1.6]
JUNOS Web Management [11.4R1.6]
> request system snapshot media external partition
> request system software add /var/tmp/jinstall-ex-2200-12.3R6.6-domestic-signed.tgz validate
> request system reboot
> show version
fpc0:
————————————————————————–
Model: ex2200-24t-4g
JUNOS Base OS boot [12.3R6.6]
JUNOS Base OS Software Suite [12.3R6.6]
JUNOS Kernel Software Suite [12.3R6.6]
JUNOS Crypto Software Suite [12.3R6.6]
JUNOS Online Documentation [12.3R6.6]
JUNOS Enterprise Software Suite [12.3R6.6]
JUNOS Packet Forwarding Engine Enterprise Software Suite [12.3R6.6]
JUNOS Routing Software Suite [12.3R6.6]
JUNOS Web Management [12.3R6.6]
JUNOS FIPS mode utilities [12.3R6.6]
{master:0}
10. if not enough space in device
>request system storage cleanup
if still not enough
After the cleanup, if there is still not enough space for the upgrade, perform the following procedure:
>start shell
%find -x /cf/var -type f -exec du -k {} \; | sort –n
Delete the files at the end of the above generated output.  Here is an example:
18256   /cf/var/lost+found/#11136/flowd_octeon.core.1.gz
19600   /cf/var/lost+found/#11136/flowd_octeon.core.0.gz
The first column displays the file size in kilobytes and the second column displays the file location.
You can also find files, which are greater in than the specific value. For example, the following command will show files whose size will be more than 10MB:
%sh -c ‘find / -size +10485760c 2> /dev/null’ | xargs du -h | sort -nrto check the size after cleanup
# run show system storage partitions
Boot Media: internal (da0)
Active Partition: da0s2a
Backup Partition: da0s1a
Currently booted from: active (da0s2a)
Partitions information:
Partition  Size   Mountpoint
s1a        293M   altroot
s2a        293M   /
s3e        24M    /config
s3f        342M   /var
s4a        30M    recovery
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s