Subject: netbsd i386 boots a diskless sun3
To: None <>
From: Roland McGrath <>
List: current-users
Date: 12/13/1993 03:01:00
I have just successfully booted a Sun 3/60 diskless from my 486 running netbsd.

What I did is this:

* Wrote Sun-style ethers(3N) functions for libc (rarpd uses them).

* Fixed rarpd in a few ways:
  * Removed `#ifdef XXX_TEMP_HACK' around calls to ethers functions.
  * Fixed several byte-order problems (first time rarpd has run on a
    little-endian machine?).

* Hacked tftpd to have Sun-style interface (-s flag, different arg meaning).
  Something was necessary because the Sun asks for a file with no
  directory name.

* Wrote bootparamd.

I have put all my code on for anonymous FTP:

-rw-r--r--  1 roland   ftp         15364 Dec 13 02:34 netbsd-bootserver.tar.gz

This file contains:

-rw-rw-rw- roland/wheel   4041 Dec 13 02:29 1993 lib/libc/net/ethers.c
-rw-rw-rw- roland/wheel  22143 Dec 13 00:31 1993 libexec/rarpd/rarpd.c
-rw-r--r-- roland/wheel  12641 Dec 13 01:03 1993 libexec/tftpd/tftpd.c
-rw-rw-rw- roland/wheel     95 Dec 13 00:08 1993 usr.sbin/bootparamd/Makefile
-rw-rw-rw- roland/wheel   7634 Dec 13 01:38 1993 usr.sbin/bootparamd/bootparamd.c
-rw-rw-rw- roland/wheel    138 Oct 15 00:33 1993 usr.sbin/bootparamd/pathnames.h

There are still some problems and unfinished areas for really booting
a Sun from a netbsd machine.  When I say "successfully booted", I mean
that the Sun 3 got as far as running an NFS-mounted vmunix, which barfed.

For some reason the Sun's first tftp attempt always times out (taking
a minute or so), and then it wins on the second, but the tftp transfer
seems really slow.  I have no clue why this happens.

When the Sun reads its kernel over NFS, something strange happens.
It starts reading and reads some, and then it gets a long series of:

NFS server baalperazim-frob not responding still trying
NFS server baalperazim-frob ok
status 0x5

(baalperazim-frob is the name for my netbsd machine's address on the local
ethernet) with a second or so between groups of the same three messages.  It
seems to be slowly reading the kernel while spewing this lossage; eventually
it has the whole kernel and is fine.  I would be grateful for any clues on
this oddity.  If noone has any ideas, I'm willing to chalk it up to hardware
lossage, since my Sun has been very hot today, and there is flickery noise
on the monitor which reaches a crescendo with every group of NFS messages.

Eventually my little Sun has a whole kernel (I am booting SunOS 4.1.1_U1)
and runs happily along, spewing its normal bunch of messages.  This is as
far as I have gotten, because now it tries to NFS-mount its swap partition
and croaks.  Suns seem to use large regular files on the server for the
client swap area.  netbsd will not let me export a nondirectory (I tried
removing the check from mountd, but it seemed to find some other way to
lose), and the Sun gets rather upset when I make its swap file an empty


`rarpd -a' does not seem to work.  I have not yet investigated.
(`rarpd ed0' has been working fine for me.)

I wrote the code to use YP for ethers and bootparams, but I have
never tested it (I wrote it out of the goodness of my heart, but it
would take a hell of a lot more than that to get me to run YP).

I have not changed tftp's manpage to correspond to my changes to tftp.
I have not written manpages for ethers(3N) or bootparamd.

I look forward eagerly to anyone's ideas on my tftp slowness and
bizarre NFS lossage, and to someone implementing NFS-mounting regular files.