From 47cf3644767d121b560acf8eac75ee6cdef0e40b Mon Sep 17 00:00:00 2001 From: teldra Date: Mon, 7 Feb 2022 01:15:40 +0100 Subject: [PATCH] progress --- main.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.sh b/main.sh index ddcfb75..6833fef 100644 --- a/main.sh +++ b/main.sh @@ -109,14 +109,15 @@ do_partition() { fi TARGETNAME=$(basename ${TARGET_PHY_WWN}-part${TARGET_PART}) + TARGETNAME_UNDERSCORE=${TARGETNAME//-/_} echo -n $pass | cryptsetup luksFormat ${TARGET_PHY_WWN}-part${TARGET_PART} -d - #echo -n $pass | sudo cryptsetup luksOpen /dev/sdc1 sdc1 -d - echo -n $pass | cryptsetup luksOpen ${TARGET_PHY_WWN}-part${TARGET_PART} "luks-${TARGETNAME}" -d - vgcreate vg-${TARGETNAME} /dev/mapper/luks-${TARGETNAME} lvcreate --name swap -L ${SWAPSIZE}G vg-${TARGETNAME} lvcreate --name root -l 100%FREE vg-${TARGETNAME} - mkswap /dev/mapper/vg-${TARGETNAME}-swap - mkfs.btrfs /dev/mapper/vg-${TARGETNAME}-root + mkswap -f /dev/mapper/vg-${TARGETNAME}-swap + mkfs.btrfs -f /dev/mapper/vg-${TARGETNAME}-root mount /dev/mapper/vg-${TARGETNAME}-root $target btrfs subvol create ${target}/root btrfs subvol create ${target}/home