Dell Networking: How to Verify the Checksum of the OS10 Firmware Image Downloaded for Dell Networking Switches
Summary: This article explains how to verify the checksum of the firmware image downloaded into the DELL Networking OS10 switch.
Instructions
Table of Contents
- Why Checksum is Required.
- Where to Find the sha256 Checksum File
- Where to Find the Downloaded "Image File" in Switch
- Calculating Checksum of the File Downloaded
Why Check Sum Is Required
A file may become corrupted during transfer. We can use checksum to check data integrity of a file. Checksum is a number generated from the file using a checksum algorithm like md5, SHS224, SHA256. An SHA256 Checksum file is included with the OS10 package which can be used to check data integrity of the file downloaded to the switch.
Where to Find the SHA256 Checksum File
The Checksum of every firmware version is different. Check in the Installation package for the Checksum File.
The checksum file is included with the installation package. This can be seen when the zipped download is extracted. This file is SHA256 type.
An example is highlighted below.
Open the File in Notepad or any similar utility. There is a 64-character string. This 64-character string must match with the output of Hash of the image downloaded to the image.
Sample output
Below is the SHA256 file opened in Notepad.
Here the Checksum value is "d69dd152db027cb81b80be5a1f4b6e5c63e2d187d5c0e9f73e2d6d1a3b9c6d57." This must match the downloaded files calculated checksum value.
Where to Find the Downloaded "Image File" in Switch
While doing the firmware upgrade of OS10 we use the command "image download" to download the software image to the switch from TFTP, FTP, SCP, HTTP, or USB. This file is downloaded to the /var/os10-image folder.
We can view the file downloaded to the switch by using command "dir image"
Sample Output
Switch# dir image Directory contents for folder: image Date (modified) Size (bytes) Name --------------------- ------------ ------------------------------------------ 2020-12-18T12:54:51Z 477981208 PKGS_OS10-Enterprise-10.5.0.7.745stretch-installer-x86_64.bin
Calculating Checksum of the File Downloaded
We can calculate the SHA256 checksum of the downloaded file by any of the methods mentioned below.
Method 1: In OS10 CLI Using Command "Image Verify" Command [OS 10.5 and Above]
Command Syntax
| Command | Explanation |
|---|---|
Switch# image verify image://<image name> sha256 |
Command to calculate the sha256 checksum of the file. |
Sample Output
Switch# image verify image://PKGS_OS10-Enterprise-10.5.0.7.745stretch-installer-x86_64.bin sha256 Hash of image: d69dd152db027cb81b80be5a1f4b6e5c63e2d187d5c0e9f73e2d6d1a3b9c6d57
Method 2: In OS10 CLI Using SHA256sum Command
Command Syntax
Use of the tab does not autofill the "system" commands.
| Command | Explanation |
|---|---|
Switch# system “ls /var/os10-image/” |
Verify that the downloaded file is present in the folder /var/os10-image/ |
Switch# system "sha256sum /var/os10-image/<image file name>" |
Command to calculate the sha256 checksum of the file. |
Sample output
Switch# system “ls /var/os10-image/” PKGS_OS10-Enterprise-10.5.0.7.745stretch-installer-x86_64.bin ========>Verify file name Switch# system "sha256sum /var/os10-image/</PKGS_OS10-Enterprise-10.5.0.7.745stretch-installer-x86_64.bin" d69dd152db027cb81b80be5a1f4b6e5c63e2d187d5c0e9f73e2d6d1a3b9c6d57 /var/os10-image/PKGS_OS10-Enterprise-10.5.0.7.745stretch-installer-x86_64.bin ========>Verify the checksum with the checksum in file
Method 3: In Shell Using Sha256sum Command
Command Syntax
| Command | Explanation |
|---|---|
Switch# system bash |
Log in to Shell, We have to provide an admin password. |
admin@Switch:~$ ls /var/os10-image/ |
Verify that the downloaded file is present in the folder /var/os10-image/ |
admin@Switch/var/os10-image$ sha256sum /var/os10-image/<image file name> |
Command to calculate the sha256 checksum of the file. |
admin@Switch/var/os10-image$ exit |
Exit |
Sample output
Switch# system bash ============>Provide admin password when prompted admin@Switch:~$ ls /var/os10-image/ PKGS_OS10-Enterprise-10.5.0.7.745stretch-installer-x86_64.bin ========>Verify file name admin@Switch:~$ sha256sum /var/os10-image/PKGS_OS10-Enterprise-10.5.0.7.745stretch-installer-x86_64.bin d69dd152db027cb81b80be5a1f4b6e5c63e2d187d5c0e9f73e2d6d1a3b9c6d57 /var/os10-image/PKGS_OS10-Enterprise-10.5.0.7.745stretch-installer-x86_64.bin ========>Verify the checksum with the checksum in file