Using dd to duplicate disks

Michael Stout

Well-known member
Sep 6, 2023
2
11
London
michaelstout.com
There isn't a way to run MD5 (or any other hashing algorithm) directly with dd.

If you'd like to validate your copy, I'd suggest the following, and visually compare the hashes.

Bash:
$ sudo dd if=/dev/sda of=/dev/sdb bs=64K conv=noerror,sync status=progress

$ sudo md5sum /dev/sda
$ sudo md5sum /dev/sdb

for SHA256

Bash:
$ sudo shasum -a 256 /dev/sda
$ sudo shasum -a 256 /dev/sdb