Below are the steps to create a custom decryption strategy for LUKS encrypted volumes, which needs to be decrypted and mounted during kernel boot:
- backup current initramfs image
- create decryption script
- use decryption script with crypttab
- rebuild kernel
- (optional) debug
The solution was tested on Debian 11 and 12.