Question

What variables can produce different md5sum of the same dd image of a partition? If I execute this code over two storages (same size, brand and geometry) why I obtain different "partition.image" files:

sfdisk /dev/sda < /partition.table
mkfs.ext4 /dev/sda1
mount /dev/sda1 /mnt/
tar -xf somefiles.tar -C /mnt/
umount /mnt
dd if=/dev/sda1 of=/partition.image

P.S. tar is preserving all files timings!

Was it helpful?

Solution 2

Time of creation, access etc. And that's good - no two images, created at different storages should be the same. Or otherwise, you could have something called "collision".

OTHER TIPS

When you make a new ext4 filesystem with the mkfs utility, it generates a unique UUID between invocations(unless you pass the -U option with an explicit UUID). Since the UUID is stored in the superblock of the file system, the images you generate between different runs of the above code will not be bit-for-bit identical.

Sources: http://wiki.debian.org/fstab#UUIDs https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#The_Super_Block

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top