[Debian/Proxmox | TPM2] Add multiple LUKS devices. #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello @noahbliss,
First of all, thank you for providing mortar. In the following I describe how I would add to the feature to provide support for encryption of multiple hard disks.
Description
My Idea was to be compatible with existing setups but to add possibilities to use multiple encrypted disks with different passwords. This could be achieved by not changing contents in an existing
mortar.env
and just adding additionalmortar*.env
files which will be installed into a separate script inlocal-top
initramfs. Each script will then do unlock one hard drive, similar to how one hard drive was decrypted earlier.Type of change
3-tpm2clevis-prepluksandinstallhooks.sh
Add a loop to run the existing code for each mortar file. Code logic remains unchanged.
res/debian/tpm2clevis/install.sh
Add a loop to run the existing code for each mortar file and generate multiple
mortar-*
scripts in initramfs. Code logic remains unchanged.4-register-additional-luks-device.sh
New file to register an encrypted disk and create a new
mortar*.env
file.README.md
Add section Register additional luks devices
How Has This Been Tested?
Tested on Proxmox (Debian) with two additional hard disks
/dev/sda1
and/dev/sdb1
.Test Configuration:
Linux ryzen 6.8.8-4-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.8-4 (2024-07-26T11:15Z) x86_64 GNU/Linux
Checklist: