The Kernel Boot (kboot
) utility uses kexec and is designed for Nitrux OS to provide a solution to make it friendlier to load other Linux kernels on the fly.
⚠️ Important:kboot
is intended to work exclusively in Nitrux OS, and using this utility in other distributions is not supported. Please do not open issues regarding this use case; they will be closed.
Kernel Boot is designed for a particular purpose, making it easier to transition from the currently running kernel to a new kernel and avoiding the time-consuming hardware initialization and bootloader stages. It performs the following steps:
- Reads the settings in the specified configuration file.
- Then, use
kexec
to load the selected kernel using the parameters from the configuration file.
♦ Information: Kernel Boot is included by default starting with Nitrux 2.9.1.
- Minimalistic, focusing on necessary functionality.
- A CLI utility.
- 100% Free and Open Source Software written entirely in POSIX-compliant scripting language.
- A bootloader.
- Kernel Boot` uses a mechanism for loading and executing a new kernel within an already running system, bypassing the complete boot process. In comparison, a bootloader such as GRUB is a full-featured bootloader responsible for the initial bootstrapping of the operating system. GRUB provides a menu to select the desired operating system or kernel.
- An init or service manager.
- Kernel Boot does not function as an init or replace an init. The init process is responsible for initializing the system, starting essential system services and daemons, and bringing up the user space environment. Kernel Boot does not perform these functions, Kernel Boot only loads a new kernel image.
- An initrd or initram generator.
- Kernel Boot does not replace or modify the existing initramfs generator. The initram generator tools like dracut or initramfs-tools are responsible for identifying and including the necessary modules, drivers, and scripts to correctly set up the root filesystem and handle any unique configurations (e.g., encrypted root, LVM, RAID, etc.). Kernel Boot loads a kernel and an existing initram image and transfers control to it.
- A container, virtual machine, Live USB creator, Linux distribution, Live/Recovery/Rescue/Emergency environment, system installer, desktop environment, firmware, or "proprietary software."
- Note: We don't know why anyone would think that, but one can never know, so let's clarify that.
- Nitrux 2.9.0+.
Kernel Boot can work with previous releases that include kexec, such as Nitrux 2.9.0.
Using kboot
on Previous Releases
For releases of Nitrux where kboot
is not available by default, do the following.
git clone --depth=1 https://github.com/Nitrux/kboot.git $HOME/kboot
sudo cp $HOME/kboot/usr/bin/kboot /usr/bin
sudo cp -r $HOME/kboot/etc/kboot.d /etc
Kernel Boot is designed to be highly autonomous.
Switch: sudo kboot switch <config_file>
- Switches the kernel using the settings in the specified configuration file, e.g.,
/etc/kboot.d/debian
or/etc/kboot.d/liquorix
.
⚠️ Important: This process involves stopping the currently running kernel and starting the new kernel from scratch. All running processes, including the graphical session, are terminated during this transition. For users of NVIDIA GPUs, using Kernel Boot is not a viable option due to how the NVIDIA proprietary driver works with the Linux kernel.
Kernel Boot uses the directory /etc/kboot.d
files to load kernels.
⚠️ Important: The files in this directory must refer to a valid kernel (vmlinuz) and initram images (initrd.img) within the filesystem. We recommend putting kernel images other than the default kernel and initrd in the directory /kboot for better organization. In addition, to prevent polluting the GRUB menu.
sudo kboot -h
: Displays the help ofkboot
.sudo kboot -d
: Runskboot
in verbose mode.sudo kboot -v
: Displays the version ofkboot
.
The repository and its contents are licensed under BSD-3-Clause.
If any problems are encountered, users can create an issue.
©2023 Nitrux Latinoamericana S.C.