mirror of
https://gitlab.com/prism7/archery.git
synced 2025-02-15 08:29:17 +01:00
"EFI Boot Entries Deletion" stage is now ommited if a VM is detected.
If Dual/Triple graphics setup is detected, graphics configuration defaults to 'no'. Minor aesthetic corrections.
This commit is contained in:
parent
4446db1023
commit
4e37543116
1 changed files with 107 additions and 110 deletions
95
Amelia.sh
95
Amelia.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Amelia Installer
|
# Amelia Installer
|
||||||
# Version: 4.5
|
# Version: 4.6
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
|
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
|
||||||
|
@ -205,8 +205,9 @@ stage_ok (){
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
NC "
|
NC "
|
||||||
|
|
||||||
==> [${green}${stage_prompt} configuration OK${nc}] "
|
==> [${green}${stage_prompt} configuration OK${nc}]
|
||||||
sleep 3
|
"
|
||||||
|
sleep 1
|
||||||
}
|
}
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
stage_fail (){
|
stage_fail (){
|
||||||
|
@ -214,7 +215,7 @@ stage_fail (){
|
||||||
RED "
|
RED "
|
||||||
|
|
||||||
[!] ${stage_prompt} configuration failed "
|
[!] ${stage_prompt} configuration failed "
|
||||||
sleep 4
|
sleep 2
|
||||||
abort
|
abort
|
||||||
}
|
}
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
|
@ -498,7 +499,7 @@ ${purple}###${nc} Locale Selection ${purple}###${nc}
|
||||||
> Select your Locale (e.g. ${nc}en_US.UTF-8${yellow})
|
> Select your Locale (e.g. ${nc}en_US.UTF-8${yellow})
|
||||||
|
|
||||||
|
|
||||||
### [Hit ${nc}'l'${yellow} to list locales, then ${nc}'down'${yellow} to search or ${nc}'q'${yellow} to quit] "
|
### [Hit ${nc}'l'${yellow} to list locales, then ${nc}'enter'${yellow} to search or ${nc}'q'${yellow} to quit] "
|
||||||
BLUE "
|
BLUE "
|
||||||
|
|
||||||
|
|
||||||
|
@ -546,7 +547,7 @@ ${purple}###${nc} Keyboard Layout Selection ${purple}###${nc}
|
||||||
> Select your Keyboard Layout
|
> Select your Keyboard Layout
|
||||||
|
|
||||||
|
|
||||||
### [Hit ${nc}'l'${yellow} to list layouts, then ${nc}'down'${yellow} to search or ${nc}'q'${yellow} to quit] "
|
### [Hit ${nc}'l'${yellow} to list layouts, then ${nc}'enter'${yellow} to search or ${nc}'q'${yellow} to quit] "
|
||||||
BLUE "
|
BLUE "
|
||||||
|
|
||||||
|
|
||||||
|
@ -808,19 +809,19 @@ Enter a number: "
|
||||||
case "${kernelnmbr}" in
|
case "${kernelnmbr}" in
|
||||||
1)
|
1)
|
||||||
kernel="linux"
|
kernel="linux"
|
||||||
kernelname="'Linux'"
|
kernelname="Linux"
|
||||||
entrname="Arch Linux" ;;
|
entrname="Arch Linux" ;;
|
||||||
2)
|
2)
|
||||||
kernel="linux-lts"
|
kernel="linux-lts"
|
||||||
kernelname="'Linux LTS'"
|
kernelname="Linux LTS"
|
||||||
entrname="Arch Linux LTS" ;;
|
entrname="Arch Linux LTS" ;;
|
||||||
3)
|
3)
|
||||||
kernel="linux-hardened"
|
kernel="linux-hardened"
|
||||||
kernelname="'Linux Hardened'"
|
kernelname="Linux Hardened"
|
||||||
entrname="Arch Linux Hardened" ;;
|
entrname="Arch Linux Hardened" ;;
|
||||||
4)
|
4)
|
||||||
kernel="linux-zen"
|
kernel="linux-zen"
|
||||||
kernelname="'Linux Zen'"
|
kernelname="Linux Zen"
|
||||||
entrname="Arch Linux Zen" ;;
|
entrname="Arch Linux Zen" ;;
|
||||||
"")
|
"")
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
@ -877,13 +878,13 @@ Enter a number: "
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
YELLOW "
|
YELLOW "
|
||||||
|
|
||||||
### 'Systemd-boot' has been selected
|
### Systemd-boot has been selected
|
||||||
" ;;
|
" ;;
|
||||||
2)
|
2)
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
YELLOW "
|
YELLOW "
|
||||||
|
|
||||||
### 'Grub' has been selected
|
### Grub has been selected
|
||||||
" ;;
|
" ;;
|
||||||
"")
|
"")
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
@ -1092,7 +1093,6 @@ ${purple}###${nc} Graphics Setup ${purple}###${nc}
|
||||||
hypervisor="$(systemd-detect-virt)"
|
hypervisor="$(systemd-detect-virt)"
|
||||||
|
|
||||||
if [[ "${vgacount}" == "1" ]]; then
|
if [[ "${vgacount}" == "1" ]]; then
|
||||||
|
|
||||||
if [[ "${intelcount}" -ge "1" ]]; then
|
if [[ "${intelcount}" -ge "1" ]]; then
|
||||||
vendor="Intel"
|
vendor="Intel"
|
||||||
sourcetype="Open-source"
|
sourcetype="Open-source"
|
||||||
|
@ -1147,7 +1147,7 @@ ${purple}###${nc} Graphics Setup ${purple}###${nc}
|
||||||
[!] Supported architectures: NV110 (Maxwell) Graphics or newer "
|
[!] Supported architectures: NV110 (Maxwell) Graphics or newer "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BLUE "
|
BLUE "
|
||||||
|
|
||||||
|
|
||||||
Enter [y/n]: "
|
Enter [y/n]: "
|
||||||
|
@ -1155,7 +1155,6 @@ Enter [y/n]: "
|
||||||
==> " vgaconf
|
==> " vgaconf
|
||||||
|
|
||||||
if [[ "${vgaconf}" == "y" ]]; then
|
if [[ "${vgaconf}" == "y" ]]; then
|
||||||
|
|
||||||
if [[ "${vendor}" == "AMD" ]]; then
|
if [[ "${vendor}" == "AMD" ]]; then
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
YELLOW "
|
YELLOW "
|
||||||
|
@ -1193,7 +1192,6 @@ Enter a number ${bwhite}(empty to skip)${blue}: "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ "${vendor}" == "Nvidia" ]]; then
|
elif [[ "${vendor}" == "Nvidia" ]]; then
|
||||||
|
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
YELLOW "
|
YELLOW "
|
||||||
> Select Nvidia architecture: "
|
> Select Nvidia architecture: "
|
||||||
|
@ -1252,11 +1250,9 @@ Enter a number: "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${kernelnmbr}" == "1" ]]; then
|
if [[ "${kernelnmbr}" == "1" ]]; then
|
||||||
|
|
||||||
if [[ "${family}" == "1" ]]; then
|
if [[ "${family}" == "1" ]]; then
|
||||||
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia nvidia-settings nvidia-utils opencl-nvidia"
|
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia nvidia-settings nvidia-utils opencl-nvidia"
|
||||||
nvname="nvidia"
|
nvname="nvidia"
|
||||||
|
|
||||||
elif [[ "${family}" == "2" ]]; then
|
elif [[ "${family}" == "2" ]]; then
|
||||||
if [[ "${nvdriver}" == "1" ]]; then
|
if [[ "${nvdriver}" == "1" ]]; then
|
||||||
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-open nvidia-settings nvidia-utils opencl-nvidia"
|
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-open nvidia-settings nvidia-utils opencl-nvidia"
|
||||||
|
@ -1266,13 +1262,10 @@ Enter a number: "
|
||||||
nvname="nvidia"
|
nvname="nvidia"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ "${kernelnmbr}" == "2" ]]; then
|
elif [[ "${kernelnmbr}" == "2" ]]; then
|
||||||
|
|
||||||
if [[ "${family}" == "1" ]]; then
|
if [[ "${family}" == "1" ]]; then
|
||||||
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-lts nvidia-settings nvidia-utils opencl-nvidia"
|
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-lts nvidia-settings nvidia-utils opencl-nvidia"
|
||||||
nvname="nvidia-lts"
|
nvname="nvidia-lts"
|
||||||
|
|
||||||
elif [[ "${family}" == "2" ]]; then
|
elif [[ "${family}" == "2" ]]; then
|
||||||
if [[ "${nvdriver}" == "1" ]]; then
|
if [[ "${nvdriver}" == "1" ]]; then
|
||||||
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-open-dkms nvidia-settings nvidia-utils opencl-nvidia"
|
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-open-dkms nvidia-settings nvidia-utils opencl-nvidia"
|
||||||
|
@ -1281,12 +1274,9 @@ Enter a number: "
|
||||||
nvname="nvidia-lts"
|
nvname="nvidia-lts"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
if [[ "${family}" == "1" ]]; then
|
if [[ "${family}" == "1" ]]; then
|
||||||
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-dkms nvidia-settings nvidia-utils opencl-nvidia"
|
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-dkms nvidia-settings nvidia-utils opencl-nvidia"
|
||||||
|
|
||||||
elif [[ "${family}" == "2" ]]; then
|
elif [[ "${family}" == "2" ]]; then
|
||||||
if [[ "${nvdriver}" == "1" ]]; then
|
if [[ "${nvdriver}" == "1" ]]; then
|
||||||
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-open-dkms nvidia-settings nvidia-utils opencl-nvidia"
|
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-open-dkms nvidia-settings nvidia-utils opencl-nvidia"
|
||||||
|
@ -1299,7 +1289,7 @@ Enter a number: "
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
YELLOW "
|
YELLOW "
|
||||||
|
|
||||||
### ""${vendor}"" Graphics will be automatically configured
|
### ${vendor} Graphics will be automatically configured
|
||||||
"
|
"
|
||||||
elif [[ "${vgaconf}" == "n" ]]; then
|
elif [[ "${vgaconf}" == "n" ]]; then
|
||||||
vgapkgs=""
|
vgapkgs=""
|
||||||
|
@ -1354,6 +1344,11 @@ ${nvidiacards}
|
||||||
|
|
||||||
> Please configure the graphics subsystem after installation has finished
|
> Please configure the graphics subsystem after installation has finished
|
||||||
"
|
"
|
||||||
|
vgaconf="n"
|
||||||
|
echo
|
||||||
|
skip
|
||||||
|
ok
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
ok
|
ok
|
||||||
}
|
}
|
||||||
|
@ -1405,17 +1400,17 @@ Enter a number: "
|
||||||
|
|
||||||
case "${packages}" in
|
case "${packages}" in
|
||||||
1)
|
1)
|
||||||
desktopname="'Plasma'" ;;
|
desktopname="Plasma" ;;
|
||||||
2)
|
2)
|
||||||
desktopname="'Custom Plasma (System Optimized)'" ;;
|
desktopname="Custom Plasma (System Optimized)" ;;
|
||||||
3)
|
3)
|
||||||
desktopname="'Gnome'" ;;
|
desktopname="Gnome" ;;
|
||||||
4)
|
4)
|
||||||
desktopname="'Custom Gnome (System Optimized)'" ;;
|
desktopname="Custom Gnome (System Optimized)" ;;
|
||||||
5)
|
5)
|
||||||
desktopname="'Xfce'" ;;
|
desktopname="Xfce" ;;
|
||||||
6)
|
6)
|
||||||
desktopname="'Cinnamon'"
|
desktopname="Cinnamon"
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
YELLOW "
|
YELLOW "
|
||||||
|
|
||||||
|
@ -1456,9 +1451,9 @@ Enter [y/n]: "
|
||||||
esac ;;
|
esac ;;
|
||||||
|
|
||||||
7)
|
7)
|
||||||
desktopname="'Deepin'" ;;
|
desktopname="Deepin" ;;
|
||||||
8)
|
8)
|
||||||
desktopname="'Budgie'"
|
desktopname="Budgie"
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
YELLOW "
|
YELLOW "
|
||||||
|
|
||||||
|
@ -1499,13 +1494,13 @@ Enter [y/n]: "
|
||||||
esac ;;
|
esac ;;
|
||||||
|
|
||||||
9)
|
9)
|
||||||
desktopname="'Lxqt'" ;;
|
desktopname="Lxqt" ;;
|
||||||
10)
|
10)
|
||||||
desktopname="'Mate'" ;;
|
desktopname="Mate" ;;
|
||||||
11)
|
11)
|
||||||
desktopname="'Basic Arch Linux'" ;;
|
desktopname="Basic Arch Linux" ;;
|
||||||
12)
|
12)
|
||||||
desktopname="'Custom Arch Linux'"
|
desktopname="Custom Arch Linux"
|
||||||
until cust_sys; do :; done
|
until cust_sys; do :; done
|
||||||
return 0 ;;
|
return 0 ;;
|
||||||
"")
|
"")
|
||||||
|
@ -1653,7 +1648,6 @@ Enter a number: "
|
||||||
==> " greeternmbr
|
==> " greeternmbr
|
||||||
|
|
||||||
case "${greeternmbr}" in
|
case "${greeternmbr}" in
|
||||||
|
|
||||||
1)
|
1)
|
||||||
greeter="lightdm-gtk-greeter"
|
greeter="lightdm-gtk-greeter"
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
@ -1743,12 +1737,25 @@ boot_entr (){
|
||||||
|
|
||||||
local prompt="Boot Entries"
|
local prompt="Boot Entries"
|
||||||
efi_entr_del="1"
|
efi_entr_del="1"
|
||||||
|
hypervisor="$(systemd-detect-virt)"
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
NC "
|
NC "
|
||||||
_________________________________
|
_________________________________
|
||||||
|
|
||||||
${purple}###${nc} EFI Boot Entries Deletion ${purple}###${nc}
|
${purple}###${nc} EFI Boot Entries Deletion ${purple}###${nc}
|
||||||
"
|
"
|
||||||
|
if [[ "${hypervisor}" != "none" ]]; then
|
||||||
|
sleep 0.5
|
||||||
|
YELLOW "
|
||||||
|
|
||||||
|
### Virtual Machine detected
|
||||||
|
"
|
||||||
|
skip
|
||||||
|
ok
|
||||||
|
echo
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
YELLOW "
|
YELLOW "
|
||||||
|
|
||||||
> Select an EFI Boot Entry to Delete ${red}[!] (CAUTION) [!]${yellow}
|
> Select an EFI Boot Entry to Delete ${red}[!] (CAUTION) [!]${yellow}
|
||||||
|
@ -2517,7 +2524,6 @@ instl (){
|
||||||
if [[ -n "${REGDOM}" ]]; then
|
if [[ -n "${REGDOM}" ]]; then
|
||||||
until wireless_regdom; do : ; done
|
until wireless_regdom; do : ; done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chroot_conf
|
chroot_conf
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -3326,9 +3332,7 @@ ${purple}###${nc} Confirm Installation Status ${purple}###${nc}
|
||||||
if [[ -n "${REGDOM}" ]]; then
|
if [[ -n "${REGDOM}" ]]; then
|
||||||
until wireless_regdom; do : ; done
|
until wireless_regdom; do : ; done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chroot_conf
|
chroot_conf
|
||||||
|
|
||||||
elif [[ "${agree}" == "no" ]]; then
|
elif [[ "${agree}" == "no" ]]; then
|
||||||
reload
|
reload
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
@ -3348,9 +3352,7 @@ ${purple}###${nc} Unmount Filesystems ${purple}###${nc}
|
||||||
[!] Unmounting failed "
|
[!] Unmounting failed "
|
||||||
abort
|
abort
|
||||||
fi
|
fi
|
||||||
|
|
||||||
revise
|
revise
|
||||||
|
|
||||||
else
|
else
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
RED "
|
RED "
|
||||||
|
@ -3657,7 +3659,7 @@ ${purple}###${nc} Optimize PacMan ${purple}###${nc}
|
||||||
> Select a Country for your Arch Mirrors:
|
> Select a Country for your Arch Mirrors:
|
||||||
|
|
||||||
|
|
||||||
### [Hit ${nc}'l'${yellow} to list Countries, then ${nc}'down'${yellow} to search or ${nc}'q'${yellow} to quit] "
|
### [Hit ${nc}'l'${yellow} to list Countries, then ${nc}'enter'${yellow} to search or ${nc}'q'${yellow} to quit] "
|
||||||
BLUE "
|
BLUE "
|
||||||
|
|
||||||
|
|
||||||
|
@ -3739,14 +3741,12 @@ Enter a number: "
|
||||||
|
|
||||||
elif [[ "${parallel}" == "n" ]]; then
|
elif [[ "${parallel}" == "n" ]]; then
|
||||||
skip
|
skip
|
||||||
|
|
||||||
elif [[ -z "${parallel}" ]]; then
|
elif [[ -z "${parallel}" ]]; then
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
RED "
|
RED "
|
||||||
[!] Please make a selection to continue "
|
[!] Please make a selection to continue "
|
||||||
reload
|
reload
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
else
|
else
|
||||||
invalid
|
invalid
|
||||||
return 1
|
return 1
|
||||||
|
@ -3962,7 +3962,6 @@ ${purple}###${nc} Chroot & Configure System ${purple}###${nc}
|
||||||
[[ "${kernelnmbr}" == "3" ]] && swapmode="3"
|
[[ "${kernelnmbr}" == "3" ]] && swapmode="3"
|
||||||
|
|
||||||
if [[ "${encrypt}" == "yes" ]]; then
|
if [[ "${encrypt}" == "yes" ]]; then
|
||||||
|
|
||||||
encr_root_dev="/dev/mapper/${ENCROOT}"
|
encr_root_dev="/dev/mapper/${ENCROOT}"
|
||||||
encr_root_opts="rd.luks.name=$(blkid -s UUID -o value "${root_dev}")=${ENCROOT}"
|
encr_root_opts="rd.luks.name=$(blkid -s UUID -o value "${root_dev}")=${ENCROOT}"
|
||||||
encr_root_bootopts="root=${encr_root_dev} ${encr_root_opts}"
|
encr_root_bootopts="root=${encr_root_dev} ${encr_root_opts}"
|
||||||
|
@ -4000,10 +3999,8 @@ ${purple}###${nc} Chroot & Configure System ${purple}###${nc}
|
||||||
vga_bootopts="amdgpu.dc=1"
|
vga_bootopts="amdgpu.dc=1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ "${vgaconf}" == "n" ]]; then
|
elif [[ "${vgaconf}" == "n" ]]; then
|
||||||
mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf kms keymap consolefont block sd-encrypt filesystems fsck)"
|
mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf kms keymap consolefont block sd-encrypt filesystems fsck)"
|
||||||
|
|
||||||
if [[ "${vendor}" == "Nvidia" ]]; then
|
if [[ "${vendor}" == "Nvidia" ]]; then
|
||||||
mkinitcpio_mods="MODULES=(${fs_mod} nouveau)"
|
mkinitcpio_mods="MODULES=(${fs_mod} nouveau)"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue