Issues with an old disk image
How can I mount an old, but important, disk image that’s been reported as having an invalid checksum? Read-only or compressed disk images are checked by macOS when you try to mount them. When they’re created, a checksum of their entire contents is saved in the file, and that’s compared against their current checksum. If those differ, macOS reports this error and refuses to mount them.
If you can’t access another undamaged copy of the disk image (from a backup, say), the only way around this is using the command line in Terminal. As the image is likely to be damaged, this can cause problems, and in the worst case could cause a kernel panic. So save all open work and close nonessential apps. You need to be confident that the disk image isn’t malicious in any way. Open Terminal, type a command of the following form and then press backspace: hdiutil attach filename.dmg -noverify where filename.dmg is the name of the disk image file — you can simply drag it from Finder onto Terminal’s window at that point in the command to substitute the complete path and filename. If successful, you’ll see a list of the partitions that have been mounted.
When macOS discovers a checksum issue, it writes an extended attribute of a type whose name starts with com.apple.metadata: kMDLabel_. Sometimes, you might need to delete that using the command tool xattr, or the free utility xattred, although removing it won’t enable you to mount the disk image.
Once you’ve mounted a damaged disk image using the hdiutil command, it may look fine, but it’s still faulty.