\documentclass[10pt,a4paper]{article}

\setlength{\voffset}{-2cm}
\setlength{\hoffset}{-1.2cm} 
\setlength{\textwidth}{6in}
\setlength{\textheight}{10in}
\setlength{\parindent}{0 pt}  
\setlength{\parskip}{6 pt}  

\usepackage[american]{babel}
\usepackage[latin1]{inputenc}
\usepackage{html}
\bodytext{background="./background.png"}

\hyphenation{
java-station
}

%opening
\title{Install : Debian GNU/Linux on a Sun Javastation (Krups)}
\author{Jan Wagemakers}

\begin{document}
\maketitle

\begin{htmlonly}
A 
\htmladdnormallink{postscript version}{../install.ps} 
,
\htmladdnormallink{PDF version}{../install.pdf} 
and
\htmladdnormallink{LaTeX version}{../install.tex} 
is available. 
\end{htmlonly}

\begin{abstract}
\noindent
With this document I'll try to describe how I have installed Debian GNU/Linux on \htmladdnormallink{my Sun Javastation (krups)}{http://janw.dyndns.org:1683}. However, before reading this document it might be a good idea to first take a look at :

\begin{itemize}
\item \htmladdnormallinkfoot {Linux on the Sun JavaStation NC HOWTO} {http://www.faqs.org/docs/Linux-HOWTO/JavaStation-HOWTO.html}
\item \htmladdnormallinkfoot {Installing Debian GNU/Linux on a SUN Javastation} {http://web.archive.org/web/20040507193459/stolk.org/javastation/}
\end{itemize} 

\noindent
I like to thank Bram Stolk and Robert S. Dubinski for making this information available. 

\end{abstract}

\section{Server}
Because this javastation doesn't have a HD, we need first to setup a server. On this server we place the Linux-kernel and Filesystem for our javastation. On this server we need to setup bootp, a nfs-server and tftp to transfer these necessary components to the javastation.

In the \htmladdnormallinkfoot {JavaStation-HOWTO} {http://dubinski-family.org/~jshowto/doc/html/multi/index.html}
they have also setup RARP, however, for a Krups this is not needed.

And of course, my server is also running Debian GNU/Linux ;-)

\subsection{bootp}
This is how I have setup bootp. In the \htmladdnormallinkfoot {JavaStation-HOWTO} {http://dubinski-family.org/~jshowto/doc/html/multi/index.html} they have used DHCP as a bootp-server. I have chosen for bootp because that was already installed on my system ;-)

\subsubsection{Install bootp}

\begin{verbatim}
apt-get install bootp
\end{verbatim} 

\subsubsection{Configure bootp}

\begin{itemize}
\item{Edit /etc/bootptab and add a line like :

\begin{verbatim}
old:ha=08002095270C:ip=192.168.1.3:bf=/tftpboot/08002095270C
\end{verbatim} 

where:

\begin{itemize}
\item08002095270C is the Hardware Address of your javastation (printed on the back of the javastation)
\item192.168.1.3 is the IP-address that you like to give to your javastation.
\end{itemize} 

}
\item{Edit /etc/inetd.conf and add/change a line with something like this:
\begin{verbatim}
bootps    dgram   udp    wait   root   /usr/sbin/bootpd    bootpd -i -t 120
\end{verbatim} 
}
\end{itemize}

\subsection{nfs-server}
\subsubsection{Install nfs-server}
You can choose between :

\begin{itemize}
\item \begin{verbatim}apt-get install nfs-kernel-server\end{verbatim} 
\item \begin{verbatim}apt-get install nfs-user-server\end{verbatim} 
\end{itemize} 

I recommend nfs-kernel-server because with nfs-user-server I have had some problems, also nfs-kernel-server is faster. Of course, to use nfs-kernel-server you need on the server a kernel with nfs-server support.

\subsubsection{Configure nfs-server}

Edit /etc/exports and add a line with something like this :

\begin{verbatim}
/var/javastation 192.168.1.3(rw,no_root_squash,async)
\end{verbatim} 

\subsection{tftp}
\subsubsection{Install tftp}
\begin{verbatim}
apt-get install tftpd 
\end{verbatim} 

\subsubsection{Configure tftp}
Edit /etc/inetd.conf and add/change a line with something like this :

\begin{verbatim}
tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd    /tftpboot
\end{verbatim} 

\subsection{Setting up /tftpboot}
Now we have to set up some files in /tftpboot (create /tftpboot when it doesn't exist).
\subsubsection{PROLL}
\begin{itemize}
\item{Download proll and copy it to /tftpboot.

Normally you can download PROLL \htmladdnormallinkfoot {here} {http://people.redhat.com/zaitcev/linux/}.
However, because \htmladdnormallink{this PROLL didn't work with my self-compiled 2.4.26-kernel}{http://janw.dyndns.org:1683/problems.html}, I have changed 1 line in the source of PROLL and re-compiled PROLL. You can download this 'patched' PROLL \htmladdnormallinkfoot {here}{http://janw.dyndns.org:1683/proll.aout}

}
\item{In /tftpboot do : \begin{verbatim}ln -s proll.aout 08002095270C\end{verbatim} 

where 08002095270C is the Hardware Address of your javastation.

}
\item{
Take your javastation and remove the flash memory SIMM. Connect the javastation to your server and power it up. If everything is alright you should see that PROLL is loaded by the javastation.

Also, if you check your logfiles (ex. /var/log/syslog) you should see something like this :

\begin{verbatim}
in.tftpd[21841]: connect from 192.168.1.3 (192.168.1.3)         
tftpd[21842]: tftpd: trying to get file: /tftpboot/08002095270C  
in.tftpd[21843]: connect from 192.168.1.3 (192.168.1.3)                
tftpd[21844]: tftpd: trying to get file: C0A80103.PROL           
\end{verbatim} 

}
\end{itemize} 

\subsubsection{Kernel}
\begin{itemize}
\item{Download a pre-compiled kernel and copy it to /tftpboot.

You can find pre-compiled kernels here :
\begin{itemize}
\item  \htmladdnormallinkfoot {my self compiled 2.4.26 kernel} {http://janw.dyndns.org:1683/vmlinux.aout.2.4.26}
\item  \htmladdnormallinkfoot {my self compiled 2.4.30 kernel} {http://janw.dyndns.org:1683/vmlinux.aout.2.4.30}
\item  \htmladdnormallinkfoot {my self compiled 2.4.31 kernel} {http://janw.dyndns.org:1683/vmlinux.aout.2.4.31}
\item  \htmladdnormallinkfoot {my self compiled 2.4.33.3 kernel} {http://janw.dyndns.org:1683/vmlinux.aout.2.4.33.3}
\item  \htmladdnormallinkfoot {Linux on the Sun JavaStation NC HOWTO} {http://www.faqs.org/docs/Linux-HOWTO/JavaStation-HOWTO.html}
\item  \htmladdnormallinkfoot {Installing Debian GNU/Linux on a SUN Javastation} {http://web.archive.org/web/20040507193459/stolk.org/javastation/}

\end{itemize} 
}

\item{In /tftpboot do : \begin{verbatim}ln -s vmlinux.aout C0A80103.PROL \end{verbatim} 
where C0A80103.PROL is the IP-address (192.168.1.3) in HEX-format. Of course, you can just take a look in your log-file if you don't want to convert decimal to hexadecimal ;-)}
\end{itemize} 

\section{Installing Debian GNU/Linux}
Now that we have setup the server, we can start with installing Debian GNU/Linux. I have done this by following the instructions 
at \htmladdnormallinkfoot {Installing Debian GNU/Linux on a SUN Javastation} {http://web.archive.org/web/20040507193459/stolk.org/javastation/}. 
However, some things didn't work for me, so there are differences. YMMV

\subsection{Preparation}
\begin{itemize}
\item \begin{verbatim}
mkdir /var/javastation/root
\end{verbatim} 
\item Download http://archive.debian.org/debian-archive/debian/dists/woody/main/disks-sparc/current/root.tar.gz

      Note: that this is Woody (Debian 3.0). At the time I was installing, Woody was the stable version.
      You can also try to use a more recent version (for example Debian 3.1), but I have no experience with that.
      You can also install Debian 3.0 and afterwards upgrade it to Debian 3.1.
      
\item \begin{verbatim}
cd /var/javastation
\end{verbatim} 
\item \begin{verbatim}
tar xzvf path/root.tar.gz
\end{verbatim} 
\item \begin{verbatim}
cd /tftpboot
\end{verbatim} 
\item \begin{verbatim}
ln -s /var/javastation/debian-sparc-root/ 192.168.1.3
\end{verbatim} 

Where 192.168.1.3 is the IP-address of your javastation

\item After following these steps, /tftpboot should now be something like this :

\begin{footnotesize}
\begin{verbatim}
pts/597  root /tftpboot# ls -l
 total 1814
lrwxrwxrwx   1 root root      10 Jul 24 11:41 08002095270C -> proll.aout
lrwxrwxrwx   1 root root      35 Jul 24 11:35 192.168.1.3 -> /var/javastation/debian-sparc-root/
lrwxrwxrwx   1 root root      12 Jul 24 11:42 C0A80103.PROL -> vmlinux.aout
-rw-r--r--   1 root root   94024 Jul 24 11:40 proll.aout
-rw-r--r--   1 root root 1758272 Jul 24 11:42 vmlinux.aout
\end{verbatim}
\end{footnotesize}

\item \begin{verbatim}
cd /var/javastation/debian-sparc-root/etc
\end{verbatim} 
\item \begin{verbatim}
cp /etc/resolv.conf .
\end{verbatim} 
\item Edit /var/javastation/debian-sparc-root/etc/fstab and add a line like :

\begin{verbatim}
add  /dev/root  /  nfs  default   0  0
\end{verbatim}
\end{itemize}

\subsection{Starting the installation}
Now it is time to power up the javastation. If everything is alright, PROLL will be loaded, then PROLL will load the kernel and the kernel starts the Debian Installation Program. When you see the Debian Installation Program on the screen, do the following :

\begin{itemize}
\item Press ALT-F2 and activate the console
\item type:
	\begin{itemize}
	\item \begin{verbatim}
mount -o remount,rw /dev/root
\end{verbatim} 
	
	Ignore the error messages that you get.
	
	\item \begin{verbatim}
mount 
\end{verbatim} 
	
	and verify that /dev/root is mounted rw
	\item \begin{verbatim}
route add default gw 192.168.1.1
\end{verbatim} 
	
	where 192.168.1.1 is the IP-address of your server.
	
	\item \begin{verbatim}
mount -o nolock 192.168.1.1:/var/javastation/root /target
\end{verbatim} 
	
	where 192.168.1.1 is the IP-address of your server.
	
	\end{itemize}
\item Press ALT-F1 to switch back to the Installation Program
	\begin{itemize}
	\item Configure the hostname
	\item Install the base system
		\begin{itemize}
		\item choose network
		\item defaults are ok
		\item When this didn't work, press ALT-F2 and check if you can ping to the internet and that /tmp is mounted rw. If not, solve these problems
		\end{itemize}
	\item After that the base-system is downloaded an unpacked, you will get an error. 
	\end{itemize} 
\end{itemize} 

\subsection{Complete the installation}
Because the installation program failed it is now time to complete the installation by hand. 

\begin{itemize}
\item On the server do :
	\begin{itemize}
	\item \begin{verbatim}
cd /tftpboot
\end{verbatim} 
	\item \begin{verbatim}
rm 192.168.1.3
\end{verbatim} 
	
	where 192.168.1.3 is the IP-address of the javastation
	
	\item \begin{verbatim}
ln -s /var/javastation/root/ 192.168.1.3
\end{verbatim} 
	
	where 192.168.1.3 is the IP-address of the javastation
	
	\end{itemize}
\item Power up the javastation. After the kernel is booted, you should see this text : 

Enter runlevel:

\item Press S and ENTER

Now you should see a command-prompt. 

\item \begin{verbatim}
cd /var/cache/apt/archives
\end{verbatim} 
\item \begin{verbatim}
mount -oremount,rw /dev/root /
\end{verbatim} 
\item \begin{verbatim}
dpkg -i *.deb
\end{verbatim} 

Repeat this step, ignore all errors, except when you see an error about "/var/lib/dpkg/tmp.ci" then goto to the next step.

\item \begin{verbatim}
cd /var/lib/dpkg
\end{verbatim} 
\item \begin{verbatim}
mv tmp.ci /tmp
\end{verbatim} 
\item \begin{verbatim}
apt-get -f install
\end{verbatim} 

In my case apt-get configures everything, except cron, exim, at, mailx, logrotate. Just ignore this.

\item \begin{verbatim}
base-config
\end{verbatim} 

Base-config will fail when trying to fetch the Debian Archive. Just ignore this for now. 
Also, don't do Tasksel or dselect for now.

\item Power Off
\item On the server, edit /var/javastation/root/etc/fstab and change it to the following :
	
\begin{footnotesize}
\begin{verbatim}
192.168.1.1:/var/javastation/root  /       nfs  rw,hard,udp,nolock,rsize=8192,wsize=8192  0   0
proc                               /proc   proc defaults                                  0   0
\end{verbatim} 
\end{footnotesize}

\item Power On
\item Log in as root
\item \begin{verbatim}
route add default gw 192.168.1.1
\end{verbatim} 

where 192.168.1.1 is the IP-address of your server

\item On the server, \begin{verbatim}
cp /etc/resolv.conf /var/javastation/root/etc/resolv.conf
\end{verbatim} 
\item You should now be able to ping to the internet. If not solve the problem before going to the next step.
\item \begin{verbatim}
base-config
\end{verbatim} 

Now fetching the debian archive should work

\item OK, installation is complete. 

\end{itemize}

\end{document}
