Change: When running in 'KVM-QEMU', the installer will no longer enable the 'qemu-guest-agent' service, as the said service gets automatically enabled.

Change: The list of kernel parameters to be set for the installed system, now derives from a versatile array, instead of the 'hard-coded' variables previously used.
Change: Some code optimization has taken place.
Change: A few prompts have been edited/added for enhanced clarity.
This commit is contained in:
Jane Doe 2025-01-04 12:01:10 +00:00
parent 5b509a665d
commit c956eb6c9a

284
Amelia.sh
View file

@ -2,7 +2,7 @@
# Amelia Installer # Amelia Installer
# https://gitlab.com/prism7/archery # https://gitlab.com/prism7/archery
# Version: 8.3.1 # Version: 8.3.2
set -euo pipefail set -euo pipefail
################################################################################################### ###################################################################################################
@ -74,6 +74,7 @@ NC() {
skip() { skip() {
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
--> Skipping.. " --> Skipping.. "
} }
reload() { reload() {
@ -462,18 +463,15 @@ dtct_hyper() {
if [[ "${hypervisor}" != "none" ]]; then if [[ "${hypervisor}" != "none" ]]; then
vendor="Virtual Machine" vendor="Virtual Machine"
vgaconf="n" vgaconf="n"
vgapkgs=""
fi fi
case "${hypervisor}" in case "${hypervisor}" in
kvm) kvm)
vmpkgs="spice spice-vdagent spice-protocol spice-gtk qemu-guest-agent swtpm" vmpkgs="spice spice-vdagent spice-protocol spice-gtk qemu-guest-agent swtpm" ;;
vm_services="qemu-guest-agent" ;;
vmware) vmware)
vmpkgs="open-vm-tools" vmpkgs="open-vm-tools"
vm_services="vmtoolsd vmware-vmblock-fuse" ;; vm_services="vmtoolsd vmware-vmblock-fuse" ;;
oracle) oracle)
vmpkgs="virtualbox-guest-utils" vmpkgs="virtualbox-guest-utils" ;;
vm_services="" ;;
microsoft) microsoft)
vmpkgs="hyperv" vmpkgs="hyperv"
vm_services="hv_kvp_daemon hv_vss_daemon" ;; vm_services="hv_kvp_daemon hv_vss_daemon" ;;
@ -1257,7 +1255,7 @@ Enter [Y/n]: "
fs_mod="btrfs" fs_mod="btrfs"
fstools="btrfs-progs" fstools="btrfs-progs"
roottype="/@" roottype="/@"
btrfs_bootopts="rootflags=subvol=@ " btrfs_bootopts="rootflags=subvol=@"
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
@ -1356,8 +1354,7 @@ Enter a number: "
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
### No Swap will be used ### No Swap will be used "
"
skip ;; skip ;;
"") "")
choice choice
@ -1584,13 +1581,20 @@ Enter a number: "
read -r -p " read -r -p "
==> " vendor_slct ==> " vendor_slct
if [[ "${vendor_slct}" == "1" ]]; then case "${vendor_slct}" in
vendor="Intel" 1)
elif [[ "${vendor_slct}" == "2" ]]; then vendor="Intel" ;;
vendor="AMD" 2)
else vendor="AMD" ;;
vendor="none" 3)
fi vendor="none" ;;
"")
choice
return 1 ;;
*)
invalid
return 1 ;;
esac
elif [[ -n "${vendor1}" && -n "${vendor3}" ]]; then elif [[ -n "${vendor1}" && -n "${vendor3}" ]]; then
NC " NC "
@ -1607,13 +1611,20 @@ Enter a number: "
read -r -p " read -r -p "
==> " vendor_slct ==> " vendor_slct
if [[ "${vendor_slct}" == "1" ]]; then case "${vendor_slct}" in
vendor="Intel" 1)
elif [[ "${vendor_slct}" == "2" ]]; then vendor="Intel" ;;
vendor="Nvidia" 2)
else vendor="Nvidia" ;;
vendor="none" 3)
fi vendor="none" ;;
"")
choice
return 1 ;;
*)
invalid
return 1 ;;
esac
elif [[ -n "${vendor2}" && -n "${vendor3}" ]]; then elif [[ -n "${vendor2}" && -n "${vendor3}" ]]; then
NC " NC "
@ -1630,13 +1641,20 @@ Enter a number: "
read -r -p " read -r -p "
==> " vendor_slct ==> " vendor_slct
if [[ "${vendor_slct}" == "1" ]]; then case "${vendor_slct}" in
vendor="AMD" 1)
elif [[ "${vendor_slct}" == "2" ]]; then vendor="AMD" ;;
vendor="Nvidia" 2)
else vendor="Nvidia" ;;
vendor="none" 3)
fi vendor="none" ;;
"")
choice
return 1 ;;
*)
invalid
return 1 ;;
esac
fi fi
if [[ "${vendor}" == "Intel" || "${vendor}" == "AMD" ]]; then if [[ "${vendor}" == "Intel" || "${vendor}" == "AMD" ]]; then
sourcetype="Open-source" sourcetype="Open-source"
@ -1646,8 +1664,6 @@ Enter a number: "
vgaconf="y" vgaconf="y"
elif [[ "${vendor}" == "none" ]]; then elif [[ "${vendor}" == "none" ]]; then
vgaconf="n" vgaconf="n"
vgapkgs=""
echo
skip skip
ok ok
return 0 return 0
@ -1688,25 +1704,30 @@ vga_conf() {
Enter a number ${bwhite}(empty to skip)${blue}: " Enter a number ${bwhite}(empty to skip)${blue}: "
read -r -p " read -r -p "
==> " islands ==> " islands
if [[ -z "${islands}" ]]; then
skip case "${islands}" in
echo 1)
elif [[ "${islands}" == "1" ]]; then sleep 0.2
NC " NC "
==> [${green}Southern Islands OK${nc}] ==> [${green}Southern Islands OK${nc}]
" " ;;
elif [[ "${islands}" == "2" ]]; then 2)
NC " sleep 0.2
NC "
==> [${green}Sea Islands OK${nc}] ==> [${green}Sea Islands OK${nc}]
" " ;;
else "")
invalid skip
return 1 echo ;;
fi *)
invalid
return 1 ;;
esac
elif [[ "${vendor}" == "Nvidia" ]]; then elif [[ "${vendor}" == "Nvidia" ]]; then
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
@ -1723,49 +1744,46 @@ Enter a number: "
read -r -p " read -r -p "
==> " family ==> " family
if [[ "${family}" == "1" ]]; then case "${family}" in
sleep 0.2 1) # Turing+ Family
NC " sleep 0.2
NC "
==> [${green}Turing+ OK${nc}] ==> [${green}Turing+ OK${nc}]
" "
elif [[ "${family}" == "2" ]]; then # Linux Kernel
sleep 0.2 if [[ "${kernelnmbr}" == "1" ]]; then
NC " nvname="nvidia-open"
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-open nvidia-settings nvidia-utils opencl-nvidia vkd3d"
# Other Kernels
else
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-open-dkms nvidia-settings nvidia-utils opencl-nvidia vkd3d"
fi ;;
2) # Maxwell+ Family
sleep 0.2
NC "
==> [${green}Maxwell+ OK${nc}] ==> [${green}Maxwell+ OK${nc}]
" "
else # Linux Kernel
echo if [[ "${kernelnmbr}" == "1" ]]; then
invalid nvname="nvidia"
return 1 vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia nvidia-settings nvidia-utils opencl-nvidia vkd3d"
fi # Linux LTS Kernel
elif [[ "${kernelnmbr}" == "2" ]]; then
# Turing+ Family nvname="nvidia-lts"
if [[ "${family}" == "1" ]]; then vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-lts nvidia-settings nvidia-utils opencl-nvidia vkd3d"
# Linux Kernel # Other Kernels
if [[ "${kernelnmbr}" == "1" ]]; then else
nvname="nvidia-open" vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-dkms nvidia-settings nvidia-utils opencl-nvidia vkd3d"
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-open nvidia-settings nvidia-utils opencl-nvidia vkd3d" fi ;;
# Other Kernels "")
else choice
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-open-dkms nvidia-settings nvidia-utils opencl-nvidia vkd3d" return 1 ;;
fi *)
# Maxwell+ Family invalid
elif [[ "${family}" == "2" ]]; then return 1 ;;
# Linux Kernel esac
if [[ "${kernelnmbr}" == "1" ]]; then
nvname="nvidia"
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia nvidia-settings nvidia-utils opencl-nvidia vkd3d"
# Linux LTS Kernel
elif [[ "${kernelnmbr}" == "2" ]]; then
nvname="nvidia-lts"
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-lts nvidia-settings nvidia-utils opencl-nvidia vkd3d"
# Other Kernels
else
vgapkgs="libva-nvidia-driver libvdpau-va-gl nvidia-dkms nvidia-settings nvidia-utils opencl-nvidia vkd3d"
fi
fi
if [[ "${swapmode}" == "3" || "${swapmode}" == "4" ]]; then if [[ "${swapmode}" == "3" || "${swapmode}" == "4" ]]; then
sleep 0.2 sleep 0.2
@ -1791,7 +1809,6 @@ Enter a number: "
if [[ "${vendor}" == "nvidia" ]]; then if [[ "${vendor}" == "nvidia" ]]; then
vgapkgs="vulkan-nouveau" vgapkgs="vulkan-nouveau"
fi fi
echo
skip skip
fi fi
vga_slct="yes" vga_slct="yes"
@ -1887,7 +1904,6 @@ Enter [Y/n]: "
==> [${green}Terminal OK${nc}] " ;; ==> [${green}Terminal OK${nc}] " ;;
n) n)
echo
skip ;; skip ;;
*) *)
invalid invalid
@ -1926,7 +1942,6 @@ Enter [Y/n]: "
==> [${green}Terminal OK${nc}] " ;; ==> [${green}Terminal OK${nc}] " ;;
n) n)
echo
skip ;; skip ;;
*) *)
invalid invalid
@ -1980,7 +1995,6 @@ Enter [Y/n]: "
==> [${green}base-devel OK${nc}] " ;; ==> [${green}base-devel OK${nc}] " ;;
n) n)
echo
skip ;; skip ;;
*) *)
invalid invalid
@ -2008,7 +2022,6 @@ Enter [y/N]: "
y) y)
add_prmtrs ;; add_prmtrs ;;
n) n)
echo
skip ;; skip ;;
*) *)
invalid invalid
@ -2132,7 +2145,6 @@ Enter services to be enabled ${bwhite}(space-seperated)${blue}: "
==> " customservices ==> " customservices
if [[ -z "${customservices}" ]]; then if [[ -z "${customservices}" ]]; then
echo
skip skip
else else
ok ok
@ -2160,7 +2172,6 @@ Enter your Kernel parameters to be set at boot ${bwhite}(space-seperated)${blue}
==> " cust_bootopts ==> " cust_bootopts
if [[ -z "${cust_bootopts}" ]]; then if [[ -z "${cust_bootopts}" ]]; then
echo
skip skip
else else
ok ok
@ -2269,7 +2280,6 @@ Enter your Country Code, ie:${nc} ${cyan}US ${bwhite}(empty to skip)${blue}: "
==> " REGDOM ==> " REGDOM
if [[ -z "${REGDOM}" ]]; then if [[ -z "${REGDOM}" ]]; then
echo
skip skip
elif [[ "${REGDOM}" == "l" ]]; then elif [[ "${REGDOM}" == "l" ]]; then
sed 's|^#WIRELESS_REGDOM=||g' /etc/conf.d/wireless-regdom |sed 's|"||g'| more sed 's|^#WIRELESS_REGDOM=||g' /etc/conf.d/wireless-regdom |sed 's|"||g'| more
@ -2583,8 +2593,8 @@ ${magenta}###${nc}---------------------------------${magenta}[ ${bwhite}Automati
" "
read -r -p " read -r -p "
==> " smartpart ==> " smartpart
echo echo
if [[ "${smartpart}" == "y" ]]; then if [[ "${smartpart}" == "y" ]]; then
sgdsk_nmbr="${instl_dsk_nmbr}" sgdsk_nmbr="${instl_dsk_nmbr}"
elif [[ "${smartpart}" == "n" ]]; then elif [[ "${smartpart}" == "n" ]]; then
@ -3041,7 +3051,7 @@ ${multi_root}
if [[ "${autoroot}" == "y" ]]; then if [[ "${autoroot}" == "y" ]]; then
root_dev="${root_comply}" root_dev="${root_comply}"
multiroot_bootopts="root=PARTUUID=$(blkid -s PARTUUID -o value "${root_dev}") " multiroot_bootopts="root=PARTUUID=$(blkid -s PARTUUID -o value "${root_dev}")"
elif [[ "${autoroot}" == "n" ]]; then elif [[ "${autoroot}" == "n" ]]; then
stage_fail stage_fail
else else
@ -5545,7 +5555,7 @@ XBOOTCTL
GRUB_DEFAULT=0 GRUB_DEFAULT=0
GRUB_TIMEOUT=5 GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch" GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="${boot_opts}" GRUB_CMDLINE_LINUX_DEFAULT="${boot_opts[*]}"
GRUB_CMDLINE_LINUX="" GRUB_CMDLINE_LINUX=""
GRUB_PRELOAD_MODULES="part_gpt part_msdos" GRUB_PRELOAD_MODULES="part_gpt part_msdos"
GRUB_TIMEOUT_STYLE=menu GRUB_TIMEOUT_STYLE=menu
@ -5707,7 +5717,7 @@ mkinitcpio_preset() {
fi fi
if arch-chroot /mnt <<-UKI > /dev/null 2>&1 2> amelia_log.txt ; then if arch-chroot /mnt <<-UKI > /dev/null 2>&1 2> amelia_log.txt ; then
mkdir /etc/cmdline.d || exit mkdir /etc/cmdline.d || exit
echo "rw ${boot_opts}" | tee /etc/cmdline.d/cmdlined.conf || exit echo "rw ${boot_opts[*]}" | tee /etc/cmdline.d/cmdlined.conf || exit
cp /etc/mkinitcpio.d/${kernel}.preset /etc/mkinitcpio.d/${kernel}.preset.bak || exit cp /etc/mkinitcpio.d/${kernel}.preset /etc/mkinitcpio.d/${kernel}.preset.bak || exit
cat <<-MKINITPRESET > /etc/mkinitcpio.d/${kernel}.preset || exit cat <<-MKINITPRESET > /etc/mkinitcpio.d/${kernel}.preset || exit
ALL_kver="/boot/vmlinuz-${kernel}" ALL_kver="/boot/vmlinuz-${kernel}"
@ -5793,35 +5803,31 @@ set_vars() {
encr_root_dev="/dev/mapper/${ENCROOT}" encr_root_dev="/dev/mapper/${ENCROOT}"
# Encrypted Root Options # Encrypted Root Options
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}"
# Encryption Kernel Parameters # Encryption / Kernel Parameters
encr_root_bootopts="${encr_root_opts} root=${encr_root_dev} " encr_root_bootopts="${encr_root_opts} root=${encr_root_dev}"
### Encrypted Swap Setup ### Encrypted Swap Setup
## Encrypted Swap Partition ## Encrypted Swap Partition
if [[ "${swapmode}" == "1" ]]; then if [[ "${swapmode}" == "1" ]]; then
# Encrypted Swap Partition Options # Encrypted Swap Partition Options
encr_swap_opts="rd.luks.name=$(blkid -s UUID -o value "${swap_dev}")=swap" encr_swap_opts="rd.luks.name=$(blkid -s UUID -o value "${swap_dev}")=swap"
# Encrypted Swap Kernel Parameters # Encrypted Swap Partition Kernel Parameters
encr_swap_bootopts="resume=/dev/mapper/swap ${encr_swap_opts} " encr_swap_bootopts="resume=/dev/mapper/swap ${encr_swap_opts}"
## Encrypted Swapfile ## Encrypted Swapfile
elif [[ "${swapmode}" == "2" ]]; then elif [[ "${swapmode}" == "2" ]]; then
# Ext4 Offset # Ext4 Offset calculation
if [[ "${fs}" == "1" ]]; then if [[ "${fs}" == "1" ]]; then
offst="$(filefrag -v /mnt/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}')" offst="$(filefrag -v /mnt/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}')"
# Btrfs Offset # Btrfs Offset calculation
elif [[ "${fs}" == "2" ]]; then elif [[ "${fs}" == "2" ]]; then
offst="$(btrfs inspect-internal map-swapfile -r /mnt/swap/swapfile)" offst="$(btrfs inspect-internal map-swapfile -r /mnt/swap/swapfile)"
fi fi
# Encrypted Swapfile Kernel Parameters # Encrypted Swapfile Kernel Parameters
encr_swap_bootopts="resume=${encr_root_dev} resume_offset=${offst} " encr_swap_bootopts="resume=${encr_root_dev} resume_offset=${offst}"
## Zram Swap ## Zram Swap
elif [[ "${swapmode}" == "3" ]]; then elif [[ "${swapmode}" == "3" ]]; then
# Zram Swap Kernel Parameters # Zram Swap Kernel Parameters
zram_bootopts="zswap.enabled=0 " zram_bootopts="zswap.enabled=0"
## No Swap
elif [[ "${swapmode}" == "4" ]]; then
# No Swap Kernel Parameters
encr_swap_bootopts=""
fi fi
### Graphics Setup (Encryption) ### Graphics Setup (Encryption)
@ -5840,7 +5846,7 @@ set_vars() {
# Mkinitcpio Hooks (Encryption) # Mkinitcpio Hooks (Encryption)
mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf sd-vconsole block sd-encrypt filesystems fsck)" mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf sd-vconsole block sd-encrypt filesystems fsck)"
# Graphics Kernel Parameters # Graphics Kernel Parameters
vga_bootopts="nvidia.NVreg_UsePageAttributeTable=1 " vga_bootopts="nvidia.NVreg_UsePageAttributeTable=1"
# Amd # Amd
elif [[ "${vendor}" == "AMD" ]]; then elif [[ "${vendor}" == "AMD" ]]; then
# Mkinitcpio Hooks (Encryption) # Mkinitcpio Hooks (Encryption)
@ -5850,18 +5856,18 @@ set_vars() {
# Mkinitcpio Modules (Encryption) # Mkinitcpio Modules (Encryption)
mkinitcpio_mods="MODULES=(amdgpu ${fs_mod})" mkinitcpio_mods="MODULES=(amdgpu ${fs_mod})"
# Graphics Kernel Parameters # Graphics Kernel Parameters
vga_bootopts="radeon.si_support=0 amdgpu.si_support=1 amdgpu.dc=1 " vga_bootopts="radeon.si_support=0 amdgpu.si_support=1 amdgpu.dc=1"
# 'Sea Islands' support # 'Sea Islands' support
elif [[ "${islands}" == "2" ]]; then elif [[ "${islands}" == "2" ]]; then
# Mkinitcpio Modules (Encryption) # Mkinitcpio Modules (Encryption)
mkinitcpio_mods="MODULES=(amdgpu ${fs_mod})" mkinitcpio_mods="MODULES=(amdgpu ${fs_mod})"
# Graphics Kernel Parameters # Graphics Kernel Parameters
vga_bootopts="radeon.cik_support=0 amdgpu.cik_support=1 amdgpu.dc=1 " vga_bootopts="radeon.cik_support=0 amdgpu.cik_support=1 amdgpu.dc=1"
elif [[ -z "${islands}" ]]; then elif [[ -z "${islands}" ]]; then
# Mkinitcpio Modules (Encryption) # Mkinitcpio Modules (Encryption)
mkinitcpio_mods="MODULES=(${fs_mod})" mkinitcpio_mods="MODULES=(${fs_mod})"
# Graphics Kernel Parameters # Graphics Kernel Parameters
vga_bootopts="amdgpu.dc=1 " vga_bootopts="amdgpu.dc=1"
fi fi
fi fi
## Configuration = 'No' ## Configuration = 'No'
@ -5871,8 +5877,24 @@ set_vars() {
# Mkinitcpio Hooks (Encryption) # Mkinitcpio Hooks (Encryption)
mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt filesystems fsck)" mkinitcpio_hooks="HOOKS=(systemd keyboard autodetect microcode modconf kms sd-vconsole block sd-encrypt filesystems fsck)"
fi fi
### Kernel Parameters (Encryption) ### Main Kernel Parameters (Encryption)
boot_opts="${encr_root_bootopts}${encr_swap_bootopts}${vga_bootopts}${cust_bootopts}${btrfs_bootopts}${zram_bootopts}" boot_opts=("${encr_root_bootopts}")
if [[ -n "${encr_swap_bootopts}" ]]; then
boot_opts+=("${encr_swap_bootopts}")
fi
if [[ -n "${vga_bootopts}" ]]; then
boot_opts+=("${vga_bootopts}")
fi
if [[ -n "${cust_bootopts}" ]]; then
boot_opts+=("${cust_bootopts}")
fi
if [[ -n "${btrfs_bootopts}" ]]; then
boot_opts+=("${btrfs_bootopts}")
fi
if [[ -n "${zram_bootopts}" ]]; then
boot_opts+=("${zram_bootopts}")
fi
#------------------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------------------
#### Unencrypted Setup Vars #### Unencrypted Setup Vars
@ -5881,7 +5903,7 @@ set_vars() {
## Zram Swap ## Zram Swap
if [[ "${swapmode}" == "3" ]]; then if [[ "${swapmode}" == "3" ]]; then
# Zram Swap Kernel Parameters # Zram Swap Kernel Parameters
zram_bootopts="zswap.enabled=0 " zram_bootopts="zswap.enabled=0"
fi fi
### Graphics Setup ### Graphics Setup
## Configuration = 'Yes' ## Configuration = 'Yes'
@ -5899,7 +5921,7 @@ set_vars() {
# Mkinitcpio Hooks # Mkinitcpio Hooks
mkinitcpio_hooks="HOOKS=(systemd autodetect microcode modconf keyboard sd-vconsole block filesystems fsck)" mkinitcpio_hooks="HOOKS=(systemd autodetect microcode modconf keyboard sd-vconsole block filesystems fsck)"
# Graphics Kernel Parameters # Graphics Kernel Parameters
vga_bootopts="nvidia.NVreg_UsePageAttributeTable=1 " vga_bootopts="nvidia.NVreg_UsePageAttributeTable=1"
# Amd # Amd
elif [[ "${vendor}" == "AMD" ]]; then elif [[ "${vendor}" == "AMD" ]]; then
# Mkinitcpio Hooks # Mkinitcpio Hooks
@ -5909,18 +5931,18 @@ set_vars() {
# Mkinitcpio Modules # Mkinitcpio Modules
mkinitcpio_mods="MODULES=(amdgpu)" mkinitcpio_mods="MODULES=(amdgpu)"
# Graphics Kernel Parameters # Graphics Kernel Parameters
vga_bootopts="radeon.si_support=0 amdgpu.si_support=1 amdgpu.dc=1 " vga_bootopts="radeon.si_support=0 amdgpu.si_support=1 amdgpu.dc=1"
# 'Sea Islands' support # 'Sea Islands' support
elif [[ "${islands}" == "2" ]]; then elif [[ "${islands}" == "2" ]]; then
# Mkinitcpio Modules # Mkinitcpio Modules
mkinitcpio_mods="MODULES=(amdgpu)" mkinitcpio_mods="MODULES=(amdgpu)"
# Graphics Kernel Parameters # Graphics Kernel Parameters
vga_bootopts="radeon.cik_support=0 amdgpu.cik_support=1 amdgpu.dc=1 " vga_bootopts="radeon.cik_support=0 amdgpu.cik_support=1 amdgpu.dc=1"
elif [[ -z "${islands}" ]]; then elif [[ -z "${islands}" ]]; then
# Mkinitcpio Modules # Mkinitcpio Modules
mkinitcpio_mods="MODULES=()" mkinitcpio_mods="MODULES=()"
# Graphics Kernel Parameters # Graphics Kernel Parameters
vga_bootopts="amdgpu.dc=1 " vga_bootopts="amdgpu.dc=1"
fi fi
fi fi
## Configuration = 'No' ## Configuration = 'No'
@ -5930,13 +5952,23 @@ set_vars() {
# Mkinitcpio Hooks # Mkinitcpio Hooks
mkinitcpio_hooks="HOOKS=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)" mkinitcpio_hooks="HOOKS=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)"
fi fi
### Main Kernel Parameters
boot_opts=()
if [[ "${autoroot}" == "y" ]]; then if [[ "${autoroot}" == "y" ]]; then
### Multi-Root Disk Kernel Parameters (No Encryption) boot_opts+=("${multiroot_bootopts}")
boot_opts="${multiroot_bootopts}${vga_bootopts}${cust_bootopts}${btrfs_bootopts}${zram_bootopts}" fi
else if [[ -n "${vga_bootopts}" ]]; then
### Single-Root Disk Kernel Parameters (No Encryption) boot_opts+=("${vga_bootopts}")
boot_opts="${vga_bootopts}${cust_bootopts}${btrfs_bootopts}${zram_bootopts}" fi
if [[ -n "${cust_bootopts}" ]]; then
boot_opts+=("${cust_bootopts}")
fi
if [[ -n "${btrfs_bootopts}" ]]; then
boot_opts+=("${btrfs_bootopts}")
fi
if [[ -n "${zram_bootopts}" ]]; then
boot_opts+=("${zram_bootopts}")
fi fi
fi fi
} }