From 6b391470a1eeeb5c29ca4dc24cdf45bd758d5435 Mon Sep 17 00:00:00 2001 From: Jane Doe Date: Fri, 5 Sep 2025 23:26:49 +0300 Subject: [PATCH] Change: Edit a few prompts for better aesthetics Change: Setting the LUKS password takes place earlier in the installation (is not interactive -on-the-fly- anymore) and the stage is much less verbose. Also, User's LUKS encryption password will be appended to the 'Amelia.log' file at the end of the installation process. Change: The 'rescue' systemd-boot entry '.conf' file has been renamed. --- Amelia.sh | 51 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/Amelia.sh b/Amelia.sh index 2da560c..4abf30d 100644 --- a/Amelia.sh +++ b/Amelia.sh @@ -2,7 +2,7 @@ # Amelia Installer # Source: https://gitlab.com/prism7/archery -# Version: 9.4.4 +# Version: 9.5.0 set -euo pipefail ################################################################################################### @@ -1531,8 +1531,8 @@ set_swapsize() { local prompt="Swapsize" YELLOW " - - ### Set Swap size (integers only eg. 1,4,8,16,34) " + ### Set Swap size (integers only eg. 1,4,8,16,34) + " BLUE " Enter Swap size ${bwhite}(in GB)${blue}: " @@ -3629,11 +3629,11 @@ set_partsize() { ### Current ${nc}Root${yellow} partition's size is ${nc}[${rootsize} GiB]${yellow} - > Adjust Root Partition's size (by setting a custom percentage value) ? " + > Adjust Root Partition's size (by setting a custom ${nc}% ${yellow}value) ? " BLUE " -Enter Percentage value ${nc}eg. 40 ${bwhite}(empty to skip)${blue}: " +Enter ${nc}% ${blue}value ${nc}eg. 40 ${bwhite}(empty to skip)${blue}: " read -r -p " ==> " prcnt echo @@ -4610,6 +4610,18 @@ Enter [Y/n]: " return 1 fi fi + sleep 0.2 + YELLOW " + + > Set your ${nc}LUKS ${yellow}encryption password: " + BLUE " + + +Enter password: " + read -r -p " +==> " CRYPTPASS + line2 + sleep 0.2 YELLOW " > Enter a name for your Encrypted ${roottype} Partition: " @@ -5749,7 +5761,7 @@ ${magenta}###${nc}-------------------------------${magenta}[ ${bwhite}Confirm In ################################################################################################### revise() { - reset=(xbootloader="" gfxconf="" vendor_slct="" vendor="" desktop="" terminal="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" autoroot="" autoxboot="" autohome="" autoswap="" vendors="" lowlat="" nogsp="" sanity="" smartpart="" partok="" preset="" presetpart="" set_optm="" ask_param="" kill_watchdog="" genoptm="" desk_setup="" devel="" web="" web_pkg="" web_aur="" web_slct="" set_optm_slct="" oomd="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" E_ROOT="") + reset=(xbootloader="" gfxconf="" vendor_slct="" vendor="" desktop="" terminal="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" autoroot="" autoxboot="" autohome="" autoswap="" vendors="" lowlat="" nogsp="" sanity="" smartpart="" partok="" preset="" presetpart="" set_optm="" ask_param="" kill_watchdog="" genoptm="" desk_setup="" devel="" web="" web_pkg="" web_aur="" web_slct="" set_optm_slct="" oomd="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="") export "${reset[@]}" gfxpkgs=() @@ -5880,11 +5892,11 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}LUKS " - if cryptsetup -y -v luksFormat --label CRYPTROOT "${root_dev}"; then + if echo -n "${CRYPTPASS}" | cryptsetup luksFormat --label CRYPTROOT "${root_dev}" > "${void}"; then if [[ "${rota}" == "0" ]]; then - cryptsetup --perf-no_read_workqueue --perf-no_write_workqueue --persistent luksOpen "${root_dev}" "${ENCROOT}" || err_abort + echo -n "${CRYPTPASS}" | cryptsetup --perf-no_read_workqueue --perf-no_write_workqueue --persistent luksOpen "${root_dev}" "${ENCROOT}" || err_abort else - cryptsetup luksOpen "${root_dev}" "${ENCROOT}" || err_abort + echo -n "${CRYPTPASS}" | cryptsetup luksOpen "${root_dev}" "${ENCROOT}" || err_abort fi #------------------------------------------------------------------------------------------ if [[ "${fs}" == "1" ]]; then @@ -5934,11 +5946,11 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}LUKS #-------------------------------------------------------------------------------------------------- if [[ -e "${swap_dev}" && "${swapmode}" == "1" ]]; then line2 - if cryptsetup -y -v luksFormat --label CRYPTSWAP "${swap_dev}"; then + if echo -n "${CRYPTPASS}" | cryptsetup luksFormat --label CRYPTSWAP "${swap_dev}" > "${void}"; then if [[ "${rota}" == "0" ]]; then - cryptsetup --perf-no_read_workqueue --perf-no_write_workqueue --persistent luksOpen "${swap_dev}" swap || err_abort + echo -n "${CRYPTPASS}" | cryptsetup --perf-no_read_workqueue --perf-no_write_workqueue --persistent luksOpen "${swap_dev}" swap || err_abort else - cryptsetup luksOpen "${swap_dev}" swap || err_abort + echo -n "${CRYPTPASS}" | cryptsetup luksOpen "${swap_dev}" swap || err_abort fi mkswap /dev/mapper/swap > "${void}" 2> "${log}" || err_abort sleep 0.2 @@ -5956,11 +5968,11 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}LUKS #-------------------------------------------------------------------------------------------------- if [[ "${homecrypt}" == "yes" ]]; then line2 - if cryptsetup -y -v luksFormat --label CRYPTHOME "${home_dev}"; then + if echo -n "${CRYPTPASS}" | cryptsetup luksFormat --label CRYPTHOME "${home_dev}" > "${void}"; then if [[ "${rota}" == "0" ]]; then - cryptsetup --perf-no_read_workqueue --perf-no_write_workqueue --persistent luksOpen "${home_dev}" "${ENCRHOME}" || err_abort + echo -n "${CRYPTPASS}" | cryptsetup --perf-no_read_workqueue --perf-no_write_workqueue --persistent luksOpen "${home_dev}" "${ENCRHOME}" || err_abort else - cryptsetup luksOpen "${home_dev}" "${ENCRHOME}" || err_abort + echo -n "${CRYPTPASS}" | cryptsetup luksOpen "${home_dev}" "${ENCRHOME}" || err_abort fi mkfs.ext4 -F -L Home /dev/mapper/"${ENCRHOME}" > "${void}" 2> "${log}" || err_abort tune2fs -O fast_commit /dev/mapper/"${ENCRHOME}" > "${void}" 2> "${log}" || err_abort @@ -6668,7 +6680,7 @@ var_opts() { local stage_prompt="Rescue Entry Creation" if [[ "${bootloader}" == "1" ]]; then if arch-chroot /mnt <<-RESCUE > "${void}" 2>&1 2> "${log}" ; then - echo "systemd.unit=rescue.target rw ${boot_opts[*]}" | tee /etc/cmdline.d/rescue.conf || exit + echo "systemd.unit=rescue.target rw ${boot_opts[*]}" | tee /etc/cmdline.d/rescued.conf || exit cat <<-PRESET > /etc/mkinitcpio.d/${kernel}.preset || exit ALL_config="/etc/mkinitcpio.conf.d/mkinitcpiod.conf" ALL_kver="/boot/vmlinuz-${kernel}" @@ -6676,7 +6688,7 @@ var_opts() { default_uki="${btldr_esp_mount}/EFI/Linux/arch-${kernel}.efi" default_options="--cmdline /etc/cmdline.d/cmdlined.conf" rescue_uki="${btldr_esp_mount}/EFI/Linux/rescue.efi" - rescue_options="--cmdline /etc/cmdline.d/rescue.conf" + rescue_options="--cmdline /etc/cmdline.d/rescued.conf" PRESET mkinitcpio -P || exit RESCUE @@ -7362,6 +7374,9 @@ CUSTOMSERV optimizations secboot_sign completion + if [[ -n "${CRYPTPASS}" ]]; then + echo "Your LUKS password is: ${CRYPTPASS}" | tee -a "${log}" > "${void}" + fi installation="ok" umount -R /mnt reboot @@ -7377,7 +7392,7 @@ CUSTOMSERV log="Amelia_log.txt" disks="$(lsblk --nodeps --paths --noheadings --output=name,size,model | cat --number)" trg="" - vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" gfxconf="" gfx_conf="" gfx_setup="" vendor="" vendor1="" vendor2="" vendor3="" vendor_slct="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" homecrypt="" greeter="" greeternmbr="" cust_bootopts="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" gfx_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" zram_bootopts="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" vendors="" dev="" web="" web_pkg="" web_aur="" web_slct="" printer="" print_pkgs="" shellnmbr="" shell="" shellname="" shellname2="" shell_pkgs="" genoptm="" set_optm="" ask_param="" desk_setup="" set_optm_slct="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" E_ROOT="") + vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" gfxconf="" gfx_conf="" gfx_setup="" vendor="" vendor1="" vendor2="" vendor3="" vendor_slct="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" homecrypt="" greeter="" greeternmbr="" cust_bootopts="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" gfx_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" zram_bootopts="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" vendors="" dev="" web="" web_pkg="" web_aur="" web_slct="" printer="" print_pkgs="" shellnmbr="" shell="" shellname="" shellname2="" shell_pkgs="" genoptm="" set_optm="" ask_param="" desk_setup="" set_optm_slct="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="") export "${vars[@]}" sleep 0.2 CYANBG "************************************************************************************************* "