From 0a4a340471dfb3b81ac3cd896ec04a443371fb1d Mon Sep 17 00:00:00 2001 From: teldra Date: Mon, 7 Feb 2022 01:17:29 +0100 Subject: [PATCH] progress --- main.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.sh b/main.sh index 6833fef..ce68ef7 100644 --- a/main.sh +++ b/main.sh @@ -112,17 +112,17 @@ do_partition() { 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 -f /dev/mapper/vg-${TARGETNAME}-swap - mkfs.btrfs -f /dev/mapper/vg-${TARGETNAME}-root - mount /dev/mapper/vg-${TARGETNAME}-root $target + echo -n $pass | cryptsetup luksOpen ${TARGET_PHY_WWN}-part${TARGET_PART} "luks-${TARGETNAME_UNDERSCORE}" -d - + vgcreate vg_${TARGETNAME_UNDERSCORE} /dev/mapper/luks-${TARGETNAME_UNDERSCORE} + lvcreate --name swap -L ${SWAPSIZE}G vg_${TARGETNAME_UNDERSCORE} + lvcreate --name root -l 100%FREE vg_${TARGETNAME_UNDERSCORE} + mkswap -f /dev/mapper/vg_${TARGETNAME_UNDERSCORE}-swap + mkfs.btrfs -f /dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root + mount /dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root $target btrfs subvol create ${target}/root btrfs subvol create ${target}/home umount $target - mount /dev/mapper/vg-${TARGETNAME}-root $target -o subvol=root + mount /dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root $target -o subvol=root if [ "$EFI" == "1" ]; then mkdir -p ${target}/boot/efi mount ${TARGET_PHY_WWN}-part1 ${target}/boot/efi