Subject: NetBSD/pmax Installation Instructions
To: None <port-pmax@NetBSD.ORG>
From: Gregory McGarry <g.mcgarry@qut.edu.au>
List: port-pmax
Date: 10/24/1997 13:53:27
There seems to be a considerable number of installations being done
at the moment.  This URL is a good place to refer to if problems are
being encountered:

http://www.flame.org/mlist/netbsd/port-pmax/index.shtml

Additionally, here is a set of instructions I compiled a few months
back.  I have made changes to it over the last few days with the
comments from the list.  Have a look, and please supply any feedback.

I also have a set of installation scripts.  However, I haven't had the
time to create a set of static binaries which will go into the
diskimage.  I can't remember what stage I got to with them either.
I don't have a spare disk anymore.  They are based on the NetBSD
install scripts, which I obtained from the sun3 port.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[these installation instructions are currently under revision!
 please evaluate and send any changes to port-pmax@netbsd.org
 please do not redistribute this file.]

INSTALLATION NOTES for NetBSD/pmax:  v2.0  1997/10/23


Contents
--------

What is NetBSD?
System Requirements
Obtaining NetBSD
Obtaining Help
Getting Started
  Hardware Identification
  Choosing a Helper Machine
Setting Up the Helper Machine
  Setting Up the BOOTPD Daemon
  Setting Up the RARP Daemon
  Setting Up the rpc.bootparamd Daemon
  Configuring the NFS Server
  Copying the NetBSD Distribution
Netbooting the DECstation
Labelling the Disk for NetBSD
  Preparing the Partitions:
Unpacking the NetBSD Distribution
Configuration
Appendix A: Installing with Unsupported PROMs
Appendix B: If things still don't work
Acknowledgements


What is NetBSD/pmax?
--------------------

The NetBSD Operating System is a fully functional UN*X-like system
derived from the Berkeley Networking Release 2 (Net/2), 4.4BSD-Lite,
and 4.4BSD-Lite2 sources.  NetBSD runs on many architectures and is
being ported to more.
 
NetBSD/pmax is the port of NetBSD to MIPS-based DECstations and
DECsystems. 


System Requirements
-------------------

NetBSD/pmax supports DECstations and DECsystems with the MIPS r2000,
r3000, r3400, r4000 and r4300 processors, including the DECstations
2100, 3100, 5000/20, 5000/25, 5000/33, 5000/50, 5000/120, 5000/125,
5000/150, 5000/200, 5000/240 and 5000/260.

NetBSD/pmax has no support for the DECstation 5100 or the DECsystem
5400.  A port to the multiprocessor DECsystem 5800 is unlikely to
ever happen.

For a complete list of supported hardware look on the webpages
at <http://www.NetBSD.ORG/Ports/pmax>.

The minimal configuration requires 8MB of RAM and ~80MB of disk space.
To install the entire system requires much more disk space (approx.
100MB additional space is necessary for full sources).  To run X
or compile the system, more RAM is recommended.  Good performance
requires 16MB of RAM when running the X Window System.


Obtaining NetBSD
----------------

The main archive for the NetBSD distribution is at <ftp.netbsd.org>.
If you can, try and grab the distribution from the mirror site
closest to you.  A list of mirrors is available at
<http://www.netbsd.org>.

Grab the following files in the binary distribution:

netbsd.ecoff      Netbootable ECOFF kernel.  This kernel is required
                  to be booted by the DECstation for the installation
                  process.

bootrz            NetBSD bootblocks
rzboot

diskimage.tar.gz  Minimal file system for the installation process.
                  Contains only the necessary files to label a disk
                  and install the NetBSD distribution.

32M-diskimage.gz  A diskimage for installation on buggy PROMs.  Only
                  necessary if the archive above won't work!

base.tar.gz       The NetBSD/pmax base binary distribution.  You
                  MUST install this distribution set.  It contains the
                  base NetBSD utilities that are necessary for the
                  system to run and be minimally functional.  It
                  includes shared library support, and excludes
                  everything described below.

comp.tar.gz       The NetBSD/pmax Compiler tools.  All of the tools
                  relating to C and C++.  This set includes the system
                  include files (/usr/include), the linker, the compiler
                  tool chain, and the various system libraries (except
                  the shared libraries, which are included as part of the
                  base set).  This set also includes the manual pages for
                  all of the utilities it contains, as well as the system
                  call and library manual pages.

etc.tar.gz        This distribution set contains the system configuration
                  files that reside in /etc and in several other places.
                  This set MUST be installed if you are installing the
                  system from scratch, but should NOT be used if you are
                  upgrading.

games.tar.gz      This set includes the games and their manual pages.

man.tar.gz        This set includes all of the manual pages for the
                  binaries and other software contained in the base set.
                  Note that it does not include any of the manual pages
                  that are included in the other sets.

misc.tar.gz       This set includes the system dictionaries (which are
                  rather large), the typesettable document set, and
                  man pages for other architectures which happen to be
                  installed from the source tree by default.

text.tar.gz       This set includes NetBSD's text processing tools,
                  including groff, all related programs, and their
                  manual pages.


Obtaining Help
--------------

The main mailing list for the NetBSD/pmax port is

        port-pmax@NetBSD.ORG

Please try to supply as much information as possible when asking
questions, particularly hardware based problems.

General NetBSD comments can be directed to
 
  netbsd-comments@NetBSD.ORG
 
To report bugs, use the 'send-pr' command shipped with NetBSD,
and fill in as much information about the problem as you can.  Good
bug reports include lots of details.  Additionally, bug reports can
be sent by mail to:
 
  netbsd-bugs@NetBSD.ORG
 
Use of 'send-pr' is encouraged, however, because bugs reported with it
are entered into the NetBSD bugs database, and thus can't slip through
the cracks.
 
If you'd like to help with this effort, and have an idea as to how
you could be useful, send mail and/or subscribe to:
 
  netbsd-help@NetBSD.ORG
 

Getting Started
---------------

There are three basic steps to installing NetBSD on a DECstation:

- booting the DECstation across the network
- labelling a disk for NetBSD
- unpacking a full NetBSD distribution.

This installation guide walks you through each of those steps.  However,
some preparatory steps are required to prepare for installation.


* Hardware Identification

Unfortunately, not all hardware available on the DECstations is
supported by NetBSD/pmax and this can affect the installation
procedure.

The main problems DECstations have with NetBSD is with buggy PROMs.
A list of supported PROMs is maintained by Simon Burge and is available at

  <http://melanoma.bf.rmit.edu.au/werj/simonb/PMAX-type-list.html>

Additionally, some of the video displays are unsupported, particularly
the truecolour and accelerated video boards.  In such cases it is
usually required to remove the unsupported board or place a serial
console on the serial port.  A standard serial console configured
for no parity, 8 data bits, and 1 stop bit will work.

To find out which PROM version you have and hardware use the following
command at the unrestricted boot monitor:

  >> cnfg

If you cannot obtain a unrestricted boot monitor, refer to the
FAQ to clear the password.

The cnfg command will display some information like the following:

  3: KNO2-CA  DEC        V2.0m     TFC0  ( 24 MB)
                                         (DV -- d=8)
                                         (Sb: devs = 2)
                                         (FDI: 0)
                                         (enet: 08-00-2b-2a-22-5a)
                                         (SCSI = 7)
  0: PMAG-JA  DEC        V5.3A     TFCO  (CX -- d=8,24)

This indicates that the machine contains two boards,  Board 3 is the
baseboard version KN02-CA, which is a DECstation 5000/25.  The PROM
version is V2.0m.  The other information indicates the amount of
installed RAM, the 8-bit base video controller, the number of installed
floppy disk drives, ethernet hardware address, and internal SCSI
controller ID.

The second board 0 is an expansion board, which is an unsupported
truecolour video board.

This information is always important for diagnosing problems during
installation.  Before continuing installation ensure that your boot
PROMs and video board are supported.

If your hardware isn't supported, there are still ways to get around the
problems.  See the section title "Installing with Unsupported PROMs".


* Choosing a Helper Machine

Installing NetBSD on a pmax cannot be done standalone.  The very
first thing you need to do is to choose a helper machine to host
the installation process.  You also need a disk on which to install
NetBSD.  Any information on this disk will be lost.

Why do you need a helper machine?  The simple answer is, you need a
helper to host the NetBSD installation, because that's the only
guaranteed way to boot NetBSD on a DECstation.  DECstations don't
generally have floppy disk drives.  Even those that do, don't support
booting from them.  Booting from tape, and making tape distributions,
is too painful.

The helper machine is responsible for hosting the NetBSD kernel and
the NetBSD distribution.


Setting Up the Helper Machine
-----------------------------

The DECstation boots its kernel across the network using bootp and
tftp.  The DECstation PROMs only know how to read ECOFF (an extension
of COFF) format executables.  NetBSD/pmax uses ELF format executables
by default.  Hence, the netbsd.ecoff kernel is specifically compiled
to be booted by the DECstation PROMs.

First you'll need to allocate an IP address to the DECstation.  Add the
IP address and machine name to the /etc/hosts configuration on the
helper machine.  For example:

  #
  #  /etc/hosts
  #
  192.168.17.5    helper  helper.foo.com.au
  192.168.17.27   newbie  newbie.foo.com.au

helper.foo.com.au is the helper machine, while newbie.foo.com.au
is the DECstation.


* Setting Up the BOOTPD Daemon

Next you need to install and setup a daemon on the helper machine to
listen for bootp requests.  You will also need to run tftpd to send
the NetBSD ECOFF kernel to the DECstation.

If your helper machine doesn't already have a bootpd daemon, you can
use bootp2.4.3.tar.Z from CMU.

The bootpd daemon can be loaded as a server by the inet server.  To do
ensure that the following line is in /etc/inetd.conf:

  bootp   dgram   udp     wait    root    /usr/local/etc/bootpd bootpd -i

Additionally the following lines should be in /etc/services:

  bootps          67/udp          bootp           # BOOTP Server
  bootpc          68/udp                          # BOOTP Client

The bootd daemon is confuring with the /etc/bootptab file.  The 
/etc/bootptab provides a database of IP address and kernel names
for each network bootable machine.  An example entry for the 'newbie'
with hardware address 08002b2d17e and IP address 192.168.17.27 is:

  #
  #  /etc/bootptab
  #
  .def:dn="foo.com.au":\
      :sm=255.255.255.0:\
      :gw=192.168.17.1:\
      :vm=rfc1048:\
      :bs=auto:\
      :hd=/tftpboot
 
  newbie:tc=.def:ht=ethernet:ha=08002b2d17e0:ip=192.168.17.27:bf=netbsd.ecoff

The 'ha' field is the hardware address of the DECstation, and
and the 'bf' is the path to the netbsd.ecoff that should be accessible
for tftp.

Ensure that netbsd.ecoff is located in /tftpboot.


* Setting Up the RARP Daemon

When the kernel is loaded on the DECstation, NetBSD needs to reconnect
to the helper machine to mount its root file system.  To determine its
IP address for this procedure, the NetBSD kernel uses the RARP protocol.

Most systems support RARP.  RARP is configured with /etc/ethers.  An
example entry is:

  #
  #  /etc/ethers
  #
  08:00:2b:2d:17:e0 newbie.foo.com.au

This entry will allow the helper machine to convert the DECstation's
hardware address to an IP address.  Ensure that the RARP demon is
running.

Restart the RARP daemon.

If the RARP daemon coredumps or complains of errors where the helper
machine is running Ultrix, ensure that the kernel has a packetfilter
device compiled into the kernel and the device files are present
in the /dev directory on the Ultrix machine.

Under Solaris you will need to check the /etc/nsswitch.conf file to
ensure that the configuration is actually in /etc/ethers.  If Solaris
is using NIS, then the RARP configuration will have to be altered
accordingly.

Under Linux, ensure that the kernel has RARP support compiled into the
kernel and add the hardware address of the DECstatation to the RARP
table:

  /sbin/rarp -s newbie 08:00:2b:2d:17:e0


* Setting Up the rpc.bootparamd Daemon

To determine the location of the root file system, NetBSD queries the
rpc.bootparamd daemon on the helper machine.  The rpc.bootparamd
daemon is configured with /etc/bootparams.  An example entry is:

  #
  #  /etc/bootparams
  #
  newbie  root=helper.foo.com.au:/export/ds.root/ \
          swap=helper.foo.com.au:/export/ds.swap/

NetBSD uses the identifiers "root" and "swap", to look up the pathnames
for the root filesystem and a swap area respectively.  Other
architectures will recognise additional identifiers such as "dump",
"numbootfiles,"  "bootfile,"  and  "bootaddr".

No matter how much RAM your machine has, or whether you believe it will
ever use it, you must specify a swap partition.

Restart the rpc.bootparamd daemon.

Under Solaris you will have to check the /etc/nsswitch.conf file to
ensure that the configuration is actually in /etc/bootparams.  If
Solaris is using NIS, then the rpc.bootparamd configuration will have
to be altered accordingly.

Andrew Gallatin <gallatin@cs.Duke.EDU> has an rpc.bootparamd daemon
which works under Ultrix, and will supply it on request.  We are
interested in hearing from anyone who tries this.


* Configuring the NFS Server

The NFS server is responsible for sharing the root and swap file systems
on the helper machine to the DECstation.  Configuring the NFS server
seems to vary considerably between different helper systems.

The NFS server is actually a collection of a number of different daemons.
These daemons are configured with /etc/exports on most systems.  An
example is given by:

  #
  #  /etc/exports
  #  (the correctness of this file hasn't been tested!)
  #
  /export/ds.root	(rw=newbie.foo.com.au)
  /export/ds.swap	(rw=newbie.foo.com.au)

If the NFS daemon is running on another NetBSD system, ensure that
you add the '-alldirs' flag.

Ensure that rpc.portmap, rpc.mountd and rpc.nfsd are running.

Under Solaris, the configuration is slightly different.  Rather than
using /etc/exports, Solaris uses a collection of configuration files
in /etc/dfs/.  Specifically, it uses /etc/dfs/dfstab and
/etc/dfs/sharetab.  An example entry in the /etc/dfs/dfstab would be:

  #
  #  Solaris NFS configuration
  #  /etc/dfs/fstab
  #
  share  -F nfs -o rw=newbie.foo.com.au /export/ds.root
  share  -F nfs -o rw=newbie.foo.com.au /export/ds.swap

An example entry in the /etc/dfs/sharetab would be:

  #
  #  Solaris NFS configuration
  #  /etc/dfs/sharetab
  #
  /export/ds.root  -  nfs  rw=newbie.foo.com.au,root=newbie.foo.com.au
  /export/ds.swap  -  nfs  rw=newbie.foo.com.au,root=newbie.foo.com.au

Note that if Solaris is not sharing any file systems, running share
has no effect until you restart nfsd server processes.

If you are using a Digital UNIX system as an NFS server, beware of the
inode translation done by Digital UNIX.  The recommended solution is

- Untar /dev/console and /dev/MAKEDEV into the diskless machine's
  root directory on the server (e.g., /export/ds.root/dev,
  not the server's own /dev directory).
- boot the diskless machine.
- Populate the diskless machine's /dev directory after booting, using
  'cd /dev; sh MAKEDEV all.


* Copying the NetBSD Distribution

Unpack the diskimage.tar.gz archive in the NFS shared directory on the
helper machine which will be the root file system for the DECstation.
In the example above, this was /export/ds.root/.  Do this as superuser,
as all files must be owned by root.

Ensure that the /export/ds.root/tmp directory has world read, write and
execute permissions.

Change to the /dev directory of the DECstation root file system
(eg /export/ds.root/dev/) and run

  # sh MAKEDEV all

This populates the directory with the necessary device special files
for the DECstation kernel.

Copy bootrz and rzboot into the /export/ds.root/usr/mdec subdirectory.
These are the bootblock files necessary to label the SCSI disk.

Finally, copy all the *.tar.gz archives in the NetBSD distribution
which you intend to install into the /export/ds.root/ directory.


Netbooting the DECstation
-------------------------

Now comes the opportunity to see how well you went at configuring the
helper machine.  Everything must come together at this point to
successfully boot the DECstation.

Boot the DECstation with the following command:

  >> boot 3/tftp                               # DS5000
  >> boot 6/tftp                               # DS5000/200
  >> boot -f tftp(0,6)/tftpboot/netbsd.ecoff   # DS2100/3100

The DECstation sends out a bootp request first, an arp request after
that, and finally is able to initiate a tftp session to load the kernel.

During the tftp session the PROM will display segment sizes.  If this
doesn't happen, check the network, and ensure that the /etc/bootptab
is configured correctly.

After the tftp session, the PROM will attempt to execute the kernel.
You should see the following on the console:

  Using PROM serial output until serial drivers initialized
  Copyright (c) 1982, 1986, 1989, 1991, 1993
      The Regents of the University of California.  All rights reserved.

  NetBSD 1.2G (GENERIC) #1: Sun Jun 22 21:35:15 PDT 1997
      jonathan@Reno.DSG.Stanford.EDU:/reno/compile/GENERIC
  real mem = 33554432
  avail mem = 27561984
  using 409 buffers containing 1675264 bytes of memory
  mainbus0 (root)
  cpu0 at mainbus0: MIPS R3000 CPU Rev. 3.0 with MIPS R3010 FPC Rev. 4.0
          L1 cache: 64kb Instruction, 64kb Data.
  tc0 at mainbus0: 12.5 MHz clock
  asic0 at tc0 slot 3 offset 0x0
  le0 at asic0 offset 0xc0000 priority 4: address 08:00:2b:2d:17:e0
  le0: 32 receive buffers, 8 transmit buffers
  scc0 at asic0 offset 0x100000 priority 5
  clock0 at asic0 offset 0x200000 priority 0: mc146818 or compatible
  isdn at asic0 offset 0x240000 priority 7 not configured
  dtop0 at asic0 offset 0x280000 priority 6
  fdc at asic0 offset 0x2c0000 priority 2 not configured
  asc0 at asic0 offset 0x300000 priority 3: target 7
  xcfb0 at tc0 slot 2 offset 0x0 (1024x768x8) (console)
  Beginning old-style SCSI device autoconfiguration
  rz2 at asc0 drive 2 slave 0 DEC RZ25 (C) DEC rev 0700, 832527 512 byte blocks

If this isn't what happens, then something has gone wrong.  Sometimes,
the PROMs can get confused.  If the problem persists after rebooting the
machine, then most likely it is an incompatible PROM version.  Contact
the mailing list and notify them that you believe you have an
unsupported PROM version to be added to the hardware list.

If the SCSI disks spin up during booting and it appears that the console
has locked at the line

  scc0 at asic0 offset 0x100000 priority 5_

then you most probably are using an unsupported frame buffer.  The
remainder of the boot sequence is talking to the serial port.  Connect
a serial console to the serial port.

After displaying booting information to the console, the kernel will
ask for the location of its root file system and swap partition:

  boot device: <unknown>
  root device:
  dump device:
  file system (default generic):

Enter 'le0' as the root device.  Enter 'none' for the dump device, and
'nfs' as the filesystem.

The kernel now attempts to determine its IP address from the RARP
daemon on the helper machine, and proceeds to mount the shared
directory from the NFS server as the root partition.  If you receive
the output error

  revarp failed, error 51

then the RARP daemon on the helper machine is not replying to the
DECstation RARP requests.  Check the configuration in /etc/ethers.

If you continually receive the output error on the console

  RPC timeout for server 0xc0a8b51105

where 0x83b51105 is the hexidecimal notation of your IP address
received from the RARP request (192.168.17.5 in this case), then the
DECstation has been unable to obtain the necessary information from
the rpc.bootparamd daemon.  Check the configuration in /etc/bootparams.

If the kernel appears to lock-up displaying the error message

  warning: no /dev/console

then the NFS directory doesn't have the necessary device special files
for the kernel.  Create these files:

  # cd dev; sh MAKEDEV all

Otherwise, if all that worked, then you are ready to label the disk in
preparation for installing the NetBSD distribution.

During netboot, the kernel automatically configures the network
interface, assigning an appropriate default netmask, depending on the
class of the its IP address returned by bootp.


Labelling the Disk for NetBSD
-----------------------------

Labelling a disk does two things.  It tells NetBSD how to divide the
disk into partitions.  It also puts a boot block on the disk.

A bootblock is a small piece of machine code that lives on the
start of a disk.  At boot time, the boot PROM reads the bootblock
from disk and executes it.  The bootblock then continues bootstrapping
by reading an operating system into memory and jumping into it.

NetBSD/pmax uses rz#, where "rz" means "scsi disk", # is the
SCSI disk ID.

During the NetBSD boot sequence a list of SCSI device is displayed
on the console.  For example:

  rz25 at ac0 drive 2 slave 0 DEC RZ25 (C) DEC rev 0700 832527 512 byte block

Record the first field speciying the 'disk type' and the size of the
disk.  In this example the size is 832527 blocks.

At the shell prompt, execute the disklabel program:

  # disklabel -w -r rz2a rz25

Replace the necessary specifics for your drive.  This will destroy all
information on the disk!  Now read the disklabel back from the disk
and store it in a profile:

  # disklabel -r rz2a > /tmp/disk.profile

The -r causes the label to be read from disk directly, rather than
going through the system's in-core copy of the label. 

The current label information for the disk with SCSI ID 2, is
saved to /tmp/disk.profile.  It will look something like this:

  # /dev/rrz2a:
  type: unknown
  disk: rz25
  label: 
  flags:
  bytes/sector: 512
  sectors/track: 62
  tracks/cylinder: 9
  sectors/cylinder: 558
  cylinders: 1476
  total sectors: 823608
  rpm: 3600
  interleave: 1
  trackskew: 0
  cylinderskew: 0
  headswitch: 0           # milliseconds
  track-to-track seek: 0  # milliseconds
  drivedata: 0 
 
  4 partitions:
  #        size   offset    fstype   [fsize bsize   cpg]
    a:    32768        0    4.2BSD     1024  8192     0   # (Cyl.    0 - 58*)
    b:   131072    32768      swap                        # (Cyl.   58*- 293*)
    c:   823608        0    unused        0     0         # (Cyl.    0 - 1475)
    d:   600408   223200    4.2BSD     1024  8192     0   # (Cyl.  400 - 1475)

The header information gives an overview of the disk characteristics.
The partition information is tabled below the header.  Partitions on
the disk are specified with letters a to h.  One partition is used to
map the entire disk.  That is always the 'c' partition.  Partition
'b' is reserved as the swap partition.

Now modify the size of your 'c' partition to correspond to the size
specified during the boot sequence.  Additionally, ensure the
'total sectors' in the header matches.  Remember that the DECstation
console doesn't support cursor positioning, so you cannot use vi.  You
can edit the disklabel disk.profile back on your helper machine.

Create any additional partitions.  Note that partition sizes and offsets
are expressed in sectors, but the partitions must end on cylinder
boundaries.  The sectors/cylinder information is specified in the
header information.

It's recommended to have a large root filesystem (as 32MB).  The
partition scheme in /etc/disktab is not appropriate for recent
NetBSD/pmax configurations.

Asumming a classic partition scheme with root (`/') and /usr filesystems,
a comfortable size for the NetBSD root filesystem partition is about 32MB;
a good initial size for the swap partition is twice the amount of physical
memory in your machine (though, unlike Ultrix, there are no restrictions on
the size of the swap partition that would render part of your memory
unusable).  A full binary installation, including X11, takes about 120MB
in `/usr'.


* Preparing the Partitions:

Finally, write the disklabel and bootblocks to disk:

  # disklabel -r -R -B -b /usr/mdec/rzboot -s /usr/mdec/bootrz rz2 disk.profile

Newfs the newly created partitions:

  # newfs rz2a
  # newfs rz2d

The 'a' partition will be the root (/) partition for NetBSD, and 'd' will
be the /usr partition.  Mount the 'a' partition:

  # mount /dev/rz2a /mnt

Change to the /mnt directory and create a /mnt/usr subdirectory.  Now
mount the 'd' partition:

  # mount /dev/rz2d /mnt/usr

Perform this step on any other partitions you have configured.
Now the disk is ready to unpack the NetBSD distribution.


Unpacking the NetBSD Distribution
---------------------------------

The next thing to do is to unpack a full set of binaries and
configuration files.

  # cd /mnt
  # for i in <the tar.gz files on /mnt directory>
  > do
  > tar xvpzf $i
  > done

Copy a kernel from the root directory into /mnt.  If you are installing
a snapshot, then copy the corresponding kernel for that snapshot, rather
than the kernel from the diskimage.tar.gz.


Configuration
-------------

Make sure the /mnt/dev/ directory is populated.  Some errors
may occur, just ignore them at this stage.

Configure /etc/fstab (/mnt/etc/fstab).  For example:

  /dev/rz2a       /               ffs     rw 1 1
  /dev/rz2b       none            swap    sw 0 0
  /dev/rz2d       /usr            ffs     rw 1 2
  kernfs          /kern           kernfs  ro 0 0

This will be different depending on how you partitioned the disk and the
number of disks.  Ensure that /kern directory exists.

Configure /etc/hosts (/mnt/etc/fstab).  For example:

  #
  #  /etc/hosts
  #
  127.0.0.1               localhost
  #
  192.168.17.27           newbie.foo.com.au newbie
  192.168.17.5            helper.foo.com.au helper
  192.168.17.1            gateway.foo.com.au gateway

Edit /etc/rc.conf.  For example:

  hostname="newbie.foo.com.au"
  domainname="foo.com.au"
  defaultroute="gateway.foo.com.au"

Finally, create /etc/ifconfig.le0 (/mnt/etc/ifconfig.le0) to configure
the network configuration:

  helper.foo.com.au up netmask 255.255.255.0

If you want to use a console, run "mknod tty00 c 17 0" by hand.

The configuration is now almost complete.  To make the PROM do
an automatic boot, at the boot monitor type:

  >> setenv boot "3/rz2/netbsd -aN"

Now reboot the machine, and start playing!


Appendix A: Installing with Unsupported PROMs
-------------------------------------------

For DECstation with unsupported PROMs it is still possible to install
NetBSD, however it is just a little more difficult.  The process
requires installing the disk drive into another machine, say the
helper machine, and writing a bootable image.

Th first step is to write the disk image onto the disk.  Use the
32M-diskimage.gz found on <ftp.netbsd.org/Ports/pmax>.

The simplest and safest way is to get the disk image and dd it
onto the 'c' partition of the target disk.
To do this, use a command like 

  # dd if=32M-diskimage of=/dev/rD#P

where D is a disk name, # is a unit number, and P is the partition for the
whole disk.  For example, with the target disk on an Ultrix system, at unit
2, that would be 

  # dd if=32M-diskimage of=/dev/rrz2c

and on a Sun, with the target disk at unit 1, the corresponding
command would be 

  # dd if=32M-diskimage of=/dev/rsd1c

For port-i386, partition 'd' is the full disk, not 'c' as on most other
ports.

Once you have labelled the target disk, and dd'ed the image onto it,
you are ready to boot NetBSD.  Move the target disk to the DECstation
to boot it.

Boot the DECstation with the following command:

  >> boot 3/rz2c/netbsd                        # DS5000
  >> boot 5/rz2c/netbsd                        # DS5000/200
  >> boot -f rz2(0,2,0)/netbsd                 # DS2100/3100

(If your target disk is attached to a TurboChannel PMAZ-AA optional
SCSI adaptor, you should replace the 3 or 5 with the slot number of
your SCSI adaptor.)

This will boot the disk image.  You should then see output something
like:

  Using PROM serial output until serial drivers initialized
  Copyright (c) 1982, 1986, 1989, 1991, 1993
      The Regents of the University of California.  All rights reserved.

  NetBSD 1.2G (GENERIC) #1: Sun Jun 22 21:35:15 PDT 1997
      jonathan@Reno.DSG.Stanford.EDU:/reno/compile/GENERIC
  real mem = 33554432
  avail mem = 27561984
  using 409 buffers containing 1675264 bytes of memory
  mainbus0 (root)
  cpu0 at mainbus0: MIPS R3000 CPU Rev. 3.0 with MIPS R3010 FPC Rev. 4.0
          L1 cache: 64kb Instruction, 64kb Data.
  tc0 at mainbus0: 12.5 MHz clock
  asic0 at tc0 slot 3 offset 0x0
  le0 at asic0 offset 0xc0000 priority 4: address 08:00:2b:2d:17:e0
  le0: 32 receive buffers, 8 transmit buffers
  scc0 at asic0 offset 0x100000 priority 5
  clock0 at asic0 offset 0x200000 priority 0: mc146818 or compatible
  isdn at asic0 offset 0x240000 priority 7 not configured
  dtop0 at asic0 offset 0x280000 priority 6
  fdc at asic0 offset 0x2c0000 priority 2 not configured
  asc0 at asic0 offset 0x300000 priority 3: target 7
  xcfb0 at tc0 slot 2 offset 0x0 (1024x768x8) (console)
  Beginning old-style SCSI device autoconfiguration
  rz2 at asc0 drive 2 slave 0 DEC RZ25 (C) DEC rev 0700, 832527 512 byte blocks
  root device?

The image is now prompting you for a disk to use as the root
filesystem.  It's impossible to tell, when compiling an image, what disk
drives any given installer will choose to put NetBSD on.  So the image
kernel asks which disk drive it should use as its root filesystem.  You
need to answer with the disk drive on which you put the image (eg rz2 for
disk 2).  If you have more than one disk disk, the list of disk drives
and unit numbers the kernel printed out should help you figure out the
correct response. 

After the system is booted in single user mode, the root filesystem (still
anonymous at this point) is mounted read-only.  Any write operation
is prohibited.  To enable write, a 're-mount' operation has to be done,
specifying the block special file name associated with the filesystem. 
 
In the case of /etc/fstab is correctly prepared, it is sufficient to
issue:
 
        # mount -u /
        
To do the same in a more specific way:
 
        # mount -u -w /dev/rz2a /

Now it's time to adjust the disklabel to reflect the realities, and
append new partitions after the swap partition.

Refer to section "Preparing the Partitions".  Only change the partition
table, don't rewrite a new one over the top!

The binary distribution can be obtained from an NFS server.  Refer
to section "Configuring an NFS server".  A network connection can be
initialised on the DECstation with

  # /usr/sbin/ifconfig 192.168.17.27 up netmask 255.255.255.0

and the remote file system mounted with

  # /sbin/mount -t nfs 192.168.17.5:<export directory> /mnt

Unpack the distribution in /.

Continue installation from "Configuring".


Appendix B: If things still don't work
--------------------------------------

If you have problems booting a kernel, try building a stripped-down
kernel (e.g., without COMPAT_ULTRIX, NFS_SERVER, UNION, SCSI support,
etc.).  From trial and error, the critical variable seems to be the
kernel text size.  (Changing elf2aout to emit separate a.out text and
data segments may also help; that has not been tried).  Even machines
with `problem' PROMs seem to boot successfully if the kernel text is
stripped down far enough.  We don't yet have a good estimate of what
is `small enough'; reports of success are definitely encouraged. 


Acknowledgements
----------------

The network-boot instructions are largely based on Andrew Gallatin's
experimentation with diskles pmax kernels, and Andrew's early notes.
The diskless boot documentation wouldn't exist without Andrew's efforts.

Jonathan Stone was the original author of these installation notes.
Without his original notes, nobody would have been able to install
NetBSD/pmax to contribute to this revision!

<end of file>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Regards,
Greg