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

  1. Understanding Kernels
  2. Available Kernels
  3. Installing Kernels
  4. Removing Kernels
  5. Switching Kernels
  6. Kernel Configuration
  7. 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:

  1. Boot system
  2. At GRUB menu, select "Advanced options"
  3. Choose kernel to boot
  4. Boot with selected kernel

systemd-boot:

  1. Boot system
  2. Select kernel entry
  3. Boot with selected kernel

rEFInd:

  1. Boot system
  2. Select kernel from menu
  3. 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:

  1. Boot system
  2. Select different kernel at boot
  3. Boot successfully
  4. 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


Summary

This guide covered:

  1. Understanding kernels - What kernels are and why they matter
  2. Available kernels - Different CachyOS kernels
  3. Installing kernels - How to install kernels
  4. Removing kernels - How to remove old kernels
  5. Switching kernels - How to switch between kernels
  6. Kernel configuration - Kernel parameters and modules
  7. 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.