% $Header: /mit/netbsd/doc/other/RCS/netbsd-install.tex,v 1.35 1999/07/27 05:10:14 deberg Exp $

\documentstyle[fullpage,ifthen]{article}
\pagestyle{empty}
\setlength{\parskip}{.05in}

\addtolength{\oddsidemargin}{-.3in}
\addtolength{\evensidemargin}{-.3in}
\addtolength{\textwidth}{.6in}

\addtolength{\topmargin}{-.5in}
\addtolength{\textheight}{1in}

% Extract RCS values, defining \rcsRevision and \rcsLocker.
\def\rcs$#1: #2 ${\expandafter\def\csname rcs#1\endcsname{#2}}
\def\rcsnull$#1: #2${\expandafter\def\csname rcsnull#1\endcsname{#2}}
\rcs$Revision: 1.35 $
\rcsnull$Locker:  $

% If the file is checked out, write ``Draft'' on the output in big letters.
\ifthenelse{\equal{\rcsnullLocker}{}}{}{\special{header=texdraft.ps}}

\begin{document}

\begin{center}
{\huge Installing NetBSD-Athena on MITnet}
\end{center}
\bigskip

\small

\noindent These instructions explain how to install a binary release of
NetBSD-Athena 8.2 (based on NetBSD/i386 1.3.2).  NetBSD is a freely
distributable Unix-like operating system for many platforms including
Intel 386-class machines.  This document explains how you can install
NetBSD-Athena using MITnet if you have a machine on the network.  If you
have any questions or problems during the installation, please send mail
to {\tt netbsd-help@mit.edu}.  NetBSD also runs on a number of other
architectures including SPARC, Sun 3, Alpha, and both 68K and
PowerPC-based Macintoshes.  SIPB does not support Athena software on
these platforms, but we may be able to help you get started with them.
Contact {\tt netbsd-help@mit.edu} for more information.

\subsection*{System Requirements}

Before you start, you may want to find out if NetBSD and XFree86 support
your computer's hardware.  NetBSD/i386 supports nearly all IDE hard
drives and CD-ROM drives, and most common SCSI controllers, hard drives,
CD-ROM drives, and other SCSI peripherals.  Check the NetBSD/i386 web
page at \\ {\tt http://www.netbsd.org/Releases/formal-1.3/i386.html} for
your specific hardware.  You may also want to check the XFree86 web site
at {\tt http://www.xfree86.org/3.3.2/README.html} to see if the X
windows server supports your particular video card.

NetBSD/i386 supports many PCI network cards (the 3Com 3c905B is the only
common card not supported), most common PCMCIA network adapters, and
most common ISA network cards.  If you have an ISA-bus network card, the
default NetBSD-Athena kernel may only support it at certain I/O ports
and IRQs:

\begin{itemize}
	\item 3Com 3c509 (Etherlink III) cards at any location
	\item NE2000 and compatible cards at port 0x280 IRQ 9, or port
          0x300 IRQ 10
\end{itemize}

The kernel also supports other less-common ISA-bus network cards.
Contact {\tt netbsd-help@mit.edu} if your card is not listed above.  If
you have an ISA-bus network card which is supported by NetBSD but isn't
supported by the default kernel, either reconfigure the card to a
supported port and IRQ, or contact SIPB via the mailing list {\tt
netbsd-help@mit.edu} (or phone x3-7788) and we can create custom install
disks for your machine.  
%If you have an NE2000 compatible card at port
%0x300 IRQ 4, 5, 9, or 11, you can find premade custom install disks in
%{\tt /mit/netbsd/release/athena-7.7.2/i386/custom}.

NetBSD/i386 requires nearly 200MB of disk space and 12MB of system
memory to install.  If you plan on using X windows, you will likely want
more than 12MB of memory: consider 16MB as a more realistic minimum.  It
may be possible to run NetBSD-Athena with less disk space or memory, but
this will require extra work on your part.  Send mail to {\tt
netbsd-help@mit.edu} for assistance.

For users upgrading from NetBSD-Athena 7.7, you may be able to upgrade
your system instead of reinstalling.  Contact {\tt netbsd-help@mit.edu}
if you are looking to upgrade.

\subsection*{System Installation}

\begin{enumerate}

\item Back up any important data on your hard disk.  Any time you change
your disk's partition layout, you risk losing all your data.  If you are
installing over an existing NetBSD or Linux partition and you have an
{\tt /etc/athena/srvtab} or {\tt /etc/krb5.keytab} file, save a copy of
it to avoid having to request another srvtab.  Also, you will probably
want to save your {\tt /etc/XF86Config} file to avoid having to
reconfigure XFree86.
  
\item If you don't intend on having any other operating systems on your
PC, then you can skip this step.  If you want to dual boot between
NetBSD and another operating system, you will have to install a
dual-boot manager.  You will also need to clear space for the
NetBSD-Athena installation.  We have several tools to help you do this
available in {\tt /mit/netbsd/i386/utils}, including:

\begin{itemize}
\item FIPS, a tool for shrinking a DOS partition
\item BOOTEASY, a simple boot manager
\item OS Boot Select, a more sophisticated boot manager
\end{itemize}

To use these utilities, make a bootable DOS floppy, put it in the drive
of an Athena Sun workstation, and copy the utilities to it:

\smallskip
{\tt
add netbsd; copyinsttools
}
\smallskip

You can also access these programs by pointing your web browser to {\tt
http://web.mit.edu/netbsd/i386/utils/}.

% You should read {\tt FIPS.DOC} in the {\tt fips12} directory and {\tt
% readme} in the {\tt bteasy14} directory.  You should generally only use
% utilities of this sort when you have booted from your utilities floppy,
% since they may interact poorly with Windows or whatever else your hard
% drive's DOS partition runs on startup.

FIPS is a utility that can split your DOS or Windows disk partitions
into smaller pieces, so that you can create empty space on your disk for
use as a NetBSD partition.  FIPS 2.0, available at {\tt
http://www.igd.fhg.de/~aschaefe/fips/}, supports both FAT16 DOS
partitions and the newer FAT32 Windows partitions.

You should set aside at least 200 megabytes for NetBSD.  To reduce the
size of your DOS partition, you should first run the DOS program {\tt
defrag} (this requires DOS 6 or greater) and tell it to completely
optimize your hard disk, moving all of the data to the first part of the
disk.  There may be some complications related to immovable files; read
{\tt FIPS.DOC} to find out how to deal with those.  Then, boot from your
utilities floppy and run {\tt fips}.

Now run the DOS program {\tt fdisk} and delete the second DOS
partition, so that the installation process can create a NetBSD
partition there.

% Currently, fips will not work if you have a FAT32 partition, used in
% some installations of Windows 95, 98, and NT.  The commercial program
% PartitionMagic (see {\tt http://www.powerquest.com/}) may help.
% Unfortunately, we know of no free software products that can split FAT32
% partitions.

FIPS will have split your DOS partition into two DOS partitions, the
first one containing all your old data and the second one empty.  At
this point, since you have two partitions and want to be able to boot
off either one, run {\tt bootinst} or {\tt osbs20b8} to install the
dual boot loader.  (BOOTEASY is a little easier to install; OS Boot
Select is fancier and more flexible.)

\item Make an installation disk from the image in {\tt
/mit/netbsd/release/athena-8.2/i386/floppies}.  To copy the image onto a
formatted HD floppy disk from an Athena machine, do:

\smallskip
{\tt
attach netbsd\\
cd /mit/netbsd/release/athena-8.2/i386/floppies\\
dd if=floppy.fs of={\em floppydev} bs=18k}
\smallskip

On a NetBSD system, replace {\em floppydev} with {\tt /dev/rfd0a}.  On
Linux, use {\tt of=/dev/fd0}.  Suns use {\tt /vol/dev/aliases/floppy0}
and SGI boxes use the particularly arcane {\tt /dev/rdsk/fds0d2.3.5}.
You may want to avoid using SGI machines due problems with the
reliability of their floppy drives.  On Suns, you might want to run {\tt
volcheck} before the {\tt dd} command.  If you are using a Windows
machine, you can use the {\tt rawrite.exe} utility to create the boot
disk.  You can find {\tt rawrite} and its documentation in {\tt
http://web.mit.edu/netbsd/i386/dos-utils/}, and the floppy image from \\
{\tt
http://web.mit.edu/netbsd/release/athena-8.2/i386/floppy/floppy.fs}.

\item Now, on your PC, boot off of the installation floppy you made.
Enter your machine's IP address when you are asked for it.  The default
values for the network interface and flags are probably correct, and you
can just press return at each question.  If the install doesn't find a
network interface, send email to {\tt netbsd-help@mit.edu} with your
system's configuration.

After a minute or so, the installation program will begin asking you
questions about how you want your system configured.  After you have
answered all of the questions, it will show you your answers and ask
you to confirm them.  After that point, the installation proceeds
with no manual intervention.  Over a typical MITnet connection, the
installation should take somewhere between 15 and 30 minutes.

Once the installation is finished and your system is halted, remove the
floppy, reboot your machine, and boot off your NetBSD hard disk
partition (using the boot loader you installed earlier, if necessary).
Your root password is the public athena cluster root password.  (You can
find the public root password by running {\tt tellme root}.)

\item Configure X.  For a new installation, log in as root and run:

\smallskip
{\tt
attach netbsd\\
/mit/netbsd/bin/xconfig
}
\smallskip

It will ask five fairly easy questions about your mouse, monitor, and
video card and generate an X configuration.  Test the resulting X
configuration by running {\tt startx}.  You can run {\tt xconfig} as
many times as you like if it doesn't work the first time.  If it doesn't
work for you, please send mail to {\tt netbsd-help@mit.edu} detailing
the problem.  Another tool provided with XFree86 may help you if {\tt
xconfig} does not; this is the command {\tt /usr/X11R6/bin/xf86config}.
If you saved an old {\tt XF86Config} file, you can just copy it to {\\
/etc/XF86Config} instead.

After you get X working, you can enable xlogin by modifying the line
of {\tt /etc/ttys} which executes the command {\tt /etc/athena/dm} to
be {\tt on} rather than {\tt off}, and then running the command {\tt
kill -HUP 1}.

\item You're ready to use your machine as an Athena workstation.  For
information on administrative tasks, such as enabling remote logins and
adding new users, consult the ``Administrating MIT SIPB NetBSD-Athena
8.2'' document, available in {\tt /mit/sipb/doc/netbsd-admin.dvi}.

\end{enumerate}

\bigskip
\noindent\rule{4in}{.01in}

\noindent
Document revision: \rcsRevision. The latest version of this document
may be obtained in person from the SIPB office (W20-557), or may be
printed out with: {\tt attach sipb; dvips -hduplex -P{\it printer}
/mit/sipb/doc/netbsd-install.dvi}.

\end{document}
