Skip to content

Commit

Permalink
debugging: slides: add more information on kdump
Browse files Browse the repository at this point in the history
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
  • Loading branch information
clementleger committed Nov 16, 2022
1 parent f9b518c commit 22becc0
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions slides/debugging-kernel-debugging/debugging-kernel-debugging.tex
Original file line number Diff line number Diff line change
Expand Up @@ -131,29 +131,48 @@ \section{Kernel Debugging}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{kexec \& kdump}
\begin{frame}[fragile]
\frametitle{kexec \& kdump (1/2)}
\begin{itemize}
\item On panic, kdump will start a "dump-capture kernel" directly from the
\item On panic, kdump will start a "kdump kernel" directly from the
kernel that crashed
\begin{itemize}
\item Most of the time, a specific minimal dump-capture kernel is compiled
\item Most of the time, a specific minimal kdump kernel is compiled
for that task
\end{itemize}
\item This kernel will allow to dump the \code{/proc/vmcore} file from
{\em procfs}
\item {\em kexec} works by saving some RAM for the crash kernel execution at
\item {\em kexec} works by saving some RAM for the kdump kernel execution at
startup
\begin{itemize}
\item \code{crashkernel} parameter should be set to specify the crash
kernel dedicated physical memory region
\item \code{crashkernel=size[KMG][@offset[KMG]]}
\end{itemize}
\item {\em kexec-tools} are then used to prepare a kernel to be executed in
this memory zone.
\item {\em kexec-tools} are then used to prepare a kdump kernel to be
executed in this memory zone using the \code{kexec} command
\end{itemize}
\begin{block}{}
\begin{minted}[fontsize=\footnotesize]{console}
$ kexec --type zImage --dtb=my_dtb.dtb --initrd=myinitrd --append="ttyS0
max_cpus=1 reset_devices" -p myzImage
\end{minted}
\end{block}
\end{frame}
\begin{frame}
\frametitle{kexec \& kdump (2/2)}
\begin{itemize}
\item The command line additional options depends on the architecture
\item See \kdochtml{admin-guide/kdump/kdump} for more comprehensive
explanations on how to setup the kdump kernel with \code{kexec}.
\item Finally, on panic, the kernel will reboot into the kdump kernel
allowing the user to dump \code{/dev/vmcore} onto whatever media
\item Additional user-space services and tools allows to automatically
collect and dump the vmcore file to remote location.
\item \kdochtml{admin-guide/kdump/kdump}
\begin{itemize}
\item See kdump systemd service and the \code{makedumpfile} tool which
can also compress the vmcore file into a smaller file.
\item \url{https://github.com/makedumpfile/makedumpfile}
\end{itemize}
\end{itemize}
\end{frame}
Expand All @@ -180,7 +199,6 @@ \section{Kernel Debugging}
\end{itemize}
\end{frame}

\begin{frame}[fragile]
\frametitle{{\em crash} example}
\begin{itemize}
Expand Down

0 comments on commit 22becc0

Please sign in to comment.