mirror of
https://gitlab.com/prism7/archery.git
synced 2026-04-28 01:17:35 +02:00
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:
@@ -2,7 +2,7 @@
|
||||
|
||||
# Amelia Installer
|
||||
# Source: https://gitlab.com/prism7/archery
|
||||
# Version: 9.8.4
|
||||
# Version: 9.9.0
|
||||
|
||||
set -euo pipefail
|
||||
###################################################################################################
|
||||
@@ -542,10 +542,9 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Machi
|
||||
hardw_vendor="$(hostnamectl | grep -E "Hardware Vendor" | awk "{print \$3}")"
|
||||
machine="$(hostnamectl | grep -Em 1 "Chassis" | awk "{print \$2}")"
|
||||
|
||||
if [[ "${hypervisor}" != "none" ]]; then
|
||||
if [[ "${hypervisor}" == "none" ]]; then # <<<<<<<<<<
|
||||
vm
|
||||
vendor="Virtual Machine"
|
||||
gfxconf="n"
|
||||
fi
|
||||
|
||||
if [[ "${CPU}" == *"GenuineIntel"* ]]; then
|
||||
@@ -1570,10 +1569,8 @@ Enter Swap size ${bwhite}(in GB)${blue}: "
|
||||
dtct_gfx() {
|
||||
|
||||
gfx_slct="yes"
|
||||
vendor=""
|
||||
vendors=""
|
||||
if [[ "${hypervisor}" != "none" ]]; then
|
||||
vendor="Virtual Machine"
|
||||
|
||||
if [[ "${vendor}" == "Virtual Machine" ]]; then
|
||||
vm
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
@@ -1581,7 +1578,7 @@ dtct_gfx() {
|
||||
--> Graphics Setup skipped
|
||||
"
|
||||
return 0
|
||||
else
|
||||
fi
|
||||
sleep 0.2
|
||||
NC "
|
||||
|
||||
@@ -1602,7 +1599,6 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Grap
|
||||
else
|
||||
dtct_multi_gfx
|
||||
fi
|
||||
fi
|
||||
}
|
||||
###################################################################################################
|
||||
dtct_single_gfx() {
|
||||
@@ -1619,242 +1615,145 @@ dtct_single_gfx() {
|
||||
amd
|
||||
elif [[ "${nvidiacount}" -eq "1" ]]; then
|
||||
vendor="Nvidia"
|
||||
sourcetype="Proprietary"
|
||||
nvidia
|
||||
fi
|
||||
|
||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||
sleep 0.2
|
||||
RED "
|
||||
----------------------------------------------------
|
||||
### ${nc}Only for NV110 ${yellow}(Maxwell) ${nc}Graphics or newer ${red}###
|
||||
----------------------------------------------------"
|
||||
fi
|
||||
YELLOW "
|
||||
> Configure the Graphics subsystem and enable HW acceleration ? [Y/n] "
|
||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||
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' "
|
||||
YELLOW "
|
||||
|
||||
|
||||
### Selecting ${nc}'(n)o' ${yellow}defaults to using the open-source ${nc}'nouveau' ${yellow}driver"
|
||||
fi
|
||||
> Install proprietary Nvidia drivers ? [Y/n] "
|
||||
BLUE "
|
||||
|
||||
|
||||
Enter [Y/n]: "
|
||||
read -r -p "
|
||||
==> " gfxconf
|
||||
==> " nvdprop
|
||||
|
||||
gfxconf="${gfxconf:-y}"
|
||||
gfxconf="${gfxconf,,}"
|
||||
nvdprop="${nvdprop:-y}"
|
||||
nvdprop="${nvdprop,,}"
|
||||
|
||||
if [[ "${gfxconf}" == "y" ]]; then
|
||||
gfx_conf
|
||||
elif [[ "${gfxconf}" == "n" ]]; then
|
||||
local prompt="Graphics Setup"
|
||||
if [[ "${nvdprop}" == "y" ]]; then
|
||||
sourcetype="Proprietary"
|
||||
elif [[ "${nvdprop}" == "n" ]]; then
|
||||
sourcetype="Open-source"
|
||||
skip
|
||||
ok
|
||||
else
|
||||
elif [[ ! "${nvdprop}" =~ ^(y|n)$ ]]; then
|
||||
invalid
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
gfx_conf
|
||||
}
|
||||
###################################################################################################
|
||||
dtct_multi_gfx() {
|
||||
|
||||
if [[ "${gfxcount}" == "2" ]]; then
|
||||
gfx_setup="Dual"
|
||||
elif [[ "${gfxcount}" == "3" ]]; then
|
||||
gfx_setup="Triple"
|
||||
fi
|
||||
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
|
||||
### ${gfx_setup} Graphics setup detected, consisting of: "
|
||||
### Multi Graphics Setup detected, consisting of: "
|
||||
NC "
|
||||
|
||||
____________________________________________________________________"
|
||||
|
||||
if [[ "${intelcount}" -ge "1" ]]; then
|
||||
vendor1="Intel"
|
||||
echo
|
||||
BLUEBG " ------------------------------- "
|
||||
BLUEBG " [${intelcount}] Intel Graphics device(s) "
|
||||
BLUEBG " ------------------------------- "
|
||||
NC "
|
||||
|
||||
${intelcards}
|
||||
|
||||
____________________________________________________________________"
|
||||
fi
|
||||
|
||||
if [[ "${amdcount}" -ge "1" ]]; then
|
||||
vendor2="AMD"
|
||||
echo
|
||||
REDBG " ------------------------------- "
|
||||
REDBG " [${amdcount}] AMD Graphics device(s) "
|
||||
REDBG " ------------------------------- "
|
||||
NC "
|
||||
|
||||
${amdcards}
|
||||
|
||||
____________________________________________________________________"
|
||||
fi
|
||||
|
||||
if [[ "${nvidiacount}" -ge "1" ]]; then
|
||||
vendor3="Nvidia"
|
||||
echo
|
||||
GREENBG " ------------------------------- "
|
||||
GREENBG " [${nvidiacount}] Nvidia Graphics device(s) "
|
||||
GREENBG " ------------------------------- "
|
||||
NC "
|
||||
|
||||
${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 "
|
||||
|
||||
> Configure the Graphics subsystem and enable HW acceleration for : "
|
||||
|
||||
if [[ -n "${vendor1}" && -n "${vendor2}" ]]; then
|
||||
NC "
|
||||
|
||||
[1] Intel
|
||||
|
||||
[2] AMD
|
||||
|
||||
[3] Both
|
||||
|
||||
[4] None "
|
||||
> Install proprietary Nvidia drivers ? [Y/n] "
|
||||
BLUE "
|
||||
|
||||
|
||||
Enter a number: "
|
||||
Enter [Y/n]: "
|
||||
read -r -p "
|
||||
==> " vendor_slct
|
||||
==> " nvdprop
|
||||
|
||||
case "${vendor_slct}" in
|
||||
1)
|
||||
vendor="Intel" ;;
|
||||
2)
|
||||
vendor="AMD" ;;
|
||||
3)
|
||||
vendors="Intel & AMD" ;;
|
||||
4)
|
||||
vendor="none" ;;
|
||||
"")
|
||||
choice
|
||||
return 1 ;;
|
||||
*)
|
||||
invalid
|
||||
return 1 ;;
|
||||
esac
|
||||
nvdprop="${nvdprop:-y}"
|
||||
nvdprop="${nvdprop,,}"
|
||||
|
||||
elif [[ -n "${vendor1}" && -n "${vendor3}" ]]; then
|
||||
NC "
|
||||
|
||||
[1] Intel
|
||||
${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="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
|
||||
if [[ "${vendor}" =~ ^(intel|AMD)$ ]]; then
|
||||
sourcetype="Open-source"
|
||||
gfxconf="y"
|
||||
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"
|
||||
if [[ "${nvdprop}" == "n" ]]; then
|
||||
skip
|
||||
ok
|
||||
elif [[ ! "${nvdprop}" =~ ^(y|n)$ ]]; then
|
||||
invalid
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
multivendors=()
|
||||
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() {
|
||||
|
||||
if [[ "${vendor}" != "none" ]]; then
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
|
||||
|
||||
### ${sourcetype} drivers will be used
|
||||
"
|
||||
fi
|
||||
|
||||
if [[ "${vendor}" == "AMD" || "${vendors}" =~ "AMD" ]]; then
|
||||
sleep 0.2
|
||||
@@ -1897,7 +1796,8 @@ Enter a number ${bwhite}(empty to skip)${blue}: "
|
||||
esac
|
||||
fi
|
||||
|
||||
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
|
||||
|
||||
if [[ "${nvdprop}" == "y" ]]; then
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
> Select Nvidia architecture: "
|
||||
@@ -1985,7 +1885,7 @@ Enter [Y/n]: "
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
|
||||
### ${vendor}${vendors} Graphics will be automatically configured
|
||||
### Graphics will be automatically configured
|
||||
"
|
||||
local prompt="Graphics Setup"
|
||||
ok
|
||||
@@ -1996,30 +1896,30 @@ gfxpkgs_set() {
|
||||
# Graphics packages
|
||||
gfxpkgs=()
|
||||
|
||||
# Configure Graphics = yes
|
||||
if [[ "${gfxconf}" == "y" ]]; then
|
||||
# Intel Graphics
|
||||
if [[ "${vendor}" == "Intel" || "${vendors}" =~ "Intel" ]]; then
|
||||
# /etc/sysctl.d/99-sysctld.conf
|
||||
perf_stream="dev.i915.perf_stream_paranoid = 0"
|
||||
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
|
||||
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)
|
||||
fi
|
||||
|
||||
# Nvidia Graphics
|
||||
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
|
||||
if [[ "${nvdprop}" == "y" ]]; then
|
||||
# Swap partition|swapfile|zram-swap = yes
|
||||
if [[ "${swapmode}" =~ ^(1|2|3)$ ]]; then
|
||||
sleep 0.2
|
||||
CYAN "
|
||||
----------------------------------------------------------------
|
||||
NC "
|
||||
----------------------------------------------------------------${cyan}
|
||||
### ${yellowl}INFO: ${nc}When Hibernating ${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 "
|
||||
|
||||
@@ -2029,39 +1929,37 @@ gfxpkgs_set() {
|
||||
"
|
||||
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+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-open nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
|
||||
gfxpkgs+=(nvidia-open)
|
||||
# Other Kernels
|
||||
else
|
||||
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-open-dkms nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
|
||||
gfxpkgs+=(nvidia-open-dkms)
|
||||
fi
|
||||
# Maxwell+ GPUs
|
||||
elif [[ "${family}" == "2" ]]; then
|
||||
# Linux Kernel
|
||||
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)
|
||||
gfxpkgs+=(nvidia)
|
||||
# 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)
|
||||
gfxpkgs+=(nvidia-lts)
|
||||
# Other Kernels
|
||||
else
|
||||
gfxpkgs+=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-dkms nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d)
|
||||
gfxpkgs+=(nvidia-dkms)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# Configure Graphics = no
|
||||
elif [[ "${gfxconf}" == "n" ]]; then
|
||||
# Nvidia Graphics
|
||||
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
|
||||
elif [[ "${nvdprop}" == "n" ]]; then
|
||||
gfxpkgs+=(libva-mesa-driver vulkan-nouveau)
|
||||
fi
|
||||
fi
|
||||
}
|
||||
###################################################################################################
|
||||
dsktp_setup() {
|
||||
@@ -2510,7 +2408,7 @@ print_scan() {
|
||||
${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Printer & Scanner Support${nc} ${magenta}]${nc}--------------------------------${magenta}###
|
||||
"
|
||||
local prompt="Printer & Scanner Support"
|
||||
if [[ "${hypervisor}" == "none" ]]; then
|
||||
if [[ "${vendor}" != "Virtual Machine" ]]; then
|
||||
if [[ ! "${desktop}" =~ ^(11|12)$ && -n "${desktop}" ]]; then
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
@@ -2582,7 +2480,7 @@ Enter [y/N]: "
|
||||
###################################################################################################
|
||||
boot_entr() {
|
||||
|
||||
if [[ "${hypervisor}" != "none" ]]; then
|
||||
if [[ "${vendor}" == "Virtual Machine" ]]; then
|
||||
efi_entr_del="yes"
|
||||
vm
|
||||
sleep 0.2
|
||||
@@ -2913,7 +2811,7 @@ Enter [v/y/N]: "
|
||||
###################################################################################################
|
||||
ask_wireless_regdom() {
|
||||
|
||||
if [[ "${hypervisor}" != "none" ]]; then
|
||||
if [[ "${vendor}" == "Virtual Machine" ]]; then
|
||||
vm
|
||||
sleep 0.2
|
||||
YELLOW "
|
||||
@@ -3381,6 +3279,8 @@ Enter a number: "
|
||||
sgdisk -o "${gptdrive}" > "${void}" &&
|
||||
parttable="$(fdisk -l "${gptdrive}" 2> "${void}" | grep '^Disklabel type' | awk "{print \$3}")"
|
||||
if [[ "${parttable}" == "gpt" ]]; then
|
||||
multibooting="n"
|
||||
nowarning="y"
|
||||
gptok="yes"
|
||||
sleep 0.2
|
||||
NC "
|
||||
@@ -3416,6 +3316,8 @@ ______________________________________________
|
||||
gdisk "${gptdrive}"
|
||||
parttable="$(fdisk -l "${gptdrive}" 2> "${void}" | grep '^Disklabel type' | awk "{print \$3}")"
|
||||
if [[ "${parttable}" == "gpt" ]]; then
|
||||
multibooting="n"
|
||||
nowarning="y"
|
||||
gptok="yes"
|
||||
sleep 0.2
|
||||
NC "
|
||||
@@ -3466,6 +3368,8 @@ ______________________________________________
|
||||
###################################################################################################
|
||||
ask_multibooting() {
|
||||
|
||||
[[ "${multibooting}" == "n" ]] && return 0
|
||||
|
||||
local prompt="MultiBoot Status"
|
||||
sleep 0.2
|
||||
NC "
|
||||
@@ -3475,13 +3379,13 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Multi
|
||||
YELLOW "
|
||||
|
||||
|
||||
> Are you Dual/Multi-Booting with other OS's ? [y/n]
|
||||
|
||||
|
||||
|
||||
### If ${nc}'(y)es'${yellow} then: "
|
||||
> Are you Dual/Multi-Booting with other OS's ? [y/n] "
|
||||
CYAN "
|
||||
|
||||
|
||||
### ${nc}If ${yellowl}'(y)es'${nc} then:${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
|
||||
@@ -3573,12 +3477,14 @@ auto_part() {
|
||||
${magenta}###${nc}---------------------------------${magenta}[ ${bwhite}Automatic Partitioning${nc} ${magenta}]${nc}---------------------------------${magenta}###
|
||||
"
|
||||
if [[ -e "${instl_drive}" ]]; then
|
||||
if [[ -z "${nowarning}" ]]; then
|
||||
sleep 0.2
|
||||
line2
|
||||
REDBG " ------------------------------------------------------------ "
|
||||
REDBG " [!] WARNING: All data on selected disk will be destroyed [!] "
|
||||
REDBG " ------------------------------------------------------------ "
|
||||
line2
|
||||
fi
|
||||
sgdsk_nmbr="${instl_dsk_nmbr}"
|
||||
sgdrive="$(echo "${disks}" | awk "\$1 == ${sgdsk_nmbr} {print \$2}")"
|
||||
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}###
|
||||
"
|
||||
if [[ -z "${nowarning}" ]]; then
|
||||
sleep 0.2
|
||||
line2
|
||||
REDBG " ------------------------------------------------------------ "
|
||||
REDBG " [!] WARNING: All data on selected disk will be destroyed [!] "
|
||||
REDBG " ------------------------------------------------------------ "
|
||||
line2
|
||||
fi
|
||||
YELLOW "
|
||||
|
||||
> Select a Partition Layout Preset: "
|
||||
@@ -4931,7 +4839,7 @@ instl() {
|
||||
until slct_swap; do : ; done
|
||||
fi
|
||||
|
||||
if [[ "${hypervisor}" == "none" && -z "${gfx_slct}" ]]; then
|
||||
if [[ "${vendor}" != "Virtual Machine" && -z "${gfx_slct}" ]]; then
|
||||
local stage_prompt="Graphics Setup"
|
||||
completion_err
|
||||
until dtct_gfx; do : ; done
|
||||
@@ -4951,7 +4859,7 @@ instl() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${hypervisor}" == "none" ]]; then
|
||||
if [[ "${vendor}" != "Virtual Machine" ]]; then
|
||||
if [[ -z "${printer}" ]]; then
|
||||
if [[ ! "${desktop}" =~ ^(11|12)$ ]]; then
|
||||
until print_scan; do : ; done
|
||||
@@ -4972,7 +4880,7 @@ instl() {
|
||||
until cust_kern_param; do : ; done
|
||||
until sys_watchdog; do : ; done
|
||||
until gen_optm; do : ; done
|
||||
if [[ "${hypervisor}" == "none" ]]; then
|
||||
if [[ "${vendor}" != "Virtual Machine" ]]; then
|
||||
until ask_wireless_regdom; do : ; done
|
||||
fi
|
||||
until systemd_oomd; do : ; done
|
||||
@@ -4980,9 +4888,11 @@ instl() {
|
||||
until thermald; do : ; done
|
||||
until rngd; do : ; done
|
||||
until rtkit; do : ; done
|
||||
if [[ "${vendor}" != "Virtual Machine" ]]; then
|
||||
until tlp; do : ; done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
until instl_dsk; do : ; done
|
||||
until ask_crypt; do : ; done
|
||||
|
||||
@@ -5920,27 +5830,23 @@ ${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="" 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[@]}"
|
||||
gfxpkgs=()
|
||||
|
||||
if [[ "${hypervisor}" != "none" ]]; then
|
||||
vendor="Virtual Machine"
|
||||
gfxconf="n"
|
||||
fi
|
||||
until slct_krnl; do : ; done
|
||||
until ask_sign; do : ; done
|
||||
until slct_bootldr; do : ; done
|
||||
until slct_espmnt; do : ; done
|
||||
until slct_fs; do : ; done
|
||||
until slct_swap; do : ; done
|
||||
if [[ "${hypervisor}" == "none" ]]; then
|
||||
if [[ "${vendor}" != "Virtual Machine" ]]; then
|
||||
until dtct_gfx; do : ; done
|
||||
fi
|
||||
until dsktp_slct; do : ; done
|
||||
until base_devel; do : ; done
|
||||
until web_browser; do : ; done
|
||||
if [[ "${hypervisor}" == "none" ]]; then
|
||||
if [[ "${vendor}" != "Virtual Machine" ]]; then
|
||||
until print_scan; do : ; done
|
||||
until boot_entr; do : ; done
|
||||
fi
|
||||
@@ -5948,7 +5854,7 @@ revise() {
|
||||
until cust_kern_param; do : ; done
|
||||
until sys_watchdog; do : ; done
|
||||
until gen_optm; do : ; done
|
||||
if [[ "${hypervisor}" == "none" ]]; then
|
||||
if [[ "${vendor}" != "Virtual Machine" ]]; then
|
||||
until ask_wireless_regdom; do : ; done
|
||||
fi
|
||||
until systemd_oomd; do : ; done
|
||||
@@ -5956,8 +5862,10 @@ revise() {
|
||||
until thermald; do : ; done
|
||||
until rngd; do : ; done
|
||||
until rtkit; do : ; done
|
||||
if [[ "${vendor}" != "Virtual Machine" ]]; then
|
||||
until tlp; do : ; done
|
||||
fi
|
||||
fi
|
||||
until instl_dsk; do : ; done
|
||||
until ask_crypt; do : ; done
|
||||
if [[ "${swapmode}" == "1" ]]; then
|
||||
@@ -6382,7 +6290,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
|
||||
if [[ -n "${gfxpkgs[*]}" ]]; then
|
||||
basepkgs+=("${gfxpkgs[*]}")
|
||||
fi
|
||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||
if [[ "${nvdprop}" == "y" ]]; then
|
||||
basepkgs+=("${kernel}-headers")
|
||||
fi
|
||||
if [[ -n "${devel}" ]]; then
|
||||
@@ -6429,7 +6337,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
|
||||
displaymanager="lightdm" ;;
|
||||
|
||||
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" ;;
|
||||
|
||||
9) # Lxqt Desktop:
|
||||
@@ -6463,6 +6371,9 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
|
||||
if [[ -n "${gfxpkgs[*]}" ]]; then
|
||||
custarray+=("${gfxpkgs[*]}")
|
||||
fi
|
||||
if [[ "${nvdprop}" == "y" ]]; then
|
||||
custarray+=("${kernel}-headers")
|
||||
fi
|
||||
if [[ "${greeternmbr}" =~ ^(1|2|3)$ ]]; then
|
||||
custarray+=("${greeter}")
|
||||
fi
|
||||
@@ -6687,7 +6598,7 @@ GRUB_BTRFSD
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${gfxconf}" == "y" && "${vendor}" == "Nvidia" ]]; then
|
||||
if [[ "${nvdprop}" == "y" ]]; then
|
||||
local stage_prompt="Grub/Nvidia Configuration"
|
||||
if arch-chroot /mnt <<-NVGRUB > "${void}" 2>&1 2> "${log}" ; then
|
||||
sed -i "/^#GRUB_TERMINAL_OUTPUT=console/s/^#//" /etc/default/grub || exit
|
||||
@@ -6759,8 +6670,7 @@ ZRAMCONF
|
||||
###################################################################################################
|
||||
nvidia_hook() {
|
||||
|
||||
if [[ "${gfxconf}" == "y" && "${vendor}" == "Nvidia" ]] || [[ "${gfxconf}" == "y" && "${vendors}" =~ "Nvidia" ]]; then
|
||||
if [[ "${nvname}" =~ ^(nvidia-open|nvidia|nvidia-lts)$ ]]; then
|
||||
if [[ "${nvdprop}" == "y" && -n "${nvname}" ]]; then
|
||||
local stage_prompt="Nvidia Hook Creation"
|
||||
if arch-chroot /mnt <<-NVIDIAHOOK > "${void}" 2>&1 2> "${log}" ; then
|
||||
mkdir -p /etc/pacman.d/hooks/ || exit
|
||||
@@ -6786,7 +6696,6 @@ NVIDIAHOOK
|
||||
stage_fail
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
###################################################################################################
|
||||
mkinitcpio_preset() {
|
||||
@@ -7290,10 +7199,10 @@ set_vars() {
|
||||
fi
|
||||
|
||||
# HOOKS SETUP (Encryption)
|
||||
# Nvidia Vendor
|
||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||
# Nvidia Proprietary Driver
|
||||
if [[ "${nvdprop}" == "y" ]]; then
|
||||
HOOKS+=(systemd keyboard autodetect microcode modconf sd-vconsole block sd-encrypt filesystems)
|
||||
# Other Vendors / Multi-Vendors
|
||||
# Open-source Drivers
|
||||
else
|
||||
HOOKS+=(systemd keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt filesystems)
|
||||
fi
|
||||
@@ -7314,10 +7223,10 @@ set_vars() {
|
||||
# ENCRYPTION = 'NO'
|
||||
elif [[ "${encrypt}" == "no" ]]; then
|
||||
# HOOKS SETUP
|
||||
# Nvidia Vendor
|
||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||
# Nvidia Proprietary Driver
|
||||
if [[ "${nvdprop}" == "y" ]]; then
|
||||
HOOKS+=(systemd autodetect microcode modconf keyboard sd-vconsole block filesystems)
|
||||
# Other Vendors / Multi-Vendors
|
||||
# Open-source Drivers
|
||||
else
|
||||
HOOKS+=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems)
|
||||
fi
|
||||
@@ -7333,10 +7242,10 @@ set_vars() {
|
||||
fi
|
||||
fi
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
# GFX CONFIGURATION = 'YES'
|
||||
if [[ "${gfxconf}" == "y" ]]; then
|
||||
# GFX CONFIGURATION
|
||||
|
||||
# Nvidia
|
||||
if [[ "${vendor}" == "Nvidia" || "${vendors}" =~ "Nvidia" ]]; then
|
||||
if [[ "${nvdprop}" == "y" ]]; then
|
||||
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
|
||||
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)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
# MAIN KERNEL PARAMETERS
|
||||
if [[ -n "${gfx_bootopts[*]}" ]]; then
|
||||
@@ -7398,7 +7306,7 @@ chroot_conf() {
|
||||
${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Chroot & Configure System${nc} ${magenta}]${nc}--------------------------------${magenta}###${nc}
|
||||
"
|
||||
|
||||
# All Desktop Configuration:
|
||||
# Desktops Configuration:
|
||||
if [[ "${desktop}" != "12" ]]; then
|
||||
cnfg
|
||||
main_chroot
|
||||
@@ -7434,8 +7342,7 @@ SLICK
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${vendor}" != "Virtual Machine" ]]; then
|
||||
if [[ ! "${desktop}" =~ ^(11|12)$ ]]; then
|
||||
if [[ "${vendor}" != "Virtual Machine" && "${desktop}" != "11" ]]; then
|
||||
local stage_prompt="Bluetooth Services Activation"
|
||||
if arch-chroot /mnt <<-BLUETOOTH > "${void}" 2>&1 2> "${log}" ; then
|
||||
systemctl enable bluetooth || exit
|
||||
@@ -7445,7 +7352,6 @@ BLUETOOTH
|
||||
stage_fail
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${displaymanager}" ]]; then
|
||||
local stage_prompt="Display Manager Service Activation"
|
||||
@@ -7543,7 +7449,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="" 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[@]}"
|
||||
sleep 0.2
|
||||
CYANBG "************************************************************************************************* "
|
||||
|
||||
Reference in New Issue
Block a user