From 065d02d36b54f1533a2e907d23926f9914f8d12c Mon Sep 17 00:00:00 2001 From: teldra Date: Mon, 7 Feb 2022 00:25:49 +0100 Subject: [PATCH] progress --- main.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/main.sh b/main.sh index c41eccc..f53fece 100644 --- a/main.sh +++ b/main.sh @@ -87,29 +87,29 @@ do_partition() { header "do partition" start=1 if [ "$EFI" == "1" ]; then - echo parted -a optimal $TARGET_PHY_WWN mklabel gpt + parted -a optimal $TARGET_PHY_WWN mklabel gpt size=500 - echo parted -a optimal $TARGET_PHY_WWN unit mib mkpart EFI fat32 $start $(($start+$size)) + parted -a optimal $TARGET_PHY_WWN unit mib mkpart EFI fat32 $start $(($start+$size)) start=$(($start+$size+1)) - echo parted -a optimal $TARGET_PHY_WWN unit mib mkpart root $start -1s + parted -a optimal $TARGET_PHY_WWN unit mib mkpart root $start -1s mkfs.vfat -F32 $TARGET_PHY_WWN-part1 TARGET_PART="2" else - echo parted -a optimal $TARGET_PHY_WWN mklabel msdos + parted -a optimal $TARGET_PHY_WWN mklabel msdos TARGET_PART="1" if [ "$ENCRYPTION_STYLE" == "b" ] || [ "$ENCRYPTION_STYLE" == "e" ]; then size=2048 - echo parted -a optimal $TARGET_PHY_WWN unit mib mkpart primary ext4 $start $(($start+$size)) + parted -a optimal $TARGET_PHY_WWN unit mib mkpart primary ext4 $start $(($start+$size)) start=$(( $start + $size + 1 )) mkfs.btrfs $TARGET_PHY_WWN-part1 TARGET_PART="2" fi - echo parted -a optimal $TARGET_PHY_WWN unit mib mkpart primary ext4 $start -1 + parted -a optimal $TARGET_PHY_WWN unit mib mkpart primary ext4 $start -1 fi TARGETNAME=$(basename ${TARGET_PHY_WWN}-part${TARGET_PART}) - echo -n $pass | cryptsetup luksFormat ${TARGET_PHY_WWN}-part${TARGET_PART} + 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}" + 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} @@ -141,4 +141,4 @@ hibernation -do_partition \ No newline at end of file +#do_partition