On 05/05/2020 15:39, Default User wrote: > > Just a note: maybe LUKS could someday add a feature that would check > before restoring a luks2 header, and alert the user that they are > trying to restore to a different disk than the header was backed up > from, or to a disk that does not appear to contain LUKS encrypted > data. A generic warning is there: # cryptsetup luksHeaderRestore /dev/sdb --header-backup-file /luks-bck.img WARNING! ======== Device /dev/sdb does not contain LUKS2 header. Replacing header can destroy data on that device. ... Just is should say what filesystem is there (we do this check on luksFormat already): through libblkid: # cryptsetup luksFormat /dev/sdb WARNING: Device /dev/sdb already contains a 'ext4' superblock signature. ... so it is really just trivial fix. Milan _______________________________________________ dm-crypt mailing list dm-crypt@xxxxxxxx https://www.saout.de/mailman/listinfo/dm-crypt