% DO NOT EDIT GENERATED AUTOMATICALLY FROM gl2.106.1.slides.tex
\input{gl2.slide-header-beamer-handout}% DO NOT EDIT GENERATED AUTOMATICALLY FROM gl2.106.1.slides.tex
\errorcontextlines=99
%% Subtopic Number = '1.106.1'
%% Title from filename: 'Boot the system'
%% Weight: 3
%% Description:
%% Candidates should be able to guide the system through the
%%        booting process. This includes giving commands to the boot loader and
%%        giving options to the kernel at boot time, and checking the events in
%%        the log files.
%% Key files, terms, and utilities include:
%%        /var/log/messages
%%        /etc/conf.modules or /etc/modules.conf
%%        dmesg
%%        LILO
%%        GRUB
\title{1.106.1\\Boot the system\\Weight 3}
\author[Geoff Robertson]{Angus Lees \texttt{gus@inodes.org} \and Geoffrey Robertson \texttt{ge@ffrey.com} \and Nick Urbanik \texttt{nicku@nicku.org}}
\subtitle{Linux Professional Institute Certification --- 102}


\begin{document}
\maketitle

\begin{frame}
  %% GENERATED SLIDE
  \frametitle{Description of Objective}
  \framesubtitle{1.106.1\ \ Boot the system}
  \Large{}Candidates should be able to guide the system through the
       booting process. This includes giving commands to the boot loader and
       giving options to the kernel at boot time, and checking the events in
       the log files.

\end{frame}

\begin{frame}[fragile]
  %% GENERATED SLIDE
  \frametitle{Key files, terms, and utilities include:}
\begin{semiverbatim}\large
/var/log/messages
/etc/conf.modules or /etc/modules.conf
dmesg
LILO
GRUB
\end{semiverbatim}
\end{frame}


\begin{frame}[fragile]

  \frametitle{Boot the system}
  \framesubtitle{Objective}

  Candidates should be able to guide the system through the booting
  process. This includes giving commands to the boot loader and giving
  options to the kernel at boot time, and checking the events in the
  log files.

\end{frame}

\begin{frame}[fragile]

  \frametitle{Boot the system}
  \framesubtitle{Key files, terms, and utilities}

\begin{semiverbatim}
dmesg
/var/log/messages
/etc/conf.modules \textrm{or} /etc/modules.conf
LILO
GRUB
\end{semiverbatim}
\begin{itemize}
\item Note that 2.6 kernels use the file \texttt{/etc/modprobe.conf},
  not \texttt{/etc/modules.conf}
\item The name \texttt{/etc/conf.modules} has been out of favour for
  some years
\end{itemize}
\end{frame}

\begin{frame}[fragile]

  \frametitle{Booting}

  \begin{itemize}
  \item Machine powers up, \textsc{BIOS POST}, spin up \textsc{SCSI}
    drives, etc
  \item \textsc{BIOS} boots boot loader
  \item \emph{(Boot loader may load its ``second stage'' from
      somewhere else)}
    \begin{itemize}
    \item e.g., grub loads \texttt{/boot/grub/stage2}
    \end{itemize}
  \item Boot loader loads Linux kernel
  \item Linux kernel starts up, detects hardware, etc
  \item Linux kernel creates a ram disk with kernel modules from
    initrd image file
    \begin{itemize}
    \item The drivers in the \texttt{/boot/initrd.img} file are often
      needed to access the hard disk.
    \end{itemize}
  \item After loading the 
  \item Linux kernel mounts /
  \item Linux kernel starts \texttt{init}(8)
  \item \texttt{init}(8) starts up rest of system
  \end{itemize}
\end{frame}

\begin{frame}[fragile]

  \frametitle{Finding the boot loader}
  \begin{itemize}
  \item (i386-specific)


  \item BIOS boots Master Boot Record (MBR), located at the beginning of the
  disk.


\item Usual DOS MBR looks for ``active'' partition and loads the boot
  loader found in that partition.


\item You can either install your boot loader
  \begin{itemize}
  \item in the MBR, replacing the DOS boot loader, or 
  \item use a DOS-compatible boot loader and install your boot loader in
    the active partition.
  \end{itemize}
\end{itemize}
\end{frame}

\begin{frame}[fragile]

  \frametitle{Boot Loaders}
  \framesubtitle{LILO}
  \begin{itemize}
  \item ``Usual'' i386 boot loader
    \begin{itemize}
    \item at least it was a few years ago.
    \end{itemize}
    

  \item \texttt{lilo}(8) install command generates suitable assembly code
  and installs it into either the MBR or a partition.  Configured
  through \texttt{/etc/lilo.conf}


\item Remembers actual disk blocks of kernel and uses that to access the
  file directly (using BIOS disk routines).


\item Because the calculations are done at install time, LILO can get
  confused by changes in disk configuration.
\end{itemize}
\end{frame}

\begin{frame}[fragile]

  \frametitle{Boot Loaders}
  \framesubtitle{GRUB}
  \begin{itemize}
  \item The Grand United boot loader.


  \item Unlike LILO, GRUB understands some partition formats and reads files
  through ``normal'' means.
\item GRUB has drivers for a number of different file systems
\item depends on BIOS to be able to access the hard disk
\item Reads the menu file \texttt{/boot/grub/menu.lst} directly from
  the hard disk
\item No need to change MBR when install a new kernel
\end{itemize}
\end{frame}

\begin{frame}[fragile]

  \frametitle{Boot loaders}
  \framesubtitle{isolinux}
  \begin{itemize}
  \item CDROMs often use isolinux as the bootloader
  \end{itemize}
\end{frame}

\begin{frame}[fragile]

   \frametitle{Chaining Boot loaders} 
   \begin{itemize}
   \item One bootloader can load another bootloader
   \item This is how GRUB or LILO start Windows
     \begin{itemize}
     \item Windows has its own bootloader at the start of its partition
     \item We tell GRUB or LILO to ``chainload'' that boot loader
     \end{itemize}
   \item It is often useful to have one GRUB bootloader start another
     bootloader
     \begin{itemize}
     \item For example, if you have several distributions on one disk,
       have one's GRUB install its \texttt{stage1} into the MBR
     \item Other distributions install GRUB at start of their partition
     \item The first GRUB chainloads the other GRUBs
     \item Keeps maintenance local within each distribution
     \end{itemize}
   \end{itemize}
\end{frame}

\begin{frame}[fragile]

  \frametitle{Snarfing kernel output}
  \begin{itemize}
  \item \texttt{dmesg}(8) gives you the last 16k of kernel messages.

  \item \texttt{syslog} usually logs this to
    \texttt{/var/log/messages} and \texttt{/var/log/dmesg} or
    \texttt{/var/log/kern.log} for posterity.
  \item \texttt{syslog} gathers messages from many daemons as well as
    the kernel, and sends them to \texttt{/var/log/messages}
  \end{itemize}
\end{frame}

\begin{frame}[fragile]

  \frametitle{/etc/modules.conf}
  \begin{itemize}
  \item Configuration for \texttt{modprobe}(8)

  \item AKA \texttt{/etc/modules.conf}, or with the 2.6 kernel,
    \texttt{/etc/modprobe.conf}
    \begin{itemize}
    \item Used to be called \texttt{/etc/conf.modules} till people
      realised that seems back to front
    \end{itemize}

  \item Gives kernel module options, module aliases and a few more
    exotic options (like module pre/post load commands).
\end{itemize}
\end{frame}

\begin{frame}
  \frametitle{License Of This Document}
    Copyright \copyright\ 2005, 2003 Angus Lees <gus@inodes.org>, Geoffrey Robertson <ge@ffrey.com> and Nick Urbanik <nicku@nicku.org>. Permission is
    granted to make and distribute verbatim copies or modified
    versions of this document provided that this copyright notice and
    this permission notice are preserved on all copies under the terms
    of the GNU General Public License as published by the Free
    Software Foundation---either version 2 of the License or (at your
    option) any later version.

\end{frame}
\end{document}
