I recently cloned my 250GB disk, installed with Fedora37, encrypted with LUKS.
Currently approx. 20 GB disk space is used, the rest is free.
I went ahead and booted from a fedora-live-usb and cloned the disk with dd to an external drive, plus, ive added gzip so i do not end up with an unnessesary big image. Example:
dd if=/dev/sda | gzip -c > /mnt/<external-disk>/image.img.gz
The cloning+compressing ended with a image size of 12GB. Looks pretty close to what the actual disk usage is (bit smaller).
HERE COMES THE BUT:
If the disk is encryped with LUKS, shoulnd it be way bigger as the disk is cloned in a locked state, so the free disk space should not appear as "zero" since even empty disk space should be encrypted?
Or to be more exact: lets assume the 250GB minus the approx. 20GB (=230GB) are not all zeros but all identically, page by page.
Isnt this a huge issue as one could assume so many equal pages may indicate unused space (zero?) and thus be able to crack the encryption easily, since the attacker knows what the raw data are of the empty space, then use the same key for the actual data?
I was expecting a way bigger disk image even with gzip, as "one empty page" should not look equal to gzip "as the next one" and so on!?