System information

kexec and kdump 207
The capture kernel is loaded to the reserved area and waits for the kernel to crash.
Then kdump tries to invoke the capture kernel because the production kernel is no
longer reliable at this stage. This means that even kdump can fail.
To load the capture kernel, you need to include the kernel boot parameters. Usually,
the initial RAM file system is used for booting. You can specify it with --initrd
= filename. With --append = cmdline , you append options to the command
line of the kernel to boot. It is helpful to include the command line of the production
kernel if these options are necessary for the kernel to boot. You can simply copy the
command line with --append = "$(cat /proc/cmdline)" or add more op-
tions with --append = "$(cat /proc/cmdline) more_options" .
You can always unload the previously loaded kernel. To unload a kernel that was
loaded with the -l option, use the kexec -u command. To unload a crash kernel
loaded with the -p option, use kexec -p -u command.
18.4 Basic kexec Usage
To verify if your kexec environment works properly, follow these steps:
1 Make sure no users are currently logged in and no important services are running
on the system.
2 Log in as root.
3 Switch to runlevel 1 with telinit 1
4 Load the new kernel to the address space of the production kernel with the follow-
ing command:
kexec -l /boot/vmlinuz --append="$(cat /proc/cmdline)"
--initrd=/boot/initrd
5 Unmount all mounted file systems except the root file system with umount -a
IMPORTANT: Unmounting Root Filesystem
Unmounting all file systems will most likely produce a device is busy
warning message. The root file system cannot be unmounted if the system
is running. Ignore the warning.