Skip to content

Commit

Permalink
update kexec-kdump-howto
Browse files Browse the repository at this point in the history
1. yum is deprecated so use dnf instead
2. use the "kdumpctl reset-crashkernel" API
  • Loading branch information
coiby committed Apr 15, 2022
1 parent f61c793 commit 13a7017
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions kexec-kdump-howto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ia64 and ppc64.
If you're reading this document, you should already have kexec-tools
installed. If not, you install it via the following command:

# yum install kexec-tools
# dnf install kexec-tools

Now load a kernel with kexec:

Expand All @@ -66,23 +66,24 @@ How to configure kdump
Again, we assume if you're reading this document, you should already have
kexec-tools installed. If not, you install it via the following command:

# yum install kexec-tools
# dnf install kexec-tools

To be able to do much of anything interesting in the way of debug analysis,
you'll also need to install the kernel-debuginfo package, of the same arch
as your running kernel, and the crash utility:

# yum --enablerepo=\*debuginfo install kernel-debuginfo.$(uname -m) crash
# dnf --enablerepo=\*debuginfo install kernel-debuginfo.$(uname -m) crash

Next up, we need to modify some boot parameters to reserve a chunk of memory for
the capture kernel. With the help of grubby, it's very easy to append
"crashkernel=128M" to the end of your kernel boot parameters. Note that the X
values are such that X = the amount of memory to reserve for the capture kernel.
And based on arch and system configuration, one might require more than 128M to
be reserved for kdump. One need to experiment and test kdump, if 128M is not
sufficient, try reserving more memory.
Next up, we need to reserve a chunk of memory for the capture kernel. To use
the default crashkernel value, you can kdumpctl:

# grubby --args="crashkernel=128M" --update-kernel=/boot/vmlinuz-`uname -r`
# kdumpctl reset-crashkernel --kernel=/boot/vmlinuz-`uname -r`

If based on arch and system configuration, the default crashkernel isn't
sufficent, you can specify a larger value e.g crashkernel=256M after
experimenting and testing kdump with the help of grubby:

# grubby --args="crashkernel=256M" --update-kernel=/boot/vmlinuz-`uname -r`

Note that there is an alternative form in which to specify a crashkernel
memory reservation, in the event that more control is needed over the size and
Expand Down

0 comments on commit 13a7017

Please sign in to comment.