Kexec: Difference between revisions

From Alpine Linux
m (→‎Usage: grammar)
m (→‎Usage: Use openrc shutdown to unmount filesystems and gracefully shut down services.)
Line 9: Line 9:
{{Cmd|# kexec -l /boot/vmlinuz-edge --initrd \
{{Cmd|# kexec -l /boot/vmlinuz-edge --initrd \
     /boot/initramfs-edge --reuse-cmdline
     /boot/initramfs-edge --reuse-cmdline
# openrc shutdown
# kexec -e}}
# kexec -e}}
{{Warning|Running <code>kexec -e</code> does not unmount any filesystems or gracefully shut down any services!}}


There are no Alpine-specific considerations for Kexec. Please review the man page and existing references below for more details. This page is deliberately kept short in order to avoid duplicating existing documentation.
There are no Alpine-specific considerations for Kexec. Please review the man page and existing references below for more details. This page is deliberately kept short in order to avoid duplicating existing documentation.

Revision as of 08:27, 5 September 2023

Kexec is a system call that enables loading and booting into another kernel. This is useful for faster reboots that skip the BIOS or UEFI initialisation process.

Installing kexec-tools

The userspace tools required to use it can be installed via

apk add kexec-tools kexec-tools-doc

The tools are not available on all flavors of Alpine, additionally not all kernels are compiled with the kexec syscall enabled. You will most likely want to check your /boot/config-* file for CONFIG_KEXEC=y

Usage

On a typical Alpine setup, it can be used via:

# kexec -l /boot/vmlinuz-edge --initrd \ /boot/initramfs-edge --reuse-cmdline # openrc shutdown # kexec -e

There are no Alpine-specific considerations for Kexec. Please review the man page and existing references below for more details. This page is deliberately kept short in order to avoid duplicating existing documentation.

See also