mirror of
https://github.com/stornic56/debianito-post-install.git
synced 2026-09-14 06:02:35 +00:00
fa81a9f1aa
- Fixed Mesa 32-bit dependency conflicts by removing mesa-va-drivers from gaming setup; mesa-libgallium now includes VA-API for Mesa >= 25.3.3, resolving solver errors with backports (Mesa 26.x). - Removed corectrl detection and installation from AMD tools in gpu/amd_intel.sh (retained in System Tools checklist only). - Added zutty terminal emulator option alongside alacritty for Debian 12+ in terminals.sh. - Overhauled Kernel menu: replaced "Backports Kernel" with "Kernel" submenu offering Stable, RT, Cloud, and Backports options; removed hardcoded Debian 11 restriction (backports hidden only on Bullseye); headers now installed automatically with all kernel variants; NVIDIA warnings added for Backports (DKMS required) and RT (driver compatibility note). - Implemented AMD GCN legacy driver migration: is_amd_legacy_gcn() function detects GCN 1.0/1.1 GPUs via whitelist of 85 PCI IDs; offers user prompt to force amdgpu module with GRUB parameters (radeon.si_support=0, radeon.cik_support=0, amdgpu.si_support=1, amdgpu.cik_support=1); safe sed-based injection into GRUB_CMDLINE_LINUX_DEFAULT with backup and idempotency check. - Standardized UI across 27 checklist locations: unified text to "Check [*] the packages you want installed/updated on your system."; removed SCROLL_HINT variable entirely from all code; changed OK button to "Apply" in _checklist() and _inputbox() only (not in _msg/_menu). - Reordered gaming menu checklists: i386 moved to top position, steam/mangohud positioned immediately after for better dependency flow. - Enhanced kernel installation prompts: all variants (Stable, RT, Cloud, Backports) now display candidate version numbers in parentheses using apt-cache policy and madison queries. - update readme
78 lines
3.4 KiB
Bash
78 lines
3.4 KiB
Bash
#!/usr/bin/env bash
|
|
# kernel.sh — Submenu for kernel variants: Stable, RT, Cloud, Backports
|
|
|
|
show_kernel_menu() {
|
|
while true; do
|
|
local items=("stable" "Install linux-image-amd64")
|
|
[ "$DEBIAN_VERSION" != "11" ] && items+=("backports" "Install from backports")
|
|
items+=("rt" "Install linux-image-rt-amd64 (Preempt-RT)")
|
|
items+=("cloud" "Install linux-image-cloud-amd64")
|
|
items+=("back" "Return to main menu")
|
|
|
|
local choice
|
|
choice=$(_menu "Kernel Installation" "Select kernel variant:" \
|
|
16 65 5 "${items[@]}")
|
|
[ -z "$choice" ] && break
|
|
clear
|
|
|
|
case "$choice" in
|
|
stable) _install_kernel_package "linux-image-amd64" "Stable" "" ;;
|
|
rt) _install_kernel_package "linux-image-rt-amd64" "RT" "" ;;
|
|
cloud) _install_kernel_package "linux-image-cloud-amd64" "Cloud" "" ;;
|
|
backports)
|
|
if [ "$(is_backports_enabled)" != "true" ]; then
|
|
_msg "Kernel" "Backports repository is not enabled.\n\nUse option 3 (Configure repositories) to enable backports\nbefore installing the backports kernel."
|
|
else
|
|
_install_kernel_package "linux-image-amd64" "Backports" \
|
|
"-t ${DEBIAN_CODENAME}-backports"
|
|
fi
|
|
;;
|
|
back) break ;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
_install_kernel_package() {
|
|
local pkg_base="$1"
|
|
local flavor="$2"
|
|
local bpo_flag="$3"
|
|
|
|
if ! apt-cache show "$pkg_base" >/dev/null 2>&1; then
|
|
_msg "Kernel" "Kernel not available for your current version of Debian.\n\nPackage: ${pkg_base}" 10 60
|
|
return
|
|
fi
|
|
|
|
if [ "$flavor" = "Backports" ] && [ "$GPU_TYPE" = "nvidia" ]; then
|
|
if ! _confirm "Kernel" "WARNING: Backports kernel changes the kernel version.\nYour NVIDIA driver will need recompilation (DKMS).\n\nProceed?"; then
|
|
echo "Skipping."; return
|
|
fi
|
|
fi
|
|
if [ "$flavor" = "RT" ] && [ "$GPU_TYPE" = "nvidia" ]; then
|
|
_msg "Kernel — RT" "Note: Ensure your NVIDIA driver supports the RT (Preempt-RT) kernel.\nSome proprietary drivers may not work correctly." 10 60
|
|
fi
|
|
|
|
local headers_pkg="${pkg_base/linux-image-/linux-headers-}"
|
|
local ver headers_ver
|
|
if [ -n "$bpo_flag" ]; then
|
|
ver=$(apt-cache madison "$pkg_base" 2>/dev/null | grep "${DEBIAN_CODENAME}-backports" | awk '{print $3}' | head -1)
|
|
headers_ver=$(apt-cache madison "$headers_pkg" 2>/dev/null | grep "${DEBIAN_CODENAME}-backports" | awk '{print $3}' | head -1)
|
|
else
|
|
ver=$(apt-cache show "$pkg_base" 2>/dev/null | sed -n 's/^Version: //p' | grep -v '~bpo' | head -1)
|
|
headers_ver=$(apt-cache show "$headers_pkg" 2>/dev/null | sed -n 's/^Version: //p' | grep -v '~bpo' | head -1)
|
|
fi
|
|
[ -n "$ver" ] && ver=" ($ver)"
|
|
[ -n "$headers_ver" ] && headers_ver=" ($headers_ver)"
|
|
local summary="Install ${flavor} kernel?\n Image: ${pkg_base}${ver}\n Headers: ${headers_pkg}${headers_ver}"
|
|
[ -n "$bpo_flag" ] && summary+="\n From: ${DEBIAN_CODENAME^}-backports"
|
|
|
|
if ! _confirm "Kernel — ${flavor}" "$summary"; then
|
|
echo "Skipping."; return
|
|
fi
|
|
|
|
_run_cmd "Kernel" "sudo apt install -y ${bpo_flag} ${pkg_base} ${headers_pkg}" \
|
|
"Installing ${flavor} kernel + headers..."
|
|
|
|
echo -e "${GREEN}${flavor} kernel installed. Reboot to use it.${NC}"
|
|
_pause
|
|
}
|