%\documentclass[a3paper,12pt]{ictlab}
\documentclass[a4paper,12pt]{ictlab}

\RCS $Revision: 1.6 $

\usepackage{alltt,key,multicol,wrapfig}

\newcommand*{\labTitle}{Burning Red Hat CDs with our CD Writer}
%\geometry{a3paper}
%\setlength{\headwidth}{\textwidth}
\ifx\pdftexversion\undefined \else
  \usepackage[pdfpagemode=None,pdfauthor={Nick Urbanik}]{hyperref}
\fi

\renewcommand*{\subject}{Operating Systems and Systems Integration}

\begin{document}

%\begin{multicols}{2}

\section{Background}
\label{sec:background}

  %\begin{wrapfigure}[0]{r}{\linewidth}
  %  \centering%
  %  \includegraphics[width=\linewidth]{location-of-cd-writer-a204e}
  %  \caption{The location of the \acro{CD} writer in A204e (November 2002).}
  %  \label{fig:location-of-cd-writer}
  %\end{wrapfigure}
  %\mbox{}

%\vspace*{24\baselineskip}

  \begin{figure}[htb]
    \centering%
    \includegraphics[width=\linewidth/2]{location-of-cd-writer-a204e}
    \caption{The location of the \acro{CD} writer in A204e (November 2002).}
    \label{fig:location-of-cd-writer}
  \end{figure}
We have installed a \acro{CD} writer on a computer which
is currently near the entrance to A204e\@.  I want all of you to
install Red Hat 9 Linux on your machines at home.  You will need to
burn your own \acro{CD}s.  This is a quick guide to burning \acro{ISO}
images onto \acro{CD}s in A204e.  There is also a nice program called
\texttt{xcdroast} for burning cdroms where you need to construct the
\acro{ISO} image yourself. 

\subsection{Some considerations}
\label{sec:considerations}

The problem is that we need the \acro{ISO} image on the local hard
disk to start burning it onto your blank \acro{CD-R}.  Suppose the
image you need is not there?  The quickest solution is to copy the
image over the network from our server.  We will see how to do that
using the important tool \texttt{rsync}.


\section{Procedure}
\label{sec:procedure}
\begin{enumerate}

\item Go to the computer that is close to the entrance to A204d and A204f; see
figure~\vref{fig:location-of-cd-writer}.

\item When you start the machine, select Linux from the boot menu (at
  the moment, the default is Linux).

\item Log in using your own \acro{ICT} account, using your student
  number as user name, and your own password.
\item Decide what disk you want to burn

\item Look to see if it is already present in the image directories
\begin{alltt}
$ \textbf{ls -l /cdimage}
\end{alltt}%$

\item If not, then:
  \begin{enumerate}
  \item If there is not enough space, delete an image that you do not
    want with a command like
\begin{alltt}
$ \textbf{rm /cdimage/valhalla-i386-SRPMS.iso}
\end{alltt}%$
    \begin{explanation}
      you want to make sure that there is enough space in that
      partition to hold the \acro{CDROM} image, i.e., more than
      650\,MB\@.  To find how much space is available, type:
      \begin{alltt}
$ \textbf{df}
      \end{alltt}%$

      The \textbf{d}isk \textbf{f}ree command shows the space on each
      partition in units of one kilobyte.
    \end{explanation}
    
  \item Change to the directory where you will put the image (it
    should be \texttt{/cdimage}).  Do \emph{not} put it into your home
    directory; the location should be a local drive, not a network
    drive.

  \item Copy the image that you want with a command like this:
\begin{alltt}
\footnotesize$ \textbf{rsync -avz --progress ictlab::rh80iso/psyche-i386-disc1.iso .}
\end{alltt}%$
Notice the dot ``\texttt{\textbf{.}}'' at the end!  That represents
the current directory, the destination for the copy operation.
The transfer took about two minutes for me.

  \end{enumerate}

\item I have written a simple script to burn the images.  To use it,
  type:
\begin{alltt}
$ \textbf{burn-cd} \meta{filename}
\end{alltt}%$
where \meta{filename} is the name of the iso image you want to burn to
the cd writer.
  \begin{explanation}
    You can see the script in
    \texttt{/usr\allowbreak/bin\allowbreak/burn-cd}.
  \end{explanation}
  
\item Wait about eight minutes for the disk to be written.  During
  this time, \emph{do not start any big programs}, in fact, do not
  disturb the machine too much, since this computer does not have much
  \RAM and it is an old PII, and it has to work hard to keep providing
  the \acro{CD} writer with data.

\item The disk will eject when writing is finished.
\end{enumerate}


\section{More about the \texttt{rsync} command}
\label{sec:rsync}

The \texttt{rsync} program is amazingly useful (I use it many times
every day).  It is perfect for making \emph{mirrors} of:
\begin{itemize}
\item web sites

\item your work

\item \ldots and everything else!
\end{itemize}
(A mirror is an exact copy, usually made over a network).

\texttt{rsync} is actually a network protocol that is clever in that
it compares all the files at the source and destination, and only
sends the parts of files that are different.  It also can compress the
data, so saving a lot of bandwidth.  You can also use it with
\texttt{ssh}, and connect to a Secure Shell server and transfer data
over the Internet, which is the way I most often use it.

\texttt{ictlab} is an \texttt{rsync} server as well as a web,
\acro{NFS} and ftp server.  It has a few areas accessible by \texttt{rsync}.

To find all the areas available from an \texttt{rsync} server:
\begin{alltt}
$ \textbf{rsync -av ictlab::}
ftp             ftp area
rh73            Red Hat 7.3
rh73iso         Red Hat 7.3 ISO (CDROM) images
rh72eeiso       Red Hat 7.2 Enterprise Edition beta
rh72            Red Hat 7.2
rh72iso         Red Hat 7.2 ISO (CDROM) images
rh72dociso      Red Hat 7.2 documentation ISO (CDROM) images
rh71            Red Hat 7.1
rh71iso         Red Hat 7.1 ISO (CDROM) images
rh8             Red Hat 8.0
rh8iso          Red Hat 8.0 ISO (CDROM) images
rh8isodoc       Red Hat 8.0 documentation ISO (CDROM) image
rh9             Red Hat 9
rh9iso          Red Hat 9 ISO (CDROM) images
rh9isodoc       Red Hat 9 documentation ISO (CDROM) image
\end{alltt}%$

To list all the files in the top level directory \texttt{rh80iso}:
{\footnotesize
\begin{alltt}
$ \textbf{rsync ictlab::rh80iso}
drwxr-sr-x        4096 2002/09/27 03:03:17 .
-rw-rw-r--         280 2002/09/18 03:40:02 MD5SUM
-rw-rw-r--         280 2002/09/18 03:40:02 MD5SUMS
drwxr-sr-x        4096 2002/09/27 02:35:58 doc
-rw-rw-r--   675315712 2002/09/11 04:48:53 psyche-i386-disc1.iso
-rw-r--r--   666271744 2002/09/11 04:50:23 psyche-i386-disc2.iso
-rw-r--r--   677609472 2002/09/11 04:51:56 psyche-i386-disc3.iso
-rw-r--r--   626262016 2002/09/11 04:55:48 psyche-i386-disc4.iso
-rw-r--r--   679542784 2002/09/11 04:59:10 psyche-i386-disc5.iso
\end{alltt}%$
}
To download disk 1 of Red Hat 9:
\begin{alltt}
$ \textbf{rsync -avz ictlab::rh9iso/shrike-i386-disc1.iso .}
\end{alltt}%$
To download disk 2 of Red Hat 9:
\begin{alltt}
$ \textbf{rsync -avz ictlab::rh9iso/shrike-i386-disc2.iso .}
\end{alltt}%$

You will also need to download disk 3 of Red Hat 9:
\begin{alltt}
$ \textbf{rsync -avz ictlab::rh9iso/shrike-i386-disc3.iso .}
\end{alltt}%$

I recommend that you get yourself a copy of the documentation \CD,
once it is available:
\begin{alltt}
$ \textbf{rsync -avz ictlab::rh9isodoc/docs-9-i386.iso .}
\end{alltt}%$

To get help about \texttt{rsync}, type: \texttt{man rsync}.  Of
course, if you want to know any details about how to use it for a
particular purpose, then you can always ask Nick Urbanik
\url{<nicku@nicku.org>}.
%\end{multicols}
\end{document}

transfer using rsync -avz ictlab::rh9iso/shrike-i386-*
To list all the files in iso:

rsync 'ictlab::iso/*'
skipping directory /SRPMS
skipping directory /disc1
skipping directory /disc2
skipping directory /doc
skipping directory /powertools
-rw-r--r--   678035456 2000/09/13 22:06:48 7.0-i386-SRPMS.iso
-rw-r--r--   670564352 2000/10/04 00:27:51 7.0-i386-disc1.iso
-rw-r--r--   676231168 2000/09/28 08:48:00 7.0-i386-disc2.iso
-rw-r--r--   650471424 2000/09/23 01:39:26 7.0-i386-docs-8bit.iso
-rw-r--r--   614799360 2000/09/14 00:45:59 7.0-i386-powertools.iso
-rw-r--r--         106 1910/03/03 05:32:10 MD5SUM
-rw-r--r--          57 2000/09/23 19:26:02 MD5SUM-doc
-rw-r--r--          58 2000/09/14 06:44:33 MD5SUM-powertools
-rw-r--r--          53 2000/09/22 20:51:56 MD5SUM-srpms
-rw-r--r--         106 2000/10/04 07:42:48 md5-test.nick


To download disk 1:
rsync -avz ictlab::rh71iso/seawolf-i386-disc1.iso .
To download disk 2:
rsync -avz ictlab::rh71iso/seawolf-i386-disc2.iso .


image directories:
/cdimage
/win98/cdimage

To check disk space:
df

