\input{configpres}

\title{Kexec and Crashkernels}
\maketitle
\begin{frame}
\frametitle{What is kexec?}
Kexec is a mechanism to boot Linux from within Linux,
without going through the BIOS / the Bootloader.
\end{frame}

\begin{frame}
\frametitle{kexec-tools}
http://horms.net/projects/kexec/
\end{frame}

\begin{frame}[fragile]
\frametitle{Using kexec: Kernel configuration}
\begin{verbatim}
Boot options -->
[*] Kexec system call
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Using kexec: Booting the new kernel}
\begin{verbatim}
# Load the kernel image and set the commandline
$ kexec -l uImage --append=$(cat /proc/cmdline)
# Start the new kernel
$ kexec -e
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Using kexec: Crashkernel}
\begin{itemize}
\item Build production kernel (enable kexec system call!)
\item Build ''crash kernel'' (enable kexec system call and crash dump kernel):
\begin{verbatim}
Boot options -->
[*] Kexec system call
[*] Build kdump crash kernel
\end{verbatim}
\item The crash kernel option should automatically select /proc/vmcore
\end{itemize}
\end{frame}


\begin{frame}[fragile]
\frametitle{Using kexec: Crashkernel}
\begin{itemize}
\item Boot production kernel (Commandline: crashkernel=256M@0x84000000)
\item Check if crashkernel memory was reserved: 
\begin{verbatim}
cat /proc/iomem | grep Crash
   84000000-93ffffff : Crash kernel
\end{verbatim}
\item Load crash kernel and let the system crash ;-)
\begin{verbatim}
kexec -p uImage-crash \
  --append="$(cat /proc/cmdline | \
    sed 's/crashkernel/bla/')"
echo c > /proc/sysrq-trigger
\end{verbatim}
\item After crashing the crash kernel should boot up!
\item Within the crashkernel the core file for the production kernel is available in /proc/vmcore
\end{itemize}
\end{frame}

\input{tailpres}
