Skip to content

Instantly share code, notes, and snippets.

View fernandolobato's full-sized avatar

Fernando Lobato Meeser fernandolobato

View GitHub Profile
@fernandolobato
fernandolobato / dm-integrity.sh
Last active May 12, 2023 09:19
Create a fully encrypted disk with data integrity without wipe (dm-integrity, dm-crypt)
# This gist walks throught how a to do FDE + data integrity without wiping the whole disk. Useful for very large disks, more than 1 TB, where wipping the disk could take days.
DISK_PATH=/tmp/disk.img # dummy disk
KEY_PATH=/tmp/key.bin # path to private key
DATA_DEVICE_NAME=crypto-integrity-disk #disk name
# to run this commands on an actual disk, use parted to format the disk and create a partition.
# read some about this. This example will use a dummy disk.