Change: Graphics Setup stage has been revamped

Change: 'Budgie' desktop > 'Nautilus' file browser has been replaced by 'Nemo'
Add: When 'GPT Manager' creates a new disk GPT, all future warnings concerning 'Data Loss' when dealing with involved disk will be silenced
Add: When 'GPT Manager' creates a new disk GPT, the 'Multiboot Status' stage will be skipped
This commit is contained in:
Jane Doe
2025-10-10 17:46:20 +03:00
parent 64d692d0ff
commit 79be8ff2cb
+228 -322
View File
@@ -2,7 +2,7 @@
# Amelia Installer # Amelia Installer
# Source: https://gitlab.com/prism7/archery # Source: https://gitlab.com/prism7/archery
# Version: 9.8.4 # Version: 9.9.0
set -euo pipefail set -euo pipefail
################################################################################################### ###################################################################################################
@@ -542,10 +542,9 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Machi
hardw_vendor="$(hostnamectl | grep -E "Hardware Vendor" | awk "{print \$3}")" hardw_vendor="$(hostnamectl | grep -E "Hardware Vendor" | awk "{print \$3}")"
machine="$(hostnamectl | grep -Em 1 "Chassis" | awk "{print \$2}")" machine="$(hostnamectl | grep -Em 1 "Chassis" | awk "{print \$2}")"
if [[ "${hypervisor}" != "none" ]]; then if [[ "${hypervisor}" == "none" ]]; then # <<<<<<<<<<
vm vm
vendor="Virtual Machine" vendor="Virtual Machine"
gfxconf="n"
fi fi
if [[ "${CPU}" == *"GenuineIntel"* ]]; then if [[ "${CPU}" == *"GenuineIntel"* ]]; then
@@ -1570,10 +1569,8 @@ Enter Swap size ${bwhite}(in GB)${blue}: "
dtct_gfx() { dtct_gfx() {
gfx_slct="yes" gfx_slct="yes"
vendor=""
vendors="" if [[ "${vendor}" == "Virtual Machine" ]]; then
if [[ "${hypervisor}" != "none" ]]; then
vendor="Virtual Machine"
vm vm
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
@@ -1581,7 +1578,7 @@ dtct_gfx() {
--> Graphics Setup skipped --> Graphics Setup skipped
" "
return 0 return 0
else fi
sleep 0.2 sleep 0.2
NC " NC "
@@ -1597,11 +1594,10 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Grap
nvidiacount="$(lspci | grep -E 'VGA|Display|3D' | grep -E -c 'NVIDIA Corporation')" nvidiacount="$(lspci | grep -E 'VGA|Display|3D' | grep -E -c 'NVIDIA Corporation')"
nvidiacards="$(lspci | grep -E 'VGA|Display|3D' | grep -E 'NVIDIA Corporation'| sed 's/.*Corporation //g' | cat --number | sed 's/.[0-9]//')" nvidiacards="$(lspci | grep -E 'VGA|Display|3D' | grep -E 'NVIDIA Corporation'| sed 's/.*Corporation //g' | cat --number | sed 's/.[0-9]//')"
if [[ "${gfxcount}" == "1" ]]; then if [[ "${gfxcount}" == "1" ]]; then
dtct_single_gfx dtct_single_gfx
else else
dtct_multi_gfx dtct_multi_gfx
fi
fi fi
} }
################################################################################################### ###################################################################################################
@@ -1619,242 +1615,145 @@ dtct_single_gfx() {
amd amd
elif [[ "${nvidiacount}" -eq "1" ]]; then elif [[ "${nvidiacount}" -eq "1" ]]; then
vendor="Nvidia" vendor="Nvidia"
sourcetype="Proprietary"
nvidia nvidia
fi
if [[ "${vendor}" == "Nvidia" ]]; then
sleep 0.2 sleep 0.2
RED " CYAN "
---------------------------------------------------- ### ${yellowl}Nvidia: ${nc}ONLY 'Maxwell' (NV110) or newer graphics are supported ${cyan}
### ${nc}Only for NV110 ${yellow}(Maxwell) ${nc}Graphics or newer ${red}###
----------------------------------------------------" ### ${nc}Selecting ${yellowl}(n)o ${nc}defaults to the open-source ${yellowl}'nouveau' "
fi
YELLOW "
> Configure the Graphics subsystem and enable HW acceleration ? [Y/n] "
if [[ "${vendor}" == "Nvidia" ]]; then
YELLOW " YELLOW "
> Install proprietary Nvidia drivers ? [Y/n] "
### Selecting ${nc}'(n)o' ${yellow}defaults to using the open-source ${nc}'nouveau' ${yellow}driver"
fi
BLUE " BLUE "
Enter [Y/n]: " Enter [Y/n]: "
read -r -p " read -r -p "
==> " gfxconf ==> " nvdprop
gfxconf="${gfxconf:-y}" nvdprop="${nvdprop:-y}"
gfxconf="${gfxconf,,}" nvdprop="${nvdprop,,}"
if [[ "${gfxconf}" == "y" ]]; then if [[ "${nvdprop}" == "y" ]]; then
gfx_conf sourcetype="Proprietary"
elif [[ "${gfxconf}" == "n" ]]; then elif [[ "${nvdprop}" == "n" ]]; then
local prompt="Graphics Setup" sourcetype="Open-source"
skip skip
ok elif [[ ! "${nvdprop}" =~ ^(y|n)$ ]]; then
else invalid
invalid return 1
return 1 fi
fi fi
gfx_conf
} }
################################################################################################### ###################################################################################################
dtct_multi_gfx() { dtct_multi_gfx() {
if [[ "${gfxcount}" == "2" ]]; then
gfx_setup="Dual"
elif [[ "${gfxcount}" == "3" ]]; then
gfx_setup="Triple"
fi
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
### ${gfx_setup} Graphics setup detected, consisting of: " ### Multi Graphics Setup detected, consisting of: "
NC " NC "
____________________________________________________________________" ____________________________________________________________________"
if [[ "${intelcount}" -ge "1" ]]; then if [[ "${intelcount}" -ge "1" ]]; then
vendor1="Intel"
echo echo
BLUEBG " ------------------------------- " BLUEBG " ------------------------------- "
BLUEBG " [${intelcount}] Intel Graphics device(s) " BLUEBG " [${intelcount}] Intel Graphics device(s) "
BLUEBG " ------------------------------- " BLUEBG " ------------------------------- "
NC " NC "
${intelcards} ${intelcards}
____________________________________________________________________" ____________________________________________________________________"
fi fi
if [[ "${amdcount}" -ge "1" ]]; then if [[ "${amdcount}" -ge "1" ]]; then
vendor2="AMD"
echo echo
REDBG " ------------------------------- " REDBG " ------------------------------- "
REDBG " [${amdcount}] AMD Graphics device(s) " REDBG " [${amdcount}] AMD Graphics device(s) "
REDBG " ------------------------------- " REDBG " ------------------------------- "
NC " NC "
${amdcards} ${amdcards}
____________________________________________________________________" ____________________________________________________________________"
fi fi
if [[ "${nvidiacount}" -ge "1" ]]; then if [[ "${nvidiacount}" -ge "1" ]]; then
vendor3="Nvidia"
echo echo
GREENBG " ------------------------------- " GREENBG " ------------------------------- "
GREENBG " [${nvidiacount}] Nvidia Graphics device(s) " GREENBG " [${nvidiacount}] Nvidia Graphics device(s) "
GREENBG " ------------------------------- " GREENBG " ------------------------------- "
NC " NC "
${nvidiacards} ${nvidiacards}
${cyan}### ${yellowl}Nvidia: ${nc}ONLY 'Maxwell' (NV110) or newer graphics are supported ${cyan}
### ${nc}Selecting ${yellowl}(n)o ${nc}defaults to the open-source ${yellowl}'nouveau' ${nc}driver
____________________________________________________________________" ____________________________________________________________________"
fi
YELLOW " YELLOW "
> Configure the Graphics subsystem and enable HW acceleration for : " > Install proprietary Nvidia drivers ? [Y/n] "
if [[ -n "${vendor1}" && -n "${vendor2}" ]]; then
NC "
[1] Intel
[2] AMD
[3] Both
[4] None "
BLUE " BLUE "
Enter a number: " Enter [Y/n]: "
read -r -p " read -r -p "
==> " vendor_slct ==> " nvdprop
case "${vendor_slct}" in nvdprop="${nvdprop:-y}"
1) nvdprop="${nvdprop,,}"
vendor="Intel" ;;
2)
vendor="AMD" ;;
3)
vendors="Intel & AMD" ;;
4)
vendor="none" ;;
"")
choice
return 1 ;;
*)
invalid
return 1 ;;
esac
elif [[ -n "${vendor1}" && -n "${vendor3}" ]]; then if [[ "${nvdprop}" == "n" ]]; then
NC " skip
elif [[ ! "${nvdprop}" =~ ^(y|n)$ ]]; then
[1] Intel invalid
${red}----------------------------------------------------${nc} return 1
[2] Nvidia ${red}### ${nc}Only for NV110 ${yellow}(Maxwell) ${nc}Graphics or newer ${red}###${nc} fi
${red}----------------------------------------------------${nc}
[3] Both
[4] None "
BLUE "
Enter a number: "
read -r -p "
==> " vendor_slct
case "${vendor_slct}" in
1)
vendor="Intel" ;;
2)
vendor="Nvidia" ;;
3)
vendors="Intel & Nvidia" ;;
4)
vendor="none" ;;
"")
choice
return 1 ;;
*)
invalid
return 1 ;;
esac
elif [[ -n "${vendor2}" && -n "${vendor3}" ]]; then
NC "
[1] Amd
${red}----------------------------------------------------${nc}
[2] Nvidia ${red}### ${nc}Only for NV110 ${yellow}(Maxwell) ${nc}Graphics or newer ${red}###${nc}
${red}----------------------------------------------------${nc}
[3] Both
[4] None "
BLUE "
Enter a number: "
read -r -p "
==> " vendor_slct
case "${vendor_slct}" in
1)
vendor="AMD" ;;
2)
vendor="Nvidia" ;;
3)
vendors="AMD & Nvidia" ;;
4)
vendor="none" ;;
"")
choice
return 1 ;;
*)
invalid
return 1 ;;
esac
fi fi
if [[ "${vendor}" =~ ^(intel|AMD)$ ]]; then
sourcetype="Open-source" multivendors=()
gfxconf="y" multisourcetype=()
if [[ "${intelcount}" -ge "1" ]]; then
multivendors+=(Intel)
multisourcetype+=(Open-source)
fi
if [[ "${amdcount}" -ge "1" ]]; then
multivendors+=(AMD)
multisourcetype+=(Open-source)
fi
if [[ "${nvidiacount}" -ge "1" ]]; then
multivendors+=(Nvidia)
if [[ "${nvdprop}" == "y" ]]; then
multisourcetype+=(Proprietary)
else
multisourcetype+=(Open-source)
fi
fi
vendors="${multivendors[*]}"
sourcetype="${multisourcetype[*]}"
if [[ "${sourcetype}" =~ "Open-source" && "${sourcetype}" =~ "Proprietary" ]]; then
sourcetype="Open-source & Proprietary"
elif [[ "${sourcetype}" =~ "Open-source" ]]; then
sourcetype="Open-source"
elif [[ "${sourcetype}" =~ "Proprietary" ]]; then
sourcetype="Proprietary"
fi
gfx_conf gfx_conf
elif [[ "${vendor}" == "Nvidia" ]]; then
sourcetype="Proprietary"
gfxconf="y"
gfx_conf
elif [[ "${vendors}" == "Intel & AMD" ]]; then
sourcetype="Open-source"
gfxconf="y"
gfx_conf
elif [[ "${vendors}" =~ ^(Intel & Nvidia|AMD & Nvidia)$ ]]; then
sourcetype="Open-source & Proprietary"
gfxconf="y"
gfx_conf
elif [[ "${vendor}" == "none" ]]; then
local prompt="Graphics Setup"
gfxconf="n"
skip
ok
fi
} }
################################################################################################### ###################################################################################################
gfx_conf() { gfx_conf() {
if [[ "${vendor}" != "none" ]]; then
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
### ${sourcetype} drivers will be used ### ${sourcetype} drivers will be used
" "
fi
if [[ "${vendor}" == "AMD" || "${vendors}" =~ "AMD" ]]; then if [[ "${vendor}" == "AMD" || "${vendors}" =~ "AMD" ]]; then
sleep 0.2 sleep 0.2
@@ -1897,7 +1796,8 @@ Enter a number ${bwhite}(empty to skip)${blue}: "
esac esac
fi fi
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
if [[ "${nvdprop}" == "y" ]]; then
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
> Select Nvidia architecture: " > Select Nvidia architecture: "
@@ -1985,7 +1885,7 @@ Enter [Y/n]: "
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
### ${vendor}${vendors} Graphics will be automatically configured ### Graphics will be automatically configured
" "
local prompt="Graphics Setup" local prompt="Graphics Setup"
ok ok
@@ -1996,71 +1896,69 @@ gfxpkgs_set() {
# Graphics packages # Graphics packages
gfxpkgs=() gfxpkgs=()
# Configure Graphics = yes # Intel Graphics
if [[ "${gfxconf}" == "y" ]]; then if [[ "${vendor}" == "Intel" || "${vendors}" =~ "Intel" ]]; then
# Intel Graphics # /etc/sysctl.d/99-sysctld.conf
if [[ "${vendor}" == "Intel" || "${vendors}" =~ "Intel" ]]; then perf_stream="dev.i915.perf_stream_paranoid = 0"
# /etc/sysctl.d/99-sysctld.conf gfxpkgs+=(intel-compute-runtime intel-media-driver intel-media-sdk libva-intel-driver libva-utils libvpl opencl-headers vpl-gpu-rt vkd3d vulkan-intel vulkan-mesa-layers)
perf_stream="dev.i915.perf_stream_paranoid = 0" fi
gfxpkgs+=(intel-compute-runtime intel-media-driver intel-media-sdk libva-intel-driver libva-utils libvpl opencl-headers vpl-gpu-rt vkd3d vulkan-intel vulkan-mesa-layers)
fi # AMD Graphics
# AMD Graphics if [[ "${vendor}" == "AMD" || "${vendors}" =~ "AMD" ]]; then
if [[ "${vendor}" == "AMD" || "${vendors}" =~ "AMD" ]]; then gfxpkgs+=(libva-mesa-driver mesa-utils mesa-vdpau opencl-headers rocm-opencl-runtime vkd3d vulkan-mesa-layers vulkan-radeon)
gfxpkgs+=(libva-mesa-driver mesa-utils mesa-vdpau opencl-headers rocm-opencl-runtime vkd3d vulkan-mesa-layers vulkan-radeon) fi
fi
# Nvidia Graphics # Nvidia Graphics
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then if [[ "${nvdprop}" == "y" ]]; then
# Swap partition|swapfile|zram-swap = yes # Swap partition|swapfile|zram-swap = yes
if [[ "${swapmode}" =~ ^(1|2|3)$ ]]; then if [[ "${swapmode}" =~ ^(1|2|3)$ ]]; then
sleep 0.2 sleep 0.2
CYAN " NC "
---------------------------------------------------------------- ----------------------------------------------------------------${cyan}
### ${yellowl}INFO: ${nc}When Hibernating ${cyan}### ### ${yellowl}INFO: ${nc}When Hibernating ${cyan}###
### ${nc}Nvidia's ${yellowl}'Preserve Video Memory after suspend' ${nc}feature ${cyan}### ### ${nc}Nvidia's ${yellowl}'Preserve Video Memory after suspend' ${nc}feature ${cyan}###
### ${nc}is incompatible with ${yellowl}'Early KMS' ${nc}use ${cyan}### ### ${nc}is incompatible with ${yellowl}'Early KMS' ${nc}use ${cyan}###${nc}
----------------------------------------------------------------" ----------------------------------------------------------------"
NC " NC "
${bwhite}Press any key to continue${nc} ${bwhite}Press any key to continue${nc}
" "
read -r -s -n 1 read -r -s -n 1
fi
gfxpkgs=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
# Turing+ GPUs
if [[ "${family}" == "1" ]]; then
# Linux Kernel
if [[ "${kernelnmbr}" == "1" ]]; then
nvname="nvidia-open"
gfxpkgs+=(nvidia-open)
# Other Kernels
else
gfxpkgs+=(nvidia-open-dkms)
fi fi
# Turing+ GPUs # Maxwell+ GPUs
if [[ "${family}" == "1" ]]; then elif [[ "${family}" == "2" ]]; then
# Linux Kernel # Linux Kernel
if [[ "${kernelnmbr}" == "1" ]]; then if [[ "${kernelnmbr}" == "1" ]]; then
nvname="nvidia-open" nvname="nvidia"
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-open nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d) gfxpkgs+=(nvidia)
# Other Kernels # Linux LTS Kernel
else elif [[ "${kernelnmbr}" == "2" ]]; then
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-open-dkms nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d) nvname="nvidia-lts"
fi gfxpkgs+=(nvidia-lts)
# Maxwell+ GPUs # Other Kernels
elif [[ "${family}" == "2" ]]; then else
# Linux Kernel gfxpkgs+=(nvidia-dkms)
if [[ "${kernelnmbr}" == "1" ]]; then
nvname="nvidia"
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
# Linux LTS Kernel
elif [[ "${kernelnmbr}" == "2" ]]; then
nvname="nvidia-lts"
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-lts nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
# Other Kernels
else
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-dkms nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
fi
fi fi
fi fi
# Configure Graphics = no elif [[ "${nvdprop}" == "n" ]]; then
elif [[ "${gfxconf}" == "n" ]]; then gfxpkgs+=(libva-mesa-driver vulkan-nouveau)
# Nvidia Graphics
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
gfxpkgs+=(libva-mesa-driver vulkan-nouveau)
fi
fi fi
} }
################################################################################################### ###################################################################################################
@@ -2510,7 +2408,7 @@ print_scan() {
${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Printer & Scanner Support${nc} ${magenta}]${nc}--------------------------------${magenta}### ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Printer & Scanner Support${nc} ${magenta}]${nc}--------------------------------${magenta}###
" "
local prompt="Printer & Scanner Support" local prompt="Printer & Scanner Support"
if [[ "${hypervisor}" == "none" ]]; then if [[ "${vendor}" != "Virtual Machine" ]]; then
if [[ ! "${desktop}" =~ ^(11|12)$ && -n "${desktop}" ]]; then if [[ ! "${desktop}" =~ ^(11|12)$ && -n "${desktop}" ]]; then
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
@@ -2582,7 +2480,7 @@ Enter [y/N]: "
################################################################################################### ###################################################################################################
boot_entr() { boot_entr() {
if [[ "${hypervisor}" != "none" ]]; then if [[ "${vendor}" == "Virtual Machine" ]]; then
efi_entr_del="yes" efi_entr_del="yes"
vm vm
sleep 0.2 sleep 0.2
@@ -2913,7 +2811,7 @@ Enter [v/y/N]: "
################################################################################################### ###################################################################################################
ask_wireless_regdom() { ask_wireless_regdom() {
if [[ "${hypervisor}" != "none" ]]; then if [[ "${vendor}" == "Virtual Machine" ]]; then
vm vm
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
@@ -3381,6 +3279,8 @@ Enter a number: "
sgdisk -o "${gptdrive}" > "${void}" && sgdisk -o "${gptdrive}" > "${void}" &&
parttable="$(fdisk -l "${gptdrive}" 2> "${void}" | grep '^Disklabel type' | awk "{print \$3}")" parttable="$(fdisk -l "${gptdrive}" 2> "${void}" | grep '^Disklabel type' | awk "{print \$3}")"
if [[ "${parttable}" == "gpt" ]]; then if [[ "${parttable}" == "gpt" ]]; then
multibooting="n"
nowarning="y"
gptok="yes" gptok="yes"
sleep 0.2 sleep 0.2
NC " NC "
@@ -3416,6 +3316,8 @@ ______________________________________________
gdisk "${gptdrive}" gdisk "${gptdrive}"
parttable="$(fdisk -l "${gptdrive}" 2> "${void}" | grep '^Disklabel type' | awk "{print \$3}")" parttable="$(fdisk -l "${gptdrive}" 2> "${void}" | grep '^Disklabel type' | awk "{print \$3}")"
if [[ "${parttable}" == "gpt" ]]; then if [[ "${parttable}" == "gpt" ]]; then
multibooting="n"
nowarning="y"
gptok="yes" gptok="yes"
sleep 0.2 sleep 0.2
NC " NC "
@@ -3466,6 +3368,8 @@ ______________________________________________
################################################################################################### ###################################################################################################
ask_multibooting() { ask_multibooting() {
[[ "${multibooting}" == "n" ]] && return 0
local prompt="MultiBoot Status" local prompt="MultiBoot Status"
sleep 0.2 sleep 0.2
NC " NC "
@@ -3475,13 +3379,13 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Multi
YELLOW " YELLOW "
> Are you Dual/Multi-Booting with other OS's ? [y/n] > Are you Dual/Multi-Booting with other OS's ? [y/n] "
### If ${nc}'(y)es'${yellow} then: "
CYAN " CYAN "
### ${nc}If ${yellowl}'(y)es'${nc} then:${cyan}
>> ${nc}Your ${yellowl}EFI ${nc}System Partition (ESP) will stay ${yellowl}intact${nc}${cyan} >> ${nc}Your ${yellowl}EFI ${nc}System Partition (ESP) will stay ${yellowl}intact${nc}${cyan}
>> ${nc}Only ${yellowl}Manual ${nc}Disk Partitioning will be available for ${yellowl}Disk Management >> ${nc}Only ${yellowl}Manual ${nc}Disk Partitioning will be available for ${yellowl}Disk Management
@@ -3573,12 +3477,14 @@ auto_part() {
${magenta}###${nc}---------------------------------${magenta}[ ${bwhite}Automatic Partitioning${nc} ${magenta}]${nc}---------------------------------${magenta}### ${magenta}###${nc}---------------------------------${magenta}[ ${bwhite}Automatic Partitioning${nc} ${magenta}]${nc}---------------------------------${magenta}###
" "
if [[ -e "${instl_drive}" ]]; then if [[ -e "${instl_drive}" ]]; then
sleep 0.2 if [[ -z "${nowarning}" ]]; then
line2 sleep 0.2
REDBG " ------------------------------------------------------------ " line2
REDBG " [!] WARNING: All data on selected disk will be destroyed [!] " REDBG " ------------------------------------------------------------ "
REDBG " ------------------------------------------------------------ " REDBG " [!] WARNING: All data on selected disk will be destroyed [!] "
line2 REDBG " ------------------------------------------------------------ "
line2
fi
sgdsk_nmbr="${instl_dsk_nmbr}" sgdsk_nmbr="${instl_dsk_nmbr}"
sgdrive="$(echo "${disks}" | awk "\$1 == ${sgdsk_nmbr} {print \$2}")" sgdrive="$(echo "${disks}" | awk "\$1 == ${sgdsk_nmbr} {print \$2}")"
capacity="$(fdisk -l "${sgdrive}" | grep -E 'bytes' | grep -E 'Disk' | awk "{print \$5}")" capacity="$(fdisk -l "${sgdrive}" | grep -E 'bytes' | grep -E 'Disk' | awk "{print \$5}")"
@@ -3704,12 +3610,14 @@ manual_presets() {
${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Preset Selection${nc} ${magenta}]${nc}------------------------------------${magenta}### ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Preset Selection${nc} ${magenta}]${nc}------------------------------------${magenta}###
" "
sleep 0.2 if [[ -z "${nowarning}" ]]; then
line2 sleep 0.2
REDBG " ------------------------------------------------------------ " line2
REDBG " [!] WARNING: All data on selected disk will be destroyed [!] " REDBG " ------------------------------------------------------------ "
REDBG " ------------------------------------------------------------ " REDBG " [!] WARNING: All data on selected disk will be destroyed [!] "
line2 REDBG " ------------------------------------------------------------ "
line2
fi
YELLOW " YELLOW "
> Select a Partition Layout Preset: " > Select a Partition Layout Preset: "
@@ -4931,7 +4839,7 @@ instl() {
until slct_swap; do : ; done until slct_swap; do : ; done
fi fi
if [[ "${hypervisor}" == "none" && -z "${gfx_slct}" ]]; then if [[ "${vendor}" != "Virtual Machine" && -z "${gfx_slct}" ]]; then
local stage_prompt="Graphics Setup" local stage_prompt="Graphics Setup"
completion_err completion_err
until dtct_gfx; do : ; done until dtct_gfx; do : ; done
@@ -4951,7 +4859,7 @@ instl() {
fi fi
fi fi
if [[ "${hypervisor}" == "none" ]]; then if [[ "${vendor}" != "Virtual Machine" ]]; then
if [[ -z "${printer}" ]]; then if [[ -z "${printer}" ]]; then
if [[ ! "${desktop}" =~ ^(11|12)$ ]]; then if [[ ! "${desktop}" =~ ^(11|12)$ ]]; then
until print_scan; do : ; done until print_scan; do : ; done
@@ -4968,20 +4876,22 @@ instl() {
local stage_prompt="Optimizations" local stage_prompt="Optimizations"
completion_err completion_err
until ask_optm; do : ; done until ask_optm; do : ; done
if [[ "${askoptm}" == "y" ]]; then if [[ "${askoptm}" == "y" ]]; then
until cust_kern_param; do : ; done until cust_kern_param; do : ; done
until sys_watchdog; do : ; done until sys_watchdog; do : ; done
until gen_optm; do : ; done until gen_optm; do : ; done
if [[ "${hypervisor}" == "none" ]]; then if [[ "${vendor}" != "Virtual Machine" ]]; then
until ask_wireless_regdom; do : ; done until ask_wireless_regdom; do : ; done
fi fi
until systemd_oomd; do : ; done until systemd_oomd; do : ; done
until irqbalance; do : ; done until irqbalance; do : ; done
until thermald; do : ; done until thermald; do : ; done
until rngd; do : ; done until rngd; do : ; done
until rtkit; do : ; done until rtkit; do : ; done
if [[ "${vendor}" != "Virtual Machine" ]]; then
until tlp; do : ; done until tlp; do : ; done
fi fi
fi
fi fi
until instl_dsk; do : ; done until instl_dsk; do : ; done
until ask_crypt; do : ; done until ask_crypt; do : ; done
@@ -5920,27 +5830,23 @@ ${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="" partok="" preset="" 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="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="") reset=(xbootloader="" desktop="" terminal="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" autoroot="" autoxboot="" autohome="" autoswap="" lowlat="" nogsp="" sanity="" partok="" preset="" 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="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="")
export "${reset[@]}" export "${reset[@]}"
gfxpkgs=() gfxpkgs=()
if [[ "${hypervisor}" != "none" ]]; then
vendor="Virtual Machine"
gfxconf="n"
fi
until slct_krnl; do : ; done until slct_krnl; do : ; done
until ask_sign; do : ; done until ask_sign; do : ; done
until slct_bootldr; do : ; done until slct_bootldr; do : ; done
until slct_espmnt; do : ; done until slct_espmnt; do : ; done
until slct_fs; do : ; done until slct_fs; do : ; done
until slct_swap; do : ; done until slct_swap; do : ; done
if [[ "${hypervisor}" == "none" ]]; then if [[ "${vendor}" != "Virtual Machine" ]]; then
until dtct_gfx; do : ; done until dtct_gfx; do : ; done
fi fi
until dsktp_slct; do : ; done until dsktp_slct; do : ; done
until base_devel; do : ; done until base_devel; do : ; done
until web_browser; do : ; done until web_browser; do : ; done
if [[ "${hypervisor}" == "none" ]]; then if [[ "${vendor}" != "Virtual Machine" ]]; then
until print_scan; do : ; done until print_scan; do : ; done
until boot_entr; do : ; done until boot_entr; do : ; done
fi fi
@@ -5948,7 +5854,7 @@ revise() {
until cust_kern_param; do : ; done until cust_kern_param; do : ; done
until sys_watchdog; do : ; done until sys_watchdog; do : ; done
until gen_optm; do : ; done until gen_optm; do : ; done
if [[ "${hypervisor}" == "none" ]]; then if [[ "${vendor}" != "Virtual Machine" ]]; then
until ask_wireless_regdom; do : ; done until ask_wireless_regdom; do : ; done
fi fi
until systemd_oomd; do : ; done until systemd_oomd; do : ; done
@@ -5956,7 +5862,9 @@ revise() {
until thermald; do : ; done until thermald; do : ; done
until rngd; do : ; done until rngd; do : ; done
until rtkit; do : ; done until rtkit; do : ; done
until tlp; do : ; done if [[ "${vendor}" != "Virtual Machine" ]]; then
until tlp; do : ; done
fi
fi fi
until instl_dsk; do : ; done until instl_dsk; do : ; done
until ask_crypt; do : ; done until ask_crypt; do : ; done
@@ -6382,7 +6290,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
if [[ -n "${gfxpkgs[*]}" ]]; then if [[ -n "${gfxpkgs[*]}" ]]; then
basepkgs+=("${gfxpkgs[*]}") basepkgs+=("${gfxpkgs[*]}")
fi fi
if [[ "${vendor}" == "Nvidia" ]]; then if [[ "${nvdprop}" == "y" ]]; then
basepkgs+=("${kernel}-headers") basepkgs+=("${kernel}-headers")
fi fi
if [[ -n "${devel}" ]]; then if [[ -n "${devel}" ]]; then
@@ -6429,7 +6337,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
displaymanager="lightdm" ;; displaymanager="lightdm" ;;
8) # Budgie Desktop: 8) # Budgie Desktop:
deskpkgs="${basepkgs[*]} blueman budgie gnome-user-share gtk-engine-murrine lightdm-gtk-greeter materia-gtk-theme nautilus network-manager-applet openssh papirus-icon-theme power-profiles-daemon rygel" deskpkgs="${basepkgs[*]} blueman budgie gnome-user-share gtk-engine-murrine lightdm-gtk-greeter materia-gtk-theme nemo network-manager-applet openssh papirus-icon-theme power-profiles-daemon rygel"
displaymanager="lightdm" ;; displaymanager="lightdm" ;;
9) # Lxqt Desktop: 9) # Lxqt Desktop:
@@ -6463,6 +6371,9 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
if [[ -n "${gfxpkgs[*]}" ]]; then if [[ -n "${gfxpkgs[*]}" ]]; then
custarray+=("${gfxpkgs[*]}") custarray+=("${gfxpkgs[*]}")
fi fi
if [[ "${nvdprop}" == "y" ]]; then
custarray+=("${kernel}-headers")
fi
if [[ "${greeternmbr}" =~ ^(1|2|3)$ ]]; then if [[ "${greeternmbr}" =~ ^(1|2|3)$ ]]; then
custarray+=("${greeter}") custarray+=("${greeter}")
fi fi
@@ -6687,7 +6598,7 @@ GRUB_BTRFSD
fi fi
fi fi
if [[ "${gfxconf}" == "y" && "${vendor}" == "Nvidia" ]]; then if [[ "${nvdprop}" == "y" ]]; then
local stage_prompt="Grub/Nvidia Configuration" local stage_prompt="Grub/Nvidia Configuration"
if arch-chroot /mnt <<-NVGRUB > "${void}" 2>&1 2> "${log}" ; then if arch-chroot /mnt <<-NVGRUB > "${void}" 2>&1 2> "${log}" ; then
sed -i "/^#GRUB_TERMINAL_OUTPUT=console/s/^#//" /etc/default/grub || exit sed -i "/^#GRUB_TERMINAL_OUTPUT=console/s/^#//" /etc/default/grub || exit
@@ -6759,32 +6670,30 @@ ZRAMCONF
################################################################################################### ###################################################################################################
nvidia_hook() { nvidia_hook() {
if [[ "${gfxconf}" == "y" && "${vendor}" == "Nvidia" ]] || [[ "${gfxconf}" == "y" && "${vendors}" =~ "Nvidia" ]]; then if [[ "${nvdprop}" == "y" && -n "${nvname}" ]]; then
if [[ "${nvname}" =~ ^(nvidia-open|nvidia|nvidia-lts)$ ]]; then local stage_prompt="Nvidia Hook Creation"
local stage_prompt="Nvidia Hook Creation" if arch-chroot /mnt <<-NVIDIAHOOK > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-NVIDIAHOOK > "${void}" 2>&1 2> "${log}" ; then mkdir -p /etc/pacman.d/hooks/ || exit
mkdir -p /etc/pacman.d/hooks/ || exit cat <<-HOOK > /etc/pacman.d/hooks/nvidia.hook || exit
cat <<-HOOK > /etc/pacman.d/hooks/nvidia.hook || exit [Trigger]
[Trigger] Operation=Install
Operation=Install Operation=Upgrade
Operation=Upgrade Operation=Remove
Operation=Remove Type=Package
Type=Package Target=${nvname}
Target=${nvname} Target=${kernel}
Target=${kernel}
[Action] [Action]
Description=Update NVIDIA module in initcpio Description=Update NVIDIA module in initcpio
Depends=mkinitcpio Depends=mkinitcpio
When=PostTransaction When=PostTransaction
NeedsTargets NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux*) exit 0; esac; done; /usr/bin/mkinitcpio -P' Exec=/bin/sh -c 'while read -r trg; do case $trg in linux*) exit 0; esac; done; /usr/bin/mkinitcpio -P'
HOOK HOOK
NVIDIAHOOK NVIDIAHOOK
stage_ok stage_ok
else else
stage_fail stage_fail
fi
fi fi
fi fi
} }
@@ -7290,10 +7199,10 @@ set_vars() {
fi fi
# HOOKS SETUP (Encryption) # HOOKS SETUP (Encryption)
# Nvidia Vendor # Nvidia Proprietary Driver
if [[ "${vendor}" == "Nvidia" ]]; then if [[ "${nvdprop}" == "y" ]]; then
HOOKS+=(systemd keyboard autodetect microcode modconf sd-vconsole block sd-encrypt filesystems) HOOKS+=(systemd keyboard autodetect microcode modconf sd-vconsole block sd-encrypt filesystems)
# Other Vendors / Multi-Vendors # Open-source Drivers
else else
HOOKS+=(systemd keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt filesystems) HOOKS+=(systemd keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt filesystems)
fi fi
@@ -7314,10 +7223,10 @@ set_vars() {
# ENCRYPTION = 'NO' # ENCRYPTION = 'NO'
elif [[ "${encrypt}" == "no" ]]; then elif [[ "${encrypt}" == "no" ]]; then
# HOOKS SETUP # HOOKS SETUP
# Nvidia Vendor # Nvidia Proprietary Driver
if [[ "${vendor}" == "Nvidia" ]]; then if [[ "${nvdprop}" == "y" ]]; then
HOOKS+=(systemd autodetect microcode modconf keyboard sd-vconsole block filesystems) HOOKS+=(systemd autodetect microcode modconf keyboard sd-vconsole block filesystems)
# Other Vendors / Multi-Vendors # Open-source Drivers
else else
HOOKS+=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems) HOOKS+=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems)
fi fi
@@ -7333,10 +7242,10 @@ set_vars() {
fi fi
fi fi
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# GFX CONFIGURATION = 'YES' # GFX CONFIGURATION
if [[ "${gfxconf}" == "y" ]]; then
# Nvidia # Nvidia
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then if [[ "${nvdprop}" == "y" ]]; then
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
gfx_bootopts+=(nvidia.NVreg_UsePageAttributeTable=1) gfx_bootopts+=(nvidia.NVreg_UsePageAttributeTable=1)
@@ -7364,7 +7273,6 @@ set_vars() {
gfx_bootopts+=(amdgpu.dc=1 radeon.cik_support=0 amdgpu.cik_support=1) gfx_bootopts+=(amdgpu.dc=1 radeon.cik_support=0 amdgpu.cik_support=1)
fi fi
fi fi
fi
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# MAIN KERNEL PARAMETERS # MAIN KERNEL PARAMETERS
if [[ -n "${gfx_bootopts[*]}" ]]; then if [[ -n "${gfx_bootopts[*]}" ]]; then
@@ -7398,7 +7306,7 @@ chroot_conf() {
${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Chroot & Configure System${nc} ${magenta}]${nc}--------------------------------${magenta}###${nc} ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Chroot & Configure System${nc} ${magenta}]${nc}--------------------------------${magenta}###${nc}
" "
# All Desktop Configuration: # Desktops Configuration:
if [[ "${desktop}" != "12" ]]; then if [[ "${desktop}" != "12" ]]; then
cnfg cnfg
main_chroot main_chroot
@@ -7434,16 +7342,14 @@ SLICK
fi fi
fi fi
if [[ "${vendor}" != "Virtual Machine" ]]; then if [[ "${vendor}" != "Virtual Machine" && "${desktop}" != "11" ]]; then
if [[ ! "${desktop}" =~ ^(11|12)$ ]]; then local stage_prompt="Bluetooth Services Activation"
local stage_prompt="Bluetooth Services Activation" if arch-chroot /mnt <<-BLUETOOTH > "${void}" 2>&1 2> "${log}" ; then
if arch-chroot /mnt <<-BLUETOOTH > "${void}" 2>&1 2> "${log}" ; then systemctl enable bluetooth || exit
systemctl enable bluetooth || exit
BLUETOOTH BLUETOOTH
stage_ok stage_ok
else else
stage_fail stage_fail
fi
fi fi
fi fi
@@ -7543,7 +7449,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="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="") vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vendor="" vendors="" 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="" 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="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="")
export "${vars[@]}" export "${vars[@]}"
sleep 0.2 sleep 0.2
CYANBG "************************************************************************************************* " CYANBG "************************************************************************************************* "