Re: Restored luks2 header to wrong drive!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux