From a913d5f40e3689592a70adf39a7d745b11532a47 Mon Sep 17 00:00:00 2001 From: Jane Doe Date: Mon, 17 Jun 2024 17:11:33 +0000 Subject: [PATCH] Changes in 'Auto Partitioning' stage, to avoid verbosity of 'stderr' when selected drive did not exist/answer was invalid Add: In 'Auto Partitioning' stage, extended info and colors have been added to the prompt, to better clarify which filesystems the 'Partition Layout Presets' support. Add: In the Manual 'Format Boot Partition' & 'Format Root Partition' stages, if formatting the selected partition is skipped, a 2 sec delay has been added after the 'Warning' prompt to stress the importance. --- Amelia.sh | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/Amelia.sh b/Amelia.sh index 28cda7b..9681a33 100644 --- a/Amelia.sh +++ b/Amelia.sh @@ -2315,9 +2315,9 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: " if [[ -n "${sgdsk_nmbr}" ]]; then drive="$(echo "${disks}" | awk "\$1 == ${sgdsk_nmbr} {print \$2}")" - partsize="$(fdisk -l "${drive}" | grep -E 'bytes'| grep -E 'Disk'| awk "{print \$5}")" - rootsize="$((partsize*25/100/1024000000))" if [[ -e "${drive}" ]]; then + partsize="$(fdisk -l "${drive}" | grep -E 'bytes'| grep -E 'Disk'| awk "{print \$5}")" + rootsize="$((partsize*25/100/1024000000))" if [[ "${run_as}" != "root" ]]; then sleep 0.3 RED " @@ -2336,17 +2336,23 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: " " NC " - [1] Create 'ESP' and '/Root' [Ext4/Btrfs] + * [${cyan}Ext4${nc}] filesystem support Layout - [2] Create 'ESP', '/Root' and '/Swap' [Ext4/Btrfs] + * [${magenta}Btrfs${nc}] filesystem support Layout - [3] Create 'ESP', '/Root' and '/Home' [Ext4] - [4] Create 'ESP', '/Root', '/Home' and '/Swap' [Ext4]" + + [1] Create 'ESP' and '/Root' [${cyan}Ext4${nc}/${magenta}Btrfs${nc}] + + [2] Create 'ESP', '/Root' and '/Swap' [${cyan}Ext4${nc}/${magenta}Btrfs${nc}] + + [3] Create 'ESP', '/Root' and '/Home' [${cyan}Ext4${nc}] + + [4] Create 'ESP', '/Root', '/Home' and '/Swap' [${cyan}Ext4${nc}]" BLUE " -Enter a number: " +Enter a Preset number: " read -r -p " ==> " preset echo @@ -2689,7 +2695,7 @@ ${multi_boot} sleep 0.3 RED " - [!] WARNING: EFI Partition's size is not adequate. Create a ${nc}200 M ${red}EFI Partition at minimum " + [!] WARNING: EFI Partition's size is not adequate. Create a ${nc}200M ${red}EFI Partition at minimum " sleep 3 RED " @@ -2852,7 +2858,7 @@ ${multi_swap} sleep 0.3 RED " - [!] WARNING: EFI Partition's size is not adequate. Create a ${nc}200 M ${red}EFI Partition at minimum " + [!] WARNING: EFI Partition's size is not adequate. Create a ${nc}200M ${red}EFI Partition at minimum " sleep 3 RED " @@ -2916,7 +2922,7 @@ ${multi_swap} sleep 0.3 RED " - [!] WARNING: EFI Partition's size is not adequate. Create a ${nc}200 M ${red}EFI Partition at minimum " + [!] WARNING: EFI Partition's size is not adequate. Create a ${nc}200M ${red}EFI Partition at minimum " sleep 3 RED " @@ -3494,8 +3500,9 @@ Enter a partition number ${bwhite}(empty to skip and proceed)${blue}: " fi RED " - [!] Warning: Partition NOT Formatted + [!] WARNING: PARTITION HAS NOT BEEN FORMATTED [!] " + sleep 2 skip done } @@ -3610,8 +3617,9 @@ Enter a name ${bwhite}(empty to skip and proceed)${blue}: " else RED " - [!] Warning: Partition NOT Formatted + [!] WARNING: PARTITION HAS NOT BEEN FORMATTED [!] " + sleep 2 skip return 0 fi