From eec23e7b888bebde4b8df6a5279de91223682588 Mon Sep 17 00:00:00 2001 From: jedi Date: Wed, 29 Jan 2020 21:49:39 +0100 Subject: [PATCH] wip --- entry.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/entry.sh b/entry.sh index 400edf0..305fe1e 100755 --- a/entry.sh +++ b/entry.sh @@ -4,20 +4,18 @@ function first_stage(){ set -e echo foo first_stage - - apt install -y debootstrap cryptsetup btrfs-progs lvm2 - - + 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 break done + apt install -y debootstrap cryptsetup btrfs-progs lvm2 + if [ -b /dev/mapper/cryptlvm ]; then cryptsetup luksClose cryptlvm fi @@ -53,6 +51,10 @@ function first_stage(){ echo lvcreate /dev/vg0 --name=root --size=100G lvcreate /dev/vg0 --name=root --size=100G yes | mkfs.ext4 /dev/vg0/root + echo lvcreate /dev/vg0 --name=swap --size=16G + lvcreate /dev/vg0 --name=swap --size=16G + mkswap /dev/vg0/root + swapon /dev/vg0/root echo mount /dev/vg0/root $TARGET mount /dev/vg0/root $TARGET echo debootstrap sid $TARGET