This commit is contained in:
j3d1 2020-01-29 21:22:39 +01:00
parent 885f7ae0bb
commit 0c056e20b1

View file

@ -7,6 +7,10 @@ function first_stage(){
apt install debootstrap apt install debootstrap
echo -n luks_password:
read -s luks_password
lsblk -ftpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT lsblk -ftpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT
select DEVICE in $(lsblk -frpno NAME); do select DEVICE in $(lsblk -frpno NAME); do
echo using $DEVICE echo using $DEVICE
@ -34,7 +38,11 @@ function first_stage(){
echo mkfs.ext4 ${DEVICE}1 echo mkfs.ext4 ${DEVICE}1
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 mkfs.ext4 ${DEVICE}2
mount ${DEVICE}2 $TARGET mount ${DEVICE}2 $TARGET
echo mount ${DEVICE}2 $TARGET echo mount ${DEVICE}2 $TARGET