HOME

TheInfoList



OR:

kexec, abbreviated from ''kernel execute'' and analogous to the Unix/Linux kernel call ''
exec Exec or EXEC may refer to: * Executive officer, a person responsible for running an organization * Executive producer, provides finance and guidance for the making of a commercial entertainment product * A family of kit helicopters produced by Rot ...
'', is a mechanism of the Linux kernel that allows booting of a new
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learn ...
from the currently running one. Essentially, kexec skips the
bootloader A bootloader, also spelled as boot loader or called boot manager and bootstrap loader, is a computer program that is responsible for booting a computer. When a computer is turned off, its softwareincluding operating systems, application code, an ...
stage and hardware initialization phase performed by the system firmware ( BIOS or
UEFI UEFI (Unified Extensible Firmware Interface) is a set of specifications written by the UEFI Forum. They define the architecture of the platform firmware used for booting and its interface for interaction with the operating system. Examples of ...
), and directly loads the new kernel into main memory and starts executing it immediately. This avoids the long times associated with a full reboot, and can help systems to meet high-availability requirements by minimizing
downtime The term downtime is used to refer to periods when a system is unavailable. The unavailability is the proportion of a time-span that a system is unavailable or offline. This is usually a result of the system failing to function because of an u ...
. While feasible, implementing a mechanism such as kexec raises two major challenges: * Memory of the currently running kernel is overwritten by the new kernel, while the old one is still executing. * The new kernel will usually expect all hardware devices to be in a well defined state, in which they are after a system reboot because the system firmware resets them to a "sane" state. Bypassing a real reboot may leave devices in an unknown state, and the new kernel will have to recover from that. Support for allowing only signed kernels to be booted through kexec was merged into version 3.17 of the
Linux kernel mainline The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU o ...
, which was released on October 5, 2014. This disallows a
root user In computing, the superuser is a special user account used for system administration. Depending on the operating system (OS), the actual name of this account might be root, administrator, admin or supervisor. In some cases, the actual name of th ...
to load arbitrary code via kexec and execute it, complementing the
UEFI secure boot UEFI (Unified Extensible Firmware Interface) is a set of specifications written by the UEFI Forum. They define the architecture of the platform firmware used for booting and its interface for interaction with the operating system. Examples of ...
and in-kernel security mechanisms for ensuring that only signed
Linux kernel module In computing, a loadable kernel module (LKM) is an object file that contains code to extend the running kernel, or so-called ''base kernel'', of an operating system. LKMs are typically used to add support for new hardware (as device drivers) and ...
s can be inserted into the running kernel. Kexec is used by
LinuxBoot LinuxBoot is a free software project aimed at replacing most of the Driver Execution Environment (DXE) modules in Unified Extensible Firmware Interface (UEFI) firmware with the Linux kernel. LinuxBoot must run on top of hardware initialisation s ...
to boot the main kernel from the Linux kernel located in the firmware.


See also

*
kdump (Linux) kdump is a feature of the Linux kernel that creates crash dumps in the event of a kernel crash. When triggered, kdump exports a memory image (also known as vmcore) that can be analyzed for the purposes of debugging and determining the cause ...
Linux kernel's crash dump mechanism, which internally uses kexec *
Kernel relocation Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learni ...
Linux feature in which a kernel can be compiled to be bootable at a variety of different memory addresses *
kGraft kGraft is a feature of the Linux kernel that implements live patching of a running kernel, which allows kernel patches to be applied while the kernel is still running. By avoiding the need for rebooting the system with a new kernel that cont ...
Linux kernel live patching technology developed by SUSE *
kpatch kpatch is a feature of the Linux kernel that implements live patching of a running kernel, which allows kernel patches to be applied while the kernel is still running. By avoiding the need for rebooting the system with a new kernel that cont ...
Linux kernel live patching technology developed by Red Hat *
Ksplice Ksplice is an open-source extension of the Linux kernel that allows security patches to be applied to a running kernel without the need for reboots, avoiding downtimes and improving availability (a technique broadly referred to as dynamic softw ...
Linux kernel live patching technology developed by Ksplice, Inc. and later bought by Oracle


References

Linux kernel features Linux kernel live patching {{Linux-stub