Kexec can spawn a
kernel-over-a-kernel without the overhead of boot firmware, while kdump can reliably collect a crash-dump
using the services of kexec.
Kexec can spawn a
kernel-over-a-kernel without the overhead of boot firmware, while kdump can reliably collect a crash-dump
using the services of kexec.
Last time, you learned to insert dynamic kernel probes using kprobes. This month, let’s continue to look at more kernel serviceability features, such as kexec and kdump, which were introduced in recent versions of the 2.6 kernel.
Kexec uses the image overlay philosophy of the UNIX exec system call to spawn a new Linux over a running Linux, without the overhead of boot firmware. Kexec has different uses including fast reboot, but one of its more interesting uses is kdump. Capturing a dump after a kernel crash is inherently unreliable, since kernel code that access the dump device may be in an unstable state. Kdump circumvents this problem by collecting the dump after booting into a healthy kernel via kexec.
All About Kexec
Kexec replaces the running kernel image with a new kernel image without going through boot firmware. This can save several seconds of reboot time, since boot firmware is usually responsible for walking buses and recognizing devices. Less reboot latency translates to less system downtime — a main motivation for implementing kexec. However, kdump is the most popular user of kexec today. Kdump works in tandem with kexec to collect reliable crash dumps.
Here are the preparations needed before you can use kexec with your kernel:
1.Compile and boot into a kernel that has kexec support. For this, turn on” Kexec system call” under” Processor type and features” in the configuration menu. Prepare the second kernel that is to be…
Please log in to view this content.
Not Yet a Member?
Register with LinuxMagazine.com and get free access to the entire archive, including: