HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

kexec — Directly reboot into a new kernel. More information: <https://manned.org/kexec>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandkexecrebootnewdirectlycliintokernel
linux

Problem

How to use the kexec command: Directly reboot into a new kernel. More information: <https://manned.org/kexec>.

Solution

kexec — Directly reboot into a new kernel. More information: <https://manned.org/kexec>.

Load a new kernel:
kexec {{[-l|--load]}} {{path/to/kernel}} --initrd={{path/to/initrd}} --command-line={{arguments}}


Load a new kernel with current boot parameters:
kexec {{[-l|--load]}} {{path/to/kernel}} --initrd={{path/to/initrd}} --reuse-cmdline


Execute a currently loaded kernel:
kexec {{[-e|--exec]}}


Unload current kexec target kernel:
kexec {{[-u|--unload]}}

Code Snippets

Load a new kernel

kexec {{[-l|--load]}} {{path/to/kernel}} --initrd={{path/to/initrd}} --command-line={{arguments}}

Load a new kernel with current boot parameters

kexec {{[-l|--load]}} {{path/to/kernel}} --initrd={{path/to/initrd}} --reuse-cmdline

Execute a currently loaded kernel

kexec {{[-e|--exec]}}

Unload current kexec target kernel

kexec {{[-u|--unload]}}

Context

tldr-pages: linux/kexec

Revisions (0)

No revisions yet.