In order to verify the integrity of some files I have stored on an external disk (EXT4) connected to my Pi Model B using Rasbian Jessie (latest), I use the following:
openssl sha1 file.tar
Which generates a result such as:
SHA1(file.tar)= 1391314ca210b8034342330faac51298fad24a24
This works successfully for Raspbian Stretch only on files that are less than 2GB in size. On files larger than 2GB in size I receive the following error:
Value too large for defined data type
After doing some research, I found this information on the error.
This appears to be an issue with all Debian Stretch versions for both variants of Raspbian OS ( both +Desktop and Lite) but is not an issue on Raspbian Jessie. I have tested the following fresh installs on my Rasberry Pi Model B for both +Desktop and Lite distributions:
2017-04-10-raspbian-jessie
2017-07-05-raspbian-jessie => last Jessie version
2017-08-10-raspbian-stretch => first Stretch version
2018-03-13-raspbian-stretch => latest Stretch version
On the two Stretch versions above, I receive the "Value too large ..." error when running the openssl sha1
command on files larger than 2GB.
I receive no error when running the openssl sha1
command on the same files under the Jessie versions. It generates the SHA-1 hashes successfully for files larger than 2GB.
Additionally, I've performed the same test on a separate machine with an installation of Debian netinst (https://www.debian.org/CD/netinst/) currently based on Stretch. This contains a minimal install of Debian and that also successfully works using the openssl sha1
command on >2GB files.
This leads me to believe that the GNU utilities such as openssl
(and probably others) have not been compiled with large file support since the first release of Raspbian Stretch.
Can anyone think of a reason why this might not have been done? Has anyone experiences similar issues perhaps with other GNU utilities?
sha512sum file.tar > file.tar.shasum
). en.wikipedia.org/wiki/SHA-1 | en.wikipedia.org/wiki/Sha512sum