md5sum repeatedly gives different checksum for same file on same machine

Solution 1:

It may be worth running fsck (or the equivalent for whatever filesystem you're using) to fix disk errors. But, it could be the last thing this drive does if it's on its last leg.

Solution 2:

The only likely reasons are bad disk or bad RAM, and as the disk is old and you are not experiencing other issues it is less likely to be the RAM.

It could be a dodgey connector/controller: I once had an IDE->USB adaptor go bad resulting in corrupted transfers even thought the drive was perfectly fine.

Solution 3:

To be on the safe side I suggest you run memtest86+ over night to make sure that it finds no memory errors.

Solution 4:

The root cause is that somehow your RAM is getting corrupted. It is probably a bad stick, but sometimes the devices like the video card can corrupt main memory.

Do not fsck until you verify that the memory is safe. Otherwise fsck is likely to corrupt everything.

Pull out drives, put in a known good system, and FSCK there while you fix this system.

Solution 5:

Does sha1sum have the same behavior?

I would expect disk read errors before receiving phantom data that alters the hashing process. What platform are you running on?