From a71c25c29ee5a339b6a56929b73a97826352ed13 Mon Sep 17 00:00:00 2001 From: teldra Date: Wed, 18 Aug 2021 10:37:33 +0200 Subject: [PATCH] test --- step1/10-disk | 2 -- step2/10-disk | 35 ++++++++++++++++++----------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/step1/10-disk b/step1/10-disk index 1d5c1bf..a1c1f9c 100644 --- a/step1/10-disk +++ b/step1/10-disk @@ -137,8 +137,6 @@ fi setconf "add" "hibernate" "${hibernate}" -setconf "add" "bootsize" "4" - echo Configure rootfssize while input "Size in G? [$(( disk[size] - swapsize - bootsize ))|rest]" "rest"; do test -z "${output}" && output="${default}" diff --git a/step2/10-disk b/step2/10-disk index 8112b1e..7469970 100644 --- a/step2/10-disk +++ b/step2/10-disk @@ -21,18 +21,16 @@ if test -d /sys/firmware/efi; then echo "t"; echo "1"; sleep $sleep; - echo "w"; - echo "q") | fdisk "${dodiskid}" > /dev/null - sync + echo "w") | fdisk "${dodiskid}" > /dev/null + sleep $sleep efipart="${dodiskid}-part${index}" index=$(( index + 1 )) - mkfs.vfat "${efipart}" + mkfs.vfat "${efipart}" || exit 1 else echo "BIOS Partition" (echo "o"; sleep $sleep; - echo "w"; - echo "q") | fdisk -w always -W always "${dodiskid}" > /dev/null + echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null fi sleep $sleep sync @@ -41,17 +39,24 @@ sync echo "create bootpartition" target_boot="${dodiskid}-part${index}" index=$(( index + 1 )) +if test -d /sys/firmware/efi; then +(echo "n"; +echo ""; +echo ""; +echo "+4G"; +sleep $sleep; +echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null +else (echo "n"; echo "p"; echo "1"; echo ""; -echo "+${cfg[bootsize]}G"; +echo "+4G"; echo "a"; sleep $sleep; -echo "w"; -echo "q") | fdisk -w always -W always "${dodiskid}" > /dev/null +echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null +fi sleep $sleep -sync if [[ "${cfg[rootfssize]}" == "rest" ]]; then target_partition_tmp="${dodiskid}-part${index}" @@ -70,8 +75,7 @@ if [[ "${cfg[rootfssize]}" == "rest" ]]; then echo ""; echo ""; sleep $sleep; - echo "w"; - echo "q") | fdisk -w always -W always "${dodiskid}" > /dev/null + echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null fi elif [[ ! "${cfg[rootfssize]}" == "rest" ]]; then target_partition_tmp="${dodiskid}-part${index}" @@ -82,8 +86,7 @@ elif [[ ! "${cfg[rootfssize]}" == "rest" ]]; then echo ""; echo "+${rootfssize}G"; sleep $sleep; - echo "w"; - echo "q") | fdisk -w always -W always "${dodiskid}" > /dev/null + echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null else (echo "n"; echo "p"; @@ -91,12 +94,10 @@ elif [[ ! "${cfg[rootfssize]}" == "rest" ]]; then echo ""; echo "+${rootfssize}G"; sleep $sleep; - echo "w"; - echo "q") | fdisk -w always -W always "${dodiskid}" > /dev/null + echo "w") | fdisk -w always -W always "${dodiskid}" > /dev/null fi fi sleep $sleep -sync target_partition="${target_partition_tmp}" if [[ ! "${cfg[fde_key_store]}" == "none" ]]; then