This commit is contained in:
j3d1 2020-01-29 21:49:39 +01:00
parent a8e97e5c91
commit eec23e7b88

View file

@ -5,19 +5,17 @@ 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