1

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!

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

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".

1 Comment

The filesystem is extracted from a tar preserving all file timings!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.