diff --git a/entry.sh b/entry.sh index 8240aba..c0ce07a 100755 --- a/entry.sh +++ b/entry.sh @@ -7,6 +7,10 @@ function first_stage(){ apt install debootstrap + + echo -n luks_password: + read -s luks_password + lsblk -ftpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT select DEVICE in $(lsblk -frpno NAME); do echo using $DEVICE @@ -34,7 +38,11 @@ function first_stage(){ echo mkfs.ext4 ${DEVICE}1 mkfs.ext4 ${DEVICE}1 - echo mkfs.ext4 ${DEVICE}2 + ( + echo $luks_password + echo $luks_password + )| cryptsetup luksFormat ${DEVICE}2 + echo $luks_password | cryptsetup luksOpen ${DEVICE}2 cryptlvm mkfs.ext4 ${DEVICE}2 mount ${DEVICE}2 $TARGET echo mount ${DEVICE}2 $TARGET