\documentclass{cmlab} \RCS $Revision: 1.5 $ \usepackage{alltt,key,xr} \externaldocument[lt-]{../linux_training-plus-config-files-ossi/build/masterfile} \usepackage[pdfpagemode=None,pdfauthor={Nick Urbanik}]{hyperref} \newcommand*{\labTitle}{Assignment 2: \texttt{tomsrtbt} Diagnostic Tool} \begin{document} \paragraph{Due day:} your laboratory period in week 25 (Changed due to vigorous lobbying by a large part of group Y.) \paragraph{What you need to hand in:} You need to hand in two things: \begin{itemize} \item Your floppy disk, clearly labelled with your name, and your group letter (V,\ldots,Z) \item A printout of the section of \texttt{rc.custom.gz} that you wrote, also clearly labelled with your name and group letter. Do \emph{not} hand in a long printout of material written by anyone else (such as by Tom). \end{itemize} You are required to create a diagnostic boot floppy disk that a customer can: \begin{itemize} \item put into their server \item turn on the server and go away for ten minutes \item come back, remove the disk and bring back to you. \end{itemize} Note that for the user, the operation of this system must be totally automatic. The disk should also automatically shut down the computer. For you, the disk should contain reports that you can read from the disk under Linux, and can copy to your machine, allowing you to diagnose problems with the user's server. These reports are the same reports as those created by the script \texttt{report} that is available from the web pages for this subject: \url{http://CSAlinux.tycm.vtc.edu.hk/ossi/} and \url{http://nicku.thebbs.org/ossi/}. \paragraph{Minimum requirements:} You demonstrate during the lab session the following, then hand in your disk. \begin{itemize} \item You are shown a computer that can boot Windows, but cannot boot Linux, even though Linux is installed on the computer. \item You can boot this computer using your disk, then, with no other intervention, the computer shuts down. \item You remove the disk from the first computer, then use your own computer to view the reports on the disk. \item You are able to talk sensibly about some of the report files that you show from your disk, and can use the report files to explain what steps are necessary to allow the computer to boot Linux as well as Windows. \end{itemize} \paragraph{For more marks:} You can do the following using your modified \texttt{tomsrtbt} disk: \begin{itemize} \item Cope gracefully with the floppy disk filling up, and cope well with unusual or error conditions. \item Provide an option for the user to press a key within a timeout period to prevent the system from shutting down. \item Explain a greater percentage of the reports. \item Get configuration information from Windows partitions (including \acro{NTFS} if those are present) \item Provide any other useful features \end{itemize} \paragraph{Some hints} The worksheet for \texttt{tomsrtbt} contains a number of hints, but some students have asked for more. \begin{itemize} \item If you are using \texttt{tomsrtbt-1.7.212.tar.gz} or later, you (probably) do not need to install the \texttt{libc5} packages from Red Hat 6.2 \item Simply download the latest \texttt{tomsrtbt} from \url{http://www.toms.net/rb/} \item You do not need to modify the script \texttt{report}. \item If you have negative sectors reported when running \texttt{sudo 2/usr/doc/bulidit.s}, then you need to delete something to make space. \item You can see which files take the most space in a directory using \texttt{ls~-lSr} \item Many files in \texttt{2/usr/bin} are hard links to each other. The file still takes the same space until you have deleted all the links to that file. \item Please think what it means if you do the following: \begin{verbatim} mount /dev/fdou1722 /fl tar cf /fl/reports.tar /tmp/reports bzip2 -9 /fl/reports.tar \end{verbatim} There is no point in over filling the floppy, then trying to compress the data afterwords. \item To decompress a tarball under Red Hat Linux, you can simply do this: \begin{verbatim} $ tar xvIf ~/reports.tar.bz2 \end{verbatim}%$ If you are working within \texttt{tomsrtbt}, it is still simple to combine the \texttt{tar} and compress operations in one pipeline: \begin{verbatim} $ tar cf - /tmp/reports | bzip2 -9 > reports.tar.bz2 \end{verbatim}%$ will compress it; you can extract the tarball with: \begin{verbatim} $ bzip2 -d reports.tar.bz2 | tar xvf - \end{verbatim}%$ \item You do not need to worry about trying to log in; this is handled by the \texttt{init} process \emph{after} the computer finishes executing \texttt{rc.custom.gz} \item Use \texttt{tomsrtbt.FAQ} as a guide, particularly under the section \emph{Customisation}\@. \item It is useful to use \texttt{echo} to show what is happening. \item You may wish to use the command \texttt{mount} in your startup script to see what is going on. \item You may wish to select the video resolution of $50 \times 60$ characters, so that you can see what your script is doing. \end{itemize} \paragraph{About the configuration files in the reports:} \textbf{\emph{Note that this is the most important part of the homework.}} You need to be able to interpret the results. There is no point in being able to get a lot of information about a computer if you cannot understand or use that information to solve problems! \begin{itemize} \item For more information about the configuration files that are copied by \texttt{report}, read Module~\vref{lt-cha:conf-files} of the Linux Training Materials. Here is a list of configuration files and the location of their description in that module: \begin{itemize} \item \texttt{/etc/modules.conf}: see section~\vref{lt-sec:mod-conf} \item \texttt{/etc/fstab}: see section~\vref{lt-sec:mount} \item For information about the runlevels, see section~\vref{lt-sec:key-configs-run-levels} to \ref{lt-sec:changing-runlevels}. Runlevels are important for you to make sense of the contents of the directories \texttt{/etc/rc.d/rc0.d}\ldots \texttt{/etc/rc.d/rc6.d} which are in the tarball \texttt{rc-d.tar.bz2} created by \texttt{report}. \item For information about the directory \texttt{/etc/rc.d} and below, stored in the tarball \texttt{rc-d.tar.bz2} by \texttt{report}, see section~\vref{lt-sec:key-configs-init-scripts} to section~\ref{lt-sec:key-configs-restart-services}. \end{itemize} \item For information about \texttt{inittab}, do \texttt{man~inittab} \item For information about \texttt{/etc/lilo.conf}, read the other material written by me, and also \texttt{man~lilo.conf}. For a manual about \texttt{lilo}, do: \begin{alltt} $ cd /usr/share/doc/lilo\key{Tab}doc $ gv User_Guide.ps & \end{alltt} \item Do \texttt{man~issue} for information about the \texttt{/etc/issue} file \item Do \texttt{man resolv.conf} for information about \texttt{/etc/resolv.conf} \item Chapter~2 of the \emph{Red Hat Linux Reference Guide} covers a lot of information about many of these things. Install it from the documentation \CDROM, or read it online at \url{http://nicku.thebbs.org/doc/rhl-rg-en-7.0/ch-sysadmin.html} or \url{http://CSAlinux.tycm.vtc.edu.hk/doc/rhl-rg-en-7.0/ch-sysadmin.html} \item The section \emph{Sysconfig Information} in \url{http://nicku.thebbs.org/doc/rhl-rg-en-7.0/s1-sysadmin-boot.html} has plenty of readable information about the important files under \texttt{/etc/sysconfig}, which \texttt{report} puts in a tarball called \texttt{sysconfig.tar.bz2}. \item Information about the \texttt{/proc} filesystem is available from the kernel documentation; you can find it by: \begin{alltt} $ cd /usr/share/doc/kernel-doc\key{Tab} $ less proc.txt \end{alltt} \end{itemize} \end{document}