diff --git a/ubuntu/1-pre-install.sh b/ubuntu/1-pre-install.sh index 169d3dc..416fc82 100644 --- a/ubuntu/1-pre-install.sh +++ b/ubuntu/1-pre-install.sh @@ -91,7 +91,7 @@ fi # if erase all # ----- Open the LUKS partition ----- # Open the crypt partition. -printf %s "${PASSPHRASE}" | cryptsetup open -e - "${DEV}${CRYPTPARTITION}" ${CRYPTPARTNAME} +printf %s "${PASSPHRASE}" | cryptsetup open -d - "${DEV}${CRYPTPARTITION}" ${CRYPTPARTNAME} # Check whether successful open. If mapped, it is successful. if [ ! -e /dev/mapper/${CRYPTPARTNAME} ] ; then diff --git a/ubuntu/3-post-install.sh b/ubuntu/3-post-install.sh index c417ead..89b12e1 100644 --- a/ubuntu/3-post-install.sh +++ b/ubuntu/3-post-install.sh @@ -37,7 +37,7 @@ chmod u=rx,go-rwx /etc/luks chmod u=r,go-rwx /etc/luks/boot_os.keyfile # Add a key to the key file. Use the passphrase in the environment variable. -printf %s "${PASSPHRASE}" | cryptsetup luksAddKey -e - "${DEV}${CRYPTPARTITION}" /etc/luks/boot_os.keyfile +printf %s "${PASSPHRASE}" | cryptsetup luksAddKey -d - "${DEV}${CRYPTPARTITION}" /etc/luks/boot_os.keyfile # Add the LUKS volume information to /etc/crypttab to decrypt by kernel. echo "${CRYPTPARTNAME} UUID=$(blkid -s UUID -o value ${DEV}${CRYPTPARTITION}) /etc/luks/boot_os.keyfile luks,discard" >> /etc/crypttab