How Manjaro Linux Handles GUI Kernel Swapping
Manjaro Linux simplifies the typically complex process of updating and changing the Linux kernel through its graphical user interface (GUI) tool within the Manjaro Settings Manager. This article explains how the operating system detects available kernels, automates the installation and dependency resolution process, configures the bootloader, and provides safety measures to allow users to switch between kernels seamlessly without using the command line.
The Manjaro Settings Manager Kernel Module
At the center of Manjaro’s graphical kernel management is the "Kernels" module within the Manjaro Settings Manager (MSM). While underlying hardware detection is governed by the Manjaro Hardware Detection (MHWD) system, the Kernel GUI tool interfaces directly with Manjaro's official repositories and the Pacman package manager.
When opened, the tool scans the system and remote repositories to present a clean, categorized list of all available Linux kernels. These are labeled clearly with designations such as:
- Running / Installed: Highlights the kernel currently loaded into RAM and other installed versions.
- LTS (Long Term Support): Recommended for daily stability.
- Recommended: The primary kernel recommended by the distribution maintainers.
- Real-Time (RT): Tuned for low-latency audio or specialized production workloads.
- Experimental: The latest mainline release for testing modern hardware features.
Automated Installation and Module Rebuilding
When a user clicks "Install" next to a desired kernel version, the GUI triggers a sequence of automated scripts in the background:
- Dependency Resolution: The system fetches the core
kernel image (
linuxXYZ), along with its corresponding modules. - Driver Compatibility: If the user has proprietary drivers installed (such as Nvidia graphics drivers) or Dynamic Kernel Module Support (DKMS) packages, the tool automatically identifies and downloads the matching modules built for the target kernel version, preventing broken drivers on the next boot.
- Initramfs Generation: The system executes
mkinitcpioautomatically to construct the initial ramdisk environment tailored to the new kernel and the user's specific storage configuration.
Bootloader Integration
Once the kernel files and modules are in place, the tool
automatically updates the GRUB bootloader configuration. It runs
update-grub in the background, adding the newly installed
kernel to the system's boot menu.
Manjaro preserves existing kernels during this process rather than overwriting them. This multi-kernel architecture ensures that if a newly installed kernel fails to boot due to hardware incompatibility, the user can simply reboot, open GRUB's "Advanced options for Manjaro Linux," and select the previously functional kernel.
Safeguards and Safe Removal
The GUI prevents common user errors by implementing strict operational safeguards:
- Active Kernel Protection: The tool grays out or disables the "Remove" button for the currently active kernel, preventing accidental deletion of the running environment.
- Multiple Kernel Retention: Users are encouraged to keep at least two kernels (typically the latest stable version and an LTS fallback) installed simultaneously.
- Clean Uninstallation: When an older kernel is marked for removal, the GUI completely removes the kernel image, extra module packages, and related initramfs files, subsequently refreshing GRUB to cleanly remove the entry from the boot menu.