0

I was unable to verify the Ubuntu Server image for a pi 3 from the accompanying sha256sums.txt file on https://ubuntu.com/download/iot/raspberry-pi-2-3.

Output was

sha256sum -c SHA256SUMS.txt ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz | grep ok
sha256sum: ubuntu-18.04.2-preinstalled-server-armhf+raspi2.img.xz: No such file or directory
sha256sum: ubuntu-18.04.2-preinstalled-server-armhf+raspi3.img.xz: No such file or directory
sha256sum: ubuntu-18.04.2-server-amd64.iso: No such file or directory
sha256sum: ubuntu-18.04.2-server-arm64.iso: No such file or directory
sha256sum: ubuntu-18.04.2-server-ppc64el.iso: No such file or directory
sha256sum: ubuntu-18.04.2-server-s390x.iso: No such file or directory
sha256sum: WARNING: 6 listed files could not be read
sha256sum: ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz: no properly formatted SHA256 checksum lines found
1
  • Are you working in the same directory as the images, and do the filenames in SHA256SUMS.txt match the filenames you've downloaded? It's first saying "No such file or directory" and then says the text file isn't properly formatted. Make sure the text file isn't actually empty, and that the files you downloaded match the filenames within the file.
    – Gerowen
    Jun 23, 2019 at 8:01

1 Answer 1

1

The input files to sha256sum -c are signature files so when you do

sha256sum -c SHA256SUMS.txt ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz

... it expects ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz to be a file containing signatures and this is why it says "ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz: no properly formatted SHA256 checksum lines found"

Unless you specify --ignore-missing, sha256sum checks all the files in the signature file, so if you didn't load all the files it will complain for the missing ones.

Last, files with the correct signature are displayed with an uppercase OK and you are grep-ping for a lowercase one (grep ok) so you miss the one important message.

So I think you just want:

sha256sum -c --ignore-missing SHA256SUMS.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.