- mesa (v25.2.6): OpenGL и Vulkan драйверы с поддержкой AMD RDNA 4 (RX 9070 XT)
* Gallium драйверы: r300, r600, radeonsi, llvmpipe, softpipe, zink * Vulkan драйверы: amd, swrast * Поддержка VA-API и VDPAU для аппаратного декодирования * Использует LLVM 18 * Заменяет стандартные пакеты mesa из репозитория - lib32-mesa (v25.2.6): 32-битная версия Mesa для поддержки 32-битных игр и приложений * Те же драйверы и функции что и в 64-битной версии * Кросс-компиляция с использованием meson cross-file * Устанавливается в /usr/lib (не конфликтует с 64-битной версией) - linux-xanmod-bin (v6.17.6): Prebuilt ядро Xanmod с оптимизациями * Автоопределение CPU микроархитектуры (x64v1-v4) * Поддержка BLS (Boot Loader Specification) с grubby * Автоматическое создание initramfs и регистрация в GRUB * Кеширование загруженных файлов
This commit is contained in:
59
linux-xanmode-bin/postremove.sh
Normal file
59
linux-xanmode-bin/postremove.sh
Normal file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
# Post-remove script for linux-xanmod-bin
|
||||
|
||||
# Get kernel version from boot files (since modules may already be removed)
|
||||
kernel_version=$(ls /boot/vmlinuz-*-xanmod1 2>/dev/null | head -n 1 | sed 's|/boot/vmlinuz-||')
|
||||
|
||||
if [ -z "$kernel_version" ]; then
|
||||
echo "Kernel version could not be determined, cleanup may be incomplete"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Cleaning up after removal of kernel $kernel_version..."
|
||||
|
||||
kernel_path="/boot/vmlinuz-$kernel_version"
|
||||
|
||||
# Remove from bootloader first
|
||||
echo "Removing kernel from bootloader..."
|
||||
if command -v grubby >/dev/null 2>&1; then
|
||||
# For RHEL/Fedora/RedOS with grubby
|
||||
if grubby --info="$kernel_path" >/dev/null 2>&1; then
|
||||
echo "Removing kernel entry using grubby..."
|
||||
grubby --remove-kernel="$kernel_path"
|
||||
echo "Kernel removed from bootloader"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Remove initramfs if it exists
|
||||
initramfs_img="/boot/initramfs-$kernel_version.img"
|
||||
if [ -f "$initramfs_img" ]; then
|
||||
echo "Removing initramfs: $initramfs_img"
|
||||
rm -f "$initramfs_img"
|
||||
fi
|
||||
|
||||
# Remove kernel image from /boot if it still exists
|
||||
if [ -f "$kernel_path" ]; then
|
||||
echo "Removing kernel image: $kernel_path"
|
||||
rm -f "$kernel_path"
|
||||
fi
|
||||
|
||||
# Remove System.map if it exists
|
||||
if [ -f "/boot/System.map-$kernel_version" ]; then
|
||||
echo "Removing System.map: /boot/System.map-$kernel_version"
|
||||
rm -f "/boot/System.map-$kernel_version"
|
||||
fi
|
||||
|
||||
# Update GRUB configuration (for non-BLS systems)
|
||||
if command -v update-grub >/dev/null 2>&1; then
|
||||
echo "Updating GRUB configuration..."
|
||||
update-grub
|
||||
elif command -v grub2-mkconfig >/dev/null 2>&1 && ! command -v grubby >/dev/null 2>&1; then
|
||||
echo "Updating GRUB2 configuration..."
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
elif command -v grub-mkconfig >/dev/null 2>&1 && ! command -v grubby >/dev/null 2>&1; then
|
||||
echo "Updating GRUB configuration..."
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
fi
|
||||
|
||||
echo "Kernel $kernel_version has been removed."
|
||||
echo "Please ensure you have another kernel installed before rebooting."
|
||||
Reference in New Issue
Block a user