diff -Naur genkernel-4.1.0.orig/defaults/initrd.scripts genkernel-4.1.0/defaults/initrd.scripts --- genkernel-4.1.0.orig/defaults/initrd.scripts 2020-08-10 18:19:15.000000000 +0900 +++ genkernel-4.1.0/defaults/initrd.scripts 2020-08-21 17:45:37.978449548 +0900 @@ -1781,6 +1781,12 @@ local DEV_ERROR=0 KEY_ERROR=0 KEYDEV_ERROR=0 local mntkey="/mnt/key/" crypt_filter_ret= + if [ $2 -gt 0 ] + then + eval local LUKS_NAME="$1_$2" + eval local OPENED_LOCKFILE='"${CRYPT_'${TYPE}'_OPENED_LOCKFILE}_$2"' + fi + while true do local cryptsetup_options='' @@ -2279,7 +2285,11 @@ if [ -n "${CRYPT_ROOT}" ] then - openLUKS "root" + local crypt_index=0 + for CRYPT_ROOT in ${CRYPT_ROOTS}; do + openLUKS "root" ${crypt_index} + let crypt_index=${crypt_index}+1 + done if [ -n "${REAL_ROOT}" ] then # Rescan volumes @@ -2329,6 +2339,7 @@ write_env_file \ "${CRYPT_ENV_FILE}" \ CRYPT_ROOT \ + CRYPT_ROOTS \ CRYPT_ROOT_TRIM \ CRYPT_SILENT \ CRYPT_SWAP diff -Naur genkernel-4.1.0.orig/defaults/linuxrc genkernel-4.1.0/defaults/linuxrc --- genkernel-4.1.0.orig/defaults/linuxrc 2020-08-10 18:19:15.000000000 +0900 +++ genkernel-4.1.0/defaults/linuxrc 2020-08-21 17:45:37.978449548 +0900 @@ -242,8 +242,9 @@ ISCSI_NOIBFT=1 ;; # Crypto - crypt_root=*) - CRYPT_ROOT=${x#*=} + crypt_root=*|crypt_roots=*) + CRYPT_ROOT=${CRYPT_ROOT:=${x#*=}} + CRYPT_ROOTS="${CRYPT_ROOTS} ${x#*=}" USE_CRYPTSETUP=1 ;; crypt_swap=*)