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.
This commit is contained in:
Jane Doe 2024-06-17 17:11:33 +00:00
parent c61366ceda
commit a913d5f40e

View file

@ -2315,9 +2315,9 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: "
if [[ -n "${sgdsk_nmbr}" ]]; then if [[ -n "${sgdsk_nmbr}" ]]; then
drive="$(echo "${disks}" | awk "\$1 == ${sgdsk_nmbr} {print \$2}")" 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 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 if [[ "${run_as}" != "root" ]]; then
sleep 0.3 sleep 0.3
RED " RED "
@ -2336,17 +2336,23 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: "
" "
NC " 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 " BLUE "
Enter a number: " Enter a Preset number: "
read -r -p " read -r -p "
==> " preset ==> " preset
echo echo
@ -2689,7 +2695,7 @@ ${multi_boot}
sleep 0.3 sleep 0.3
RED " 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 sleep 3
RED " RED "
@ -2852,7 +2858,7 @@ ${multi_swap}
sleep 0.3 sleep 0.3
RED " 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 sleep 3
RED " RED "
@ -2916,7 +2922,7 @@ ${multi_swap}
sleep 0.3 sleep 0.3
RED " 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 sleep 3
RED " RED "
@ -3494,8 +3500,9 @@ Enter a partition number ${bwhite}(empty to skip and proceed)${blue}: "
fi fi
RED " RED "
[!] Warning: Partition NOT Formatted [!] WARNING: PARTITION HAS NOT BEEN FORMATTED [!]
" "
sleep 2
skip skip
done done
} }
@ -3610,8 +3617,9 @@ Enter a name ${bwhite}(empty to skip and proceed)${blue}: "
else else
RED " RED "
[!] Warning: Partition NOT Formatted [!] WARNING: PARTITION HAS NOT BEEN FORMATTED [!]
" "
sleep 2
skip skip
return 0 return 0
fi fi