This commit is contained in:
j3d1 2020-01-31 11:57:22 +01:00
parent e3c9e93efa
commit 85f19d7842

View file

@ -17,6 +17,9 @@ function first_stage(){
apt install -y debootstrap cryptsetup btrfs-progs lvm2
if [ -d /dev/vg0 ]; then
mount | grep target | awk '{print $3}'| sort -r | while read LINE; do
umount -l $LINE;
done
swapoff /dev/vg0/swap || true
vgchange -an /dev/vg0
fi
@ -55,7 +58,7 @@ function first_stage(){
LVM_SIZE=$(dev_size /dev/mapper/cryptlvm)
SWAP_SIZE=$(($(mem_size)/1000/1000))
SWAP_SIZE=$(($(mem_size)/1024/1024))
ROOT_SIZE=$(($LVM_SIZE/1024/1024-SWAP_SIZE))
echo lvcreate /dev/vg0 --name=root --size=${ROOT_SIZE}M