I'd like to create one-time encrypted partition with a random key which will be wiped on reboot. I found a manual about swap encryption, but swap is just a block device which doesn't have any file system on it. Also I found full system encryption which is unacceptable, I want only one partition. Both methods are not my case.
How to create one? As far as I understand (I'm not Linux professional) I can't directly use fstab/crypttab directly because I need to format the partition after creation every time when the machine is booting up. A kind of script? Are there any pitfalls?
EDIT: Not sure if type of encryption (block/filesystem) matters so long as any saved data is encrypted. If distrib matters: Debian Stretch. TLDR: I want clean ext4 partition mounted somewhere after reboot which data is encrypted by random key.
dm-crypt
, you can set up an encrypted partition to use, say/dev/urandom
as a keyfile (Causing the partition to effectively be useless on reboot). However no matter what, you will need to format the partition during boot. – Torin Mar 29 '18 at 19:05