\section{Customizing the GRUB Configuration}

\begin{frame}
   {GRUB Configuration Files}

   \begin{itemize}
      \item Do not edit \filelink{/boot/grub/grub.cfg} (or
      \filelink{/boot/grub2/grub.cfg}) directly
      \item Edit \filelink{/etc/default/grub} and the files in
      \filelink{/etc/grub.d}
      \item \filelink{grub.cfg} is rewritten every time
      \textbf{update-grub} is run.

      \begin{figure}[H]
         \includegraphics[width=0.85\textwidth]{IMAGES/etcdefaultgrub}
         \caption{/etc/default/grub on RHEL 8}
      \end{figure}
      \item New file can be generated by \textbf{grub2-mkconfig}
      or \textbf{grub-mkconfig}
   \end{itemize}

\end{frame}

\cprotect\note {

   For \textbf{GRUB 2} two locations in the \filelink{/etc}
   directory require attention and are used to reconstruct
   \filelink{grub.cfg} whenever the system is altered with
   new kernels, or the relevant updating program (such as
   \textbf{update-grub} or \textbf{grubby})
   is run manually.

   The first one is \filelink{/etc/default/grub}.
   In addition, the directory \filelink{/etc/grub.d} matters.
   On \textbf{Ubuntu 19.10}:
   \begin{figure}[H]
      \includegraphics[height=2.0in]{IMAGES/etcgrubd}
      \caption{/etc/grub.d contents}
   \end{figure}
   Each of these files is run ascending order when the
   configuration file is updated.
}

