diff --git a/Amelia.sh b/Amelia.sh index e7f501b..a0b2356 100644 --- a/Amelia.sh +++ b/Amelia.sh @@ -1,7 +1,7 @@ #!/bin/bash # Amelia installer for Archlinux - # Version: 1.1.10 + # Version: 1.2.0 # Source: https://gitlab.com/prism7/archery # Contact: leenooks7@gmail.com @@ -135,9 +135,9 @@ line3() { unmount() { sleep 0.2 line2 - CYAN " + NC " --------------------------- - ### ${yellowl}Unmount and Retry ${nc}${cyan}### + ### ${yellowl}Unmount and Retry ${nc}### --------------------------- " reload @@ -348,7 +348,7 @@ cnfg() { MAGENTABG "------------------------------------------------------------------------------------------------- " MAGENTABG " ### Configuring System ### " MAGENTABG "------------------------------------------------------------------------------------------------- " - MAGENTA " + NC " ... Please Wait ... " @@ -528,8 +528,7 @@ dtct_hyper() { hypervisor="$(systemd-detect-virt)" case "${hypervisor}" in kvm) - vmpkgs="spice spice-vdagent spice-protocol spice-gtk qemu-guest-agent swtpm" - vm_services="qemu-guest-agent" ;; + vmpkgs="spice spice-vdagent spice-protocol spice-gtk qemu-guest-agent swtpm" ;; vmware) vmpkgs="open-vm-tools" vm_services="vmtoolsd vmware-vmblock-fuse" ;; @@ -1690,9 +1689,12 @@ dtct_single_gfx() { nvidia sleep 0.2 CYAN " - ### ${yellowl}Nvidia: ${nc}ONLY 'Maxwell' (NV110) or newer graphics are supported ${cyan} + ### ${yellowl}Turing ${bwhite}(NV160/TUxxx) ${nc}Graphics or newer are officialy supported ${cyan} - ### ${nc}Selecting ${yellowl}(n)o ${nc}defaults to the open-source ${yellowl}'nouveau' " + ### ${yellowl}Maxwell ${bwhite}(NV110/GMxxx) ${nc}through ${yellowl}Volta ${bwhite}(NV140/GVxxx) ${nc}Graphics are unofficialy supported ${yellowl}[AUR] ${nc}${cyan} + + + ### ${nc}Selecting ${yellowl}(n)o ${nc}defaults to the ${bwhite}open-source ${yellowl}'nouveau' ${nc}driver " YELLOW " > Install proprietary Nvidia drivers ? [Y/n] " @@ -1759,10 +1761,13 @@ ${amdcards} ${nvidiacards} - ${cyan}### ${yellowl}Nvidia: ${nc}ONLY 'Maxwell' (NV110) or newer graphics are supported ${cyan} + ${cyan}### ${yellowl}Turing ${bwhite}(NV160/TUxxx) ${nc}Graphics or newer are officialy supported ${cyan} - ### ${nc}Selecting ${yellowl}(n)o ${nc}defaults to the open-source ${yellowl}'nouveau' ${nc}driver - ____________________________________________________________________" + ### ${yellowl}Maxwell ${bwhite}(NV110/GMxxx) ${nc}through ${yellowl}Volta ${bwhite}(NV140/GVxxx) ${nc}Graphics are unofficialy supported ${yellowl}[AUR] ${nc}${cyan} + + + ### ${nc}Selecting ${yellowl}(n)o ${nc}defaults to the ${bwhite}open-source ${yellowl}'nouveau' ${nc}driver + ________________________________________________________________" YELLOW " @@ -1872,12 +1877,12 @@ Enter a number ${bwhite}(empty to skip)${blue}: " if [[ "${nvdprop}" == "y" ]]; then sleep 0.2 YELLOW " - > Select Nvidia architecture: " + > Select Nvidia driver: " NC " - [1] Turing (NV160) Graphics or newer [Nvidia Open] + [1] Nvidia-open ${yellowl}Turing ${bwhite}(NV160/TUxxx) ${nc}Graphics or newer - [2] Maxwell (NV110) Graphics or newer [Nvidia / Disabling GSP Firmware available] " + [2] Nvidia-580xx-dkms [AUR] ${yellowl}Maxwell ${bwhite}(NV110/GMxxx) ${nc}through ${yellowl}Volta ${bwhite}(NV140/GVxxx) ${nc}Graphics " BLUE " @@ -1892,17 +1897,17 @@ Enter a number: " ==> [${green}Turing+ OK${nc}] " ;; - 2) # Maxwell+ Family + 2) # Maxwell-Volta Family sleep 0.2 NC " -==> [${green}Maxwell+ OK${nc}] +==> [${green}Maxwell -> Volta OK${nc}] " local prompt="GSP Firmware Disabled" sleep 0.2 YELLOW " - > Disable 'GSP' firmware (for troubleshooting) ? [y/n] " + > Disable 'GSP' firmware ? [y/n] " BLUE " @@ -1999,10 +2004,11 @@ gfxpkgs_set() { keypress fi - gfxpkgs=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl nvidia-settings nvidia-utils opencl-nvidia opencl-headers vkd3d) + gfxpkgs=(libva-mesa-driver libva-nvidia-driver libvdpau-va-gl vkd3d) # Turing+ GPUs if [[ "${family}" == "1" ]]; then + gfxpkgs+=(nvidia-settings nvidia-utils opencl-nvidia opencl-headers) # Linux Kernel if [[ "${kernelnmbr}" == "1" ]]; then nvname="nvidia-open" @@ -2015,20 +2021,9 @@ gfxpkgs_set() { else gfxpkgs+=(nvidia-open-dkms) fi - # Maxwell+ GPUs + # Maxwell -> Volta GPUs elif [[ "${family}" == "2" ]]; then - # Linux Kernel - if [[ "${kernelnmbr}" == "1" ]]; then - nvname="nvidia" - gfxpkgs+=(nvidia) - # Linux LTS Kernel - elif [[ "${kernelnmbr}" == "2" ]]; then - nvname="nvidia-lts" - gfxpkgs+=(nvidia-lts) - # Other Kernels - else - gfxpkgs+=(nvidia-dkms) - fi + nvidia_aur="y" fi elif [[ "${nvdprop}" == "n" ]]; then gfxpkgs+=(libva-mesa-driver vulkan-nouveau) @@ -2422,25 +2417,32 @@ Enter a number ${bwhite}(empty to skip)${blue}: " web_name="Vivaldi" ;; 4) web_aur="brave-bin" + web_aur_url="https://aur.archlinux.org/cgit/aur.git/snapshot/brave-bin.tar.gz" web_name="Brave Browser" ;; 5) web_aur="microsoft-edge-stable-bin" + web_aur_url="https://aur.archlinux.org/cgit/aur.git/snapshot/microsoft-edge-stable-bin.tar.gz" web_name="Microsoft Edge" ;; 6) web_aur="zen-browser-bin" + web_aur_url="https://aur.archlinux.org/cgit/aur.git/snapshot/zen-browser-bin.tar.gz" web_name="Zen Browser" ;; 7) web_aur="opera" + web_aur_url="https://aur.archlinux.org/cgit/aur.git/snapshot/opera.tar.gz" web_name="Opera" ;; 8) web_aur="google-chrome" + web_aur_url="https://aur.archlinux.org/cgit/aur.git/snapshot/google-chrome.tar.gz" web_name="Google Chrome" ;; 9) web_aur="helium-browser-bin" + web_aur_url="https://aur.archlinux.org/cgit/aur.git/snapshot/helium-browser-bin.tar.gz" web_name="Helium Browser" ;; "") web_pkg="" web_aur="" + web_aur_url="" web_name="" web_slct="yes" skip @@ -5777,7 +5779,7 @@ revise() { revision="y" gfxpkgs=() validpkgs=() - 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="" oomd="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="" hometype="" homeform="" smartpart="" LuksParts="") + 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="" oomd="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="" hometype="" homeform="" smartpart="" LuksParts="" nvidia_aur="" web_aur_url="") export "${reset[@]}" instl @@ -6234,16 +6236,33 @@ pkg_validation() { if pacman -Syy > "${void}" 2>&1 2> "${log}" && pacman -Spd ${valids} > "${void}" 2>&1 2> "${log}"; then ok if [[ -n "${web_aur}" ]]; then - local prompt="AUR Package Validation" - local stage_prompt="AUR Package Validation" - if pacman -S git --noconfirm > "${void}" 2>&1 2> "${log}" && git clone --branch "${web_aur}" --single-branch https://github.com/archlinux/aur.git "${web_aur}" > "${void}" 2>&1 2> "${log}" && rm -R "${web_aur}"; then + local prompt="${web_name} Package Validation" + local stage_prompt="${web_name} Package Validation" + pacman -S --noconfirm wget > "${void}" + if wget -4 --spider "${web_aur_url}" > "${void}" 2>&1 2> "${log}"; then ok else - stage_fail + err_try + return 1 + fi + fi + if [[ -n "${nvidia_aur}" ]]; then + local prompt="Nvidia 580xx Drivers Package Validation" + local stage_prompt="Nvidia 580xx Drivers Package Validation" + if [[ ! -e /usr/bin/wget ]]; then + pacman -S --noconfirm wget > "${void}" + fi + if wget -4 --spider https://aur.archlinux.org/cgit/aur.git/snapshot/nvidia-580xx-utils.tar.gz > "${void}" 2>&1 2> "${log}" && + wget -4 --spider https://aur.archlinux.org/cgit/aur.git/snapshot/nvidia-580xx-settings.tar.gz > "${void}" 2>&1 2> "${log}"; then + ok + else + err_try + return 1 fi fi else - stage_fail + err_try + return 1 fi if [[ "${encrypt}" == "no" ]]; then @@ -6265,10 +6284,56 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs pkg_collection pkg_validation if pacstrap -K /mnt ${deskpkgs} 2> "${log}" ; then - local prompt="Pacstrap System" - local stage_prompt="Pacstrap System" + if [[ -n "${nvidia_aur}" ]]; then + YELLOWL " + + + + --------------------------------------- + ### ${nc}Building ${bwhite}Nvidia-580xx ${nc}Drivers ${yellowl}### + ---------------------------------------${nc} + + + ... Please Wait ... + + + " + if [[ "${dev}" != "y" ]]; then + local stage_prompt="Base-devel Package Installation" + if arch-chroot /mnt <<-BASE_DEVEL > "${void}" 2>&1 2> "${log}" ; then + pacman -S --noconfirm base-devel || exit +BASE_DEVEL + stage_ok + else + stage_fail + fi + fi + if [[ "${desktop}" =~ ^(11|12)$ ]]; then + local stage_prompt="Git Package Installation" + if arch-chroot /mnt <<-GIT > "${void}" 2>&1 2> "${log}" ; then + pacman -S --noconfirm git || exit +GIT + stage_ok + else + stage_fail + fi + fi + local stage_prompt="AUR Nvidia Packages Installation" + if arch-chroot /mnt <<-AUR_NVIDIA_PKGS > "${void}" 2>&1 2> "${log}" ; then + sed -i 's|if (( EUID == 0 )); then|if (( EUID != 0 )); then|g' /usr/bin/makepkg || exit + git clone --branch nvidia-580xx-utils --single-branch https://github.com/archlinux/aur.git nvidia-580xx-utils && cd nvidia-580xx-utils && makepkg -s --noconfirm && sudo pacman -U --noconfirm *x86_64.pkg.tar.zst && cd .. && rm -rf nvidia-580xx-utils || exit + git clone --branch nvidia-580xx-settings --single-branch https://github.com/archlinux/aur.git nvidia-580xx-settings && cd nvidia-580xx-settings && makepkg -s --noconfirm && sudo pacman -U --noconfirm *x86_64.pkg.tar.zst && cd .. && rm -rf nvidia-580xx-settings || exit + sed -i 's|if (( EUID != 0 )); then|if (( EUID == 0 )); then|g' /usr/bin/makepkg || exit +AUR_NVIDIA_PKGS + stage_ok + else + stage_fail + fi + fi + local prompt="Pacstrap System" ok else + local stage_prompt="Pacstrap System" stage_fail fi @@ -6845,27 +6910,29 @@ PRINT_CONF foreign() { if [[ -n "${web_aur}" ]]; then - local stage_prompt="Base-devel Installation" - if [[ "${dev}" != "y" ]]; then - if arch-chroot /mnt <<-BASE_DEVEL > "${void}" 2>&1 2> "${log}" ; then - pacman -S --noconfirm base-devel || exit + if [[ -z "${nvidia_aur}" ]]; then + if [[ "${dev}" != "y" ]]; then + local stage_prompt="Base-devel Package Installation" + if arch-chroot /mnt <<-BASE_DEVEL > "${void}" 2>&1 2> "${log}" ; then + pacman -S --noconfirm base-devel || exit BASE_DEVEL - stage_ok - else - stage_fail + stage_ok + else + stage_fail + fi fi - fi - local stage_prompt="Git Installation" - if [[ "${desktop}" =~ ^(11|12)$ ]]; then - if arch-chroot /mnt <<-GIT > "${void}" 2>&1 2> "${log}" ; then - pacman -S --noconfirm git || exit + if [[ "${desktop}" =~ ^(11|12)$ ]]; then + local stage_prompt="Git Package Installation" + if arch-chroot /mnt <<-GIT > "${void}" 2>&1 2> "${log}" ; then + pacman -S --noconfirm git || exit GIT - stage_ok - else - stage_fail + stage_ok + else + stage_fail + fi fi fi - local stage_prompt="AUR Packages Installation" + local stage_prompt="${web_name} Package Installation" if arch-chroot /mnt <<-AUR_GIT_PKGS > "${void}" 2>&1 2> "${log}" ; then sed -i 's|if (( EUID == 0 )); then|if (( EUID != 0 )); then|g' /usr/bin/makepkg || exit git clone --branch ${web_aur} --single-branch https://github.com/archlinux/aur.git ${web_aur} && cd ${web_aur} && makepkg -s --noconfirm && sudo pacman -U --noconfirm *x86_64.pkg.tar.zst && cd .. && rm -rf ${web_aur} || exit @@ -7419,7 +7486,7 @@ CUSTOM_SRVC log="Amelia.log" 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="" vendor="" vendors="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" 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="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" encr_home_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="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="" efiname="" path="" hometype="" homeform="" LuksParts="") + 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="" 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="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" encr_home_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="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="" efiname="" path="" hometype="" homeform="" LuksParts="" nvidia_aur="" web_aur_url="") export "${vars[@]}" validpkgs=() sleep 0.2