sha1sum reports that checksums do not match even though they are identical
2
votes
1
answer
2130
views
Perhaps I'm doing something very stupid here, but Google hasn't been very helpful in resolving the problem.
I have an archive of files I made for backup purposes. I've generated an SHA1 checksum file from this archive:
sha1sum myarchive.tar > myarchive.tar.sha1
The contents of this file are as follows:
6f5d7bdd71fe25ed8e881265fdb8a8bbcdaa41c1 myarchive.tar
I have also run the SHA1 process in the terminal without piping to a file:
sha1sum myarchive.tar
This gives me the output:
6f5d7bdd71fe25ed8e881265fdb8a8bbcdaa41c1 myarchive.tar
Clearly these checksums are the same. However, when I run the verification command, with the archive and its SHA1 file next to each other in the same directory:
sha1sum -c myarchive.tar.sha1
I get an error message saying that the checksum does not match:
myarchive.tar: FAILED
sha1sum: WARNING: 1 computed checksum did NOT match
Obviously something is wrong here, but I have no idea what it could be. Can anyone enlighten me?
EDIT: Interestingly, doing two consecutive MD5s on the file comes up with two different checksums. Now I'm very confused.
$ md5sum myarchive.tar
9a15036eed341613bbcf2c4b53a09859 myarchive.tar
$ md5sum myarchive.tar
a662d6b469627c62f2b03ee0df067436 myarchive.tar
EDIT2: Additional context:
* This is on real hardware (my Ubuntu MATE 19.10 desktop machine).
* The archive I've made was destined for a Blu Ray backup disc. It's 22.6GB in size.
* Performing an SHA1 verification of the file as burned to the Blu Ray disc ends up being successful.
EDIT3: In response to requests to see the output of
dmesg
, there appear to be a few errors like the following:
[ 7102.039819] perf: interrupt took too long (2502 > 2500), lowering kernel.perf_event_max_sample_rate to 79750
[ 8278.017874] sr 4:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 8278.017876] sr 4:0:0:0: [sr0] tag#0 Sense Key : Blank Check [current]
[ 8278.017877] sr 4:0:0:0: [sr0] tag#0 Add. Sense: No additional sense information
[ 8278.017878] sr 4:0:0:0: [sr0] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 01 00
[ 8278.017879] blk_update_request: critical target error, dev sr0, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[ 8278.019391] sr 4:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 8278.019392] sr 4:0:0:0: [sr0] tag#0 Sense Key : Blank Check [current]
[ 8278.019392] sr 4:0:0:0: [sr0] tag#0 Add. Sense: No additional sense information
[ 8278.019393] sr 4:0:0:0: [sr0] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 01 00
[ 8278.019394] blk_update_request: critical target error, dev sr0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 8278.019396] Buffer I/O error on dev sr0, logical block 0, async page read
I think this is to do with my USB Blu Ray drive, though someone may be able to correct me.
Asked by NoodleCollie
(193 rep)
Jul 19, 2020, 01:44 PM
Last activity: Jul 19, 2020, 05:49 PM
Last activity: Jul 19, 2020, 05:49 PM