mirror of
https://gitlab.com/prism7/archery.git
synced 2026-04-28 17:37:36 +02:00
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.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Amelia Installer
|
# Amelia Installer
|
||||||
# Source: https://gitlab.com/prism7/archery
|
# Source: https://gitlab.com/prism7/archery
|
||||||
# Version: 9.4.4
|
# Version: 9.5.0
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
@@ -1531,8 +1531,8 @@ set_swapsize() {
|
|||||||
|
|
||||||
local prompt="Swapsize"
|
local prompt="Swapsize"
|
||||||
YELLOW "
|
YELLOW "
|
||||||
|
### Set Swap size (integers only eg. 1,4,8,16,34)
|
||||||
### Set Swap size (integers only eg. 1,4,8,16,34) "
|
"
|
||||||
BLUE "
|
BLUE "
|
||||||
|
|
||||||
Enter Swap size ${bwhite}(in GB)${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}
|
### 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 "
|
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 "
|
read -r -p "
|
||||||
==> " prcnt
|
==> " prcnt
|
||||||
echo
|
echo
|
||||||
@@ -4610,6 +4610,18 @@ Enter [Y/n]: "
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
sleep 0.2
|
||||||
|
YELLOW "
|
||||||
|
|
||||||
|
> Set your ${nc}LUKS ${yellow}encryption password: "
|
||||||
|
BLUE "
|
||||||
|
|
||||||
|
|
||||||
|
Enter password: "
|
||||||
|
read -r -p "
|
||||||
|
==> " CRYPTPASS
|
||||||
|
line2
|
||||||
|
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
YELLOW "
|
YELLOW "
|
||||||
> Enter a name for your Encrypted ${roottype} Partition: "
|
> Enter a name for your Encrypted ${roottype} Partition: "
|
||||||
@@ -5749,7 +5761,7 @@ ${magenta}###${nc}-------------------------------${magenta}[ ${bwhite}Confirm In
|
|||||||
###################################################################################################
|
###################################################################################################
|
||||||
revise() {
|
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[@]}"
|
export "${reset[@]}"
|
||||||
gfxpkgs=()
|
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
|
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
|
else
|
||||||
cryptsetup luksOpen "${root_dev}" "${ENCROOT}" || err_abort
|
echo -n "${CRYPTPASS}" | cryptsetup luksOpen "${root_dev}" "${ENCROOT}" || err_abort
|
||||||
fi
|
fi
|
||||||
#------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------
|
||||||
if [[ "${fs}" == "1" ]]; then
|
if [[ "${fs}" == "1" ]]; then
|
||||||
@@ -5934,11 +5946,11 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}LUKS
|
|||||||
#--------------------------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------------------------
|
||||||
if [[ -e "${swap_dev}" && "${swapmode}" == "1" ]]; then
|
if [[ -e "${swap_dev}" && "${swapmode}" == "1" ]]; then
|
||||||
line2
|
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
|
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
|
else
|
||||||
cryptsetup luksOpen "${swap_dev}" swap || err_abort
|
echo -n "${CRYPTPASS}" | cryptsetup luksOpen "${swap_dev}" swap || err_abort
|
||||||
fi
|
fi
|
||||||
mkswap /dev/mapper/swap > "${void}" 2> "${log}" || err_abort
|
mkswap /dev/mapper/swap > "${void}" 2> "${log}" || err_abort
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
@@ -5956,11 +5968,11 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}LUKS
|
|||||||
#--------------------------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------------------------
|
||||||
if [[ "${homecrypt}" == "yes" ]]; then
|
if [[ "${homecrypt}" == "yes" ]]; then
|
||||||
line2
|
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
|
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
|
else
|
||||||
cryptsetup luksOpen "${home_dev}" "${ENCRHOME}" || err_abort
|
echo -n "${CRYPTPASS}" | cryptsetup luksOpen "${home_dev}" "${ENCRHOME}" || err_abort
|
||||||
fi
|
fi
|
||||||
mkfs.ext4 -F -L Home /dev/mapper/"${ENCRHOME}" > "${void}" 2> "${log}" || err_abort
|
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
|
tune2fs -O fast_commit /dev/mapper/"${ENCRHOME}" > "${void}" 2> "${log}" || err_abort
|
||||||
@@ -6668,7 +6680,7 @@ var_opts() {
|
|||||||
local stage_prompt="Rescue Entry Creation"
|
local stage_prompt="Rescue Entry Creation"
|
||||||
if [[ "${bootloader}" == "1" ]]; then
|
if [[ "${bootloader}" == "1" ]]; then
|
||||||
if arch-chroot /mnt <<-RESCUE > "${void}" 2>&1 2> "${log}" ; 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
|
cat <<-PRESET > /etc/mkinitcpio.d/${kernel}.preset || exit
|
||||||
ALL_config="/etc/mkinitcpio.conf.d/mkinitcpiod.conf"
|
ALL_config="/etc/mkinitcpio.conf.d/mkinitcpiod.conf"
|
||||||
ALL_kver="/boot/vmlinuz-${kernel}"
|
ALL_kver="/boot/vmlinuz-${kernel}"
|
||||||
@@ -6676,7 +6688,7 @@ var_opts() {
|
|||||||
default_uki="${btldr_esp_mount}/EFI/Linux/arch-${kernel}.efi"
|
default_uki="${btldr_esp_mount}/EFI/Linux/arch-${kernel}.efi"
|
||||||
default_options="--cmdline /etc/cmdline.d/cmdlined.conf"
|
default_options="--cmdline /etc/cmdline.d/cmdlined.conf"
|
||||||
rescue_uki="${btldr_esp_mount}/EFI/Linux/rescue.efi"
|
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
|
PRESET
|
||||||
mkinitcpio -P || exit
|
mkinitcpio -P || exit
|
||||||
RESCUE
|
RESCUE
|
||||||
@@ -7362,6 +7374,9 @@ CUSTOMSERV
|
|||||||
optimizations
|
optimizations
|
||||||
secboot_sign
|
secboot_sign
|
||||||
completion
|
completion
|
||||||
|
if [[ -n "${CRYPTPASS}" ]]; then
|
||||||
|
echo "Your LUKS password is: ${CRYPTPASS}" | tee -a "${log}" > "${void}"
|
||||||
|
fi
|
||||||
installation="ok"
|
installation="ok"
|
||||||
umount -R /mnt
|
umount -R /mnt
|
||||||
reboot
|
reboot
|
||||||
@@ -7377,7 +7392,7 @@ CUSTOMSERV
|
|||||||
log="Amelia_log.txt"
|
log="Amelia_log.txt"
|
||||||
disks="$(lsblk --nodeps --paths --noheadings --output=name,size,model | cat --number)"
|
disks="$(lsblk --nodeps --paths --noheadings --output=name,size,model | cat --number)"
|
||||||
trg=""
|
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[@]}"
|
export "${vars[@]}"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
CYANBG "************************************************************************************************* "
|
CYANBG "************************************************************************************************* "
|
||||||
|
|||||||
Reference in New Issue
Block a user