Day One Tips
Day One Tips

Technique: How to make sure that you've downloaded an uncorrupted JUNOS image?

‎11-18-2010 04:05 PM


Every time you download a JUNOS image from the Juniper download website, before upgrading your device using the new image, it is a good idea to check that the image was downloaded without any corruption so that you may not run into any issues during the upgrade.


There are 2 aspects of this verification:


1) Check the file size of the downloaded image:

The JUNOS download website specifies the size of the image in bytes.




After you've downloaded the image to the device, run the command file list detail and check the size of the image.

If the size is different from the download website, it should be a sure giveaway that the image was not downloaded properly:


lab@host> file list detail



-rw-r--r--  1 root  staff  210595906 Sep 24 12:56 junos-srxsme-10.3R1.9-domestic.tgz


2) If the file sizes match, run an MD5 or SHA-1 checksum on the file:


The JUNOS download website also specifies the MD5/SHA-1 checksums of the JUNOS images to aid in the verification:






You may create an md5 or sha-1 checksum of the downloaded image in 2 ways:


a) Operational mode:

lab@host> file checksum md5 junos-srxsme-10.3R1.9-domestic.tgz
MD5 (/cf/var/home/lab/junos-srxsme-10.3R1.9-domestic.tgz) = 0eb8a7703820994b0f0d1597b502c9c4


lab@host> file checksum sha1 junos-srxsme-10.3R1.9-domestic.tgz     
SHA1 (/cf/var/home/lab/junos-srxsme-10.3R1.9-domestic.tgz) = e0ecaf26e50e16a0e1252cd372847f6641a2d8a1

b) Shell mode:

root@host% md5 junos-srxsme-10.3R1.9-domestic.tgz
MD5 (junos-srxsme-10.3R1.9-domestic.tgz) = 0eb8a7703820994b0f0d1597b502c9c4


root@host% sha1 junos-srxsme-10.3R1.9-domestic.tgz
SHA1 (junos-srxsme-10.3R1.9-domestic.tgz) = e0ecaf26e50e16a0e1252cd372847f6641a2d8a1


Visually compare the checksums to confirm that there were no issues in the download.


If this solution resolved your problem, please flag my post as an "Accepted Solution" for the benefit of others.
Click the "Star" under my name for Kudos if you think I've earned it.