CachyOS Kernel Management - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
CachyOS Kernel Management Guide
Complete beginner-friendly guide to managing kernels on CachyOS, including installation, removal, switching, and kernel configuration.
Table of Contents
- Understanding Kernels
- Available Kernels
- Installing Kernels
- Removing Kernels
- Switching Kernels
- Kernel Configuration
- Troubleshooting
Understanding Kernels
What is a Kernel?
Kernel is the core of the operating system.
What it does:
- Manages hardware: Controls hardware devices
- Manages memory: Handles RAM and memory
- Manages processes: Controls running programs
- System interface: Interface between hardware and software
Why different kernels:
- Different schedulers: BORE, EEVDF, etc.
- Different features: RT, LTS, etc.
- Different optimizations: Performance, stability
Available Kernels
CachyOS Kernels
linux-cachyos:
- Scheduler: BORE (default)
- Best for: Desktop, gaming
- Features: Performance optimized
linux-cachyos-eevdf:
- Scheduler: EEVDF
- Best for: General use, servers
- Features: Modern fair scheduler
linux-cachyos-sched-ext:
- Scheduler: sched-ext (extensible)
- Best for: Advanced users
- Features: Custom schedulers
linux-cachyos-rt:
- Type: Real-time kernel
- Best for: Real-time applications
- Features: Low latency
linux-cachyos-lts:
- Type: Long-term support
- Best for: Stability
- Features: Long-term updates
List Installed Kernels
Check installed kernels:
pacman -Q | grep linux
What this does:
- Lists installed kernel packages
- Shows kernel versions
- Helps identify kernels
Installing Kernels
Install Kernel
Install linux-cachyos:
sudo pacman -S linux-cachyos linux-cachyos-headers
What this does:
- Installs kernel
- Installs kernel headers (for modules)
- Makes kernel available
Install other kernels:
sudo pacman -S linux-cachyos-eevdf linux-cachyos-eevdf-headers
What this does:
- Installs EEVDF kernel
- Installs headers
- Adds kernel option
Using Kernel Manager
CachyOS Kernel Manager:
- GUI tool for kernel management
- Easy kernel installation
- User-friendly interface
Launch:
cachyos-kernel-manager
Or from application menu
Removing Kernels
Remove Kernel
Remove kernel:
sudo pacman -Rns linux-cachyos
What this does:
- Removes kernel package
-Rns: Removes with dependencies and configs- Frees disk space
** Keep at least 2 kernels!**
Why:
- Backup if one kernel fails
- Can boot from other kernel
- Safety measure
Remove Old Kernels
List old kernels:
pacman -Q | grep linux | grep -v headers
What this does:
- Lists kernels (not headers)
- Helps identify old kernels
- Shows what can be removed
Remove old kernel:
sudo pacman -Rns linux-cachyos-5.19.1-1
What this does:
- Removes specific kernel version
- Keep current and one backup
- Frees space
Switching Kernels
At Boot
GRUB:
- Boot system
- At GRUB menu, select "Advanced options"
- Choose kernel to boot
- Boot with selected kernel
systemd-boot:
- Boot system
- Select kernel entry
- Boot with selected kernel
rEFInd:
- Boot system
- Select kernel from menu
- Boot with selected kernel
Set Default Kernel
GRUB:
sudo nano /etc/default/grub
Set default:
GRUB_DEFAULT="Advanced options for Arch Linux>Arch Linux, with Linux linux-cachyos"
Update GRUB:
sudo grub-mkconfig -o /boot/grub/grub.cfg
What this does:
- Sets default kernel
- Updates boot menu
- Applies at next boot
Kernel Configuration
Kernel Parameters
Edit GRUB:
sudo nano /etc/default/grub
Add parameters:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on"
What this does:
- Adds kernel parameters
- Applies to all kernels
- Useful for hardware configuration
Update GRUB:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Kernel Modules
List loaded modules:
lsmod
What this does:
- Lists loaded kernel modules
- Shows active modules
- Helps identify modules
Load module:
sudo modprobe module-name
What this does:
- Loads kernel module
- Enables module functionality
- Temporary (until reboot)
Blacklist module:
echo "blacklist module-name" | sudo tee -a /etc/modprobe.d/blacklist.conf
What this does:
- Prevents module from loading
- Permanent blacklist
- Useful for problematic modules
Troubleshooting
Kernel Won't Boot
Boot from other kernel:
- Boot system
- Select different kernel at boot
- Boot successfully
- Remove problematic kernel
Check kernel logs:
journalctl -k
What this does:
- Shows kernel messages
- Helps identify issues
- Troubleshooting information
Module Issues
Check module status:
modinfo module-name
What this does:
- Shows module information
- Verifies module exists
- Helps troubleshoot
Reinstall kernel:
sudo pacman -S linux-cachyos
What this does:
- Reinstalls kernel
- May fix module issues
- Restores kernel files
Additional Resources
- CachyOS Performance Guide - Kernel optimizations
- CachyOS Tools Guide - Kernel manager
- CachyOS Boot Manager Configuration - Boot configuration
- Arch Linux Wiki - Kernel: https://wiki.archlinux.org/title/Kernel
Summary
This guide covered:
- Understanding kernels - What kernels are and why they matter
- Available kernels - Different CachyOS kernels
- Installing kernels - How to install kernels
- Removing kernels - How to remove old kernels
- Switching kernels - How to switch between kernels
- Kernel configuration - Kernel parameters and modules
- Troubleshooting - Common kernel issues
Key Takeaways:
- Multiple kernels available for different needs
- Install kernels with headers for module support
- Keep at least 2 kernels installed
- Switch kernels at boot menu
- Configure kernel parameters in GRUB
- Use kernel manager for easy management
- Remove old kernels to free space
This guide is based on the CachyOS Wiki and Arch Linux Wiki and expanded with detailed explanations for beginners. For the most up-to-date kernel information, always refer to the official documentation.