An external USB flash drive containing 2 partitions is connected to my Raspberry Pi.
I want to dd
an image file to this external flash drive if the first partition on the flash drive is not the same as the first one of the image file.
To achieve that, I will compare their checksum.
It's easy to compute the checksum of the flash drive's partition :
md5sum /dev/sda1
However, how to compute the checksum of the first partition stored in the image file ?
I use Debian 10 operating system.
dd
andcat
to my answer, @fdamien12 – Chris Davies Sep 25 '23 at 19:27dd
(yes, this time) to extract the relevant blocks from the stream intocmp
. Then finally usedd
again to copy the relevant blocks to the flash disk. Very complex and I wouldn't really recommend it – Chris Davies Sep 28 '23 at 09:58