\section{Boot Loader Specification Configuration (BLSCFG)}

\begin{frame}
   {BLSCFG}
   \begin{itemize}
      \item
      \textbf{blscfg} (Boot Loader Specification Configuration)
      \textbf{grub} methods were introduced in \textbf{Fedora 30} and
      \textbf{RHEL 8}
      \item
      Transparent to normal user but where the
      \textbf{generated} configuration files are is quite
      different:
      \begin{itemize}
         \item \filelink{/boot/loader/entries}
         \item \filelink{/boot/grub2/grubenv} (linked to
         \filelink{/boot/grub2/grub.cfg})
      \end{itemize}
      \item
      See \url{https://systemd.io/BOOT_LOADER_SPECIFICATION/}
      \item
      Can switch to with \textbf{grub2-switch-to-blscfg} if available
      \item
      Not clear if other \textbf{Linux} distributions will use

   \end{itemize}

\end{frame}

\cprotect\note{

   On systems configured with \textbf{BLSCFG} one still uses
   the usual \textbf{grub} commands when installing or
   updating kernels etc.  When booting one will still see the
   same interactive \textbf{grub} screen and use it as it has
   always been done.

   However, some differences are important.  For example,
   while \filelink{/boot/grub2/grub.cfg} still exists,
   detailed information and options for each kernel that can
   be chosen does not appear there; it is in
   \filelink{/boot/loader/entries}, one file for each choice.

   It is possible to switch to the new scheme by running the
   \textbf{grub2-switch-to-blscfg} program.  One can also
   turn the new method on and off by altering the the
   variable \verb?GRUB_ENABLE_BLSCFGS=[true|false]? .  For
   example on a \textbf{RHEL 8} system:

   \begin{configlst}[\texttt{/etc/default/grub}]
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
  \end{configlst}

}
\clearpage
\begin{frame}
   {/boot/loader/entries}

   \begin{cmd}
$ sudo ls -l /boot/entries
  \end{cmd}
   \begin{responsevarnoline}{\footnotesize}
-rw-r--r--. 1 root root 408 Jun 21  2019 ce0c82382a8a4c80bbd6931a917a2f1c-0-rescue.conf
-rw-r--r--  1 root root 381 Feb 17 07:09 ce0c82382a8a4c80bbd6931a917a2f1c-4.18.0-240.15.1.el8_3.x86_64.conf
-rw-r--r--  1 root root 285 Mar  9 06:41 ce0c82382a8a4c80bbd6931a917a2f1c-5.11.5.conf
-rw-r--r--  1 root root 285 Mar 11 13:02 ce0c82382a8a4c80bbd6931a917a2f1c-5.11.6.conf
-rw-r--r--  1 root root 305 Mar 15 07:23 ce0c82382a8a4c80bbd6931a917a2f1c-5.12.0-rc3.conf
   \end{responsevarnoline}
   \begin{configlst}[\texttt{/boot/loader/entries/*5.12.0-rc3.conf}]
title dracut (5.12.0-rc3) 8.2 (Ootpa) dracut-049-70.git20200228.el8
version 5.12.0-rc3
linux /boot/vmlinuz-5.12.0-rc3
initrd /boot/initramfs-5.12.0-rc3.img $tuned_initrd
options $kernelopts $tuned_params
id dracut-20210315122247-5.12.0-rc3
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel
   \end{configlst}
\end{frame}

\cprotect\note{

   With the boot loader specification configuration scheme,
   each possible kernel gains an entry in
   \filelink{/boot/loader/entries}

   A number of environmental variables may be set in
   \file{/boot/grub2/grubenv}, including:
   \begin{itemize}
      \item \verb?kernelopts?
      \item \verb?tuned_initrd?
      \item \verb?tuned_params?
      \item \verb?grub_users?
   \end{itemize}

   \begin{configlst}[\texttt{/boot/grub2/grubenv}]
     
# GRUB Environment Block
kernelopts=root=UUID=6921b738-1e36-429a-89be-8b97cf2f0556 ro  
boot_success=0
boot_indeterminate=0
saved_entry=ce0c82382a8a4c80bbd6931a917a2f1c-5.11.6.0~custom
#######################################################################....
\end{configlst}

}
