\begin{exe} {Recovering Using the Install Image}

   \begin{info}
      This exercise has been specifically written for
      \textbf{Red Hat}-based systems.  You should be able to
      easily construct the appropriate substitutions for
      other distribution families.
   \end{info}
   \begin{enumerate}

      \item
      Remove the \textbf{zsh} package (if it is installed!):
      \begin{cmd}
s$ dnf remove zsh
      \end{cmd}
      or
      \begin{cmd}
$ rpm -e zsh
      \end{cmd}
      Note we have chosen a package that generally has no
      dependencies to simplify matters.  If you choose
      something that does, you will have to watch your step
      in the below so that anything else you remove you
      reinstall as needed as well.
      \item
      Boot into the rescue environment.
      \item
      Re-install (or install) \textbf{zsh} from within
      the rescue environment.  First, mount the
      install media at \filelink{/mnt/source}:
      \begin{cmd}
$ mount /dev/cdrom /mnt/source
      \end{cmd}
      Then reinstall the package:
      \begin{cmd}
$ rpm -ivh --force --root /mnt/sysimage /mnt/source/Packages/zsh*.rpm
      \end{cmd}
      The \verb?--force? option tells \textbf{rpm} to use
      the source directory in determining dependency
      information etc.  Note that if the install image is
      much older than your system which has had many updates
      the whole procedure might collapse!
      \item
      Exit and reboot.
      \item
      Check that \textbf{zsh} has been reinstalled:
      \begin{cmd}
$ rpm -q zsh
      \end{cmd}
      \begin{response}
zsh-5.0.2-7.el7.x86_64
      \end{response}
      \item
      \begin{cmd}
$ zsh
      \end{cmd}
      \begin{response}
....
[coop@q7]/tmp/LFS201%
      \end{response}
   \end{enumerate}
\end{exe}

