Subject: Re: Network boot?
To: Lloyd Parkes <Lloyd.Parkes@vuw.ac.nz>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-vax
Date: 04/13/1996 20:33:30
On Sun, 14 Apr 1996 14:40:09 +1400 
 Lloyd Parkes <Lloyd.Parkes@vuw.ac.nz> wrote:

 > How come an NFS root isn't supported? I can understand the swapper not being 
 > able to cope with NFS yet, but what's so special about the root?

Actually:

config  netbsd          root on nfs swap on nfs

*should* work Just Fine.  I find it quite nice to be able to boot 
diskless when working on the early birth of a port (many new ports come 
up into single-user with this working first :-)

 > Since I have a diskless Vax, I have been working on booting via MOP. I don't 
 > have (m)any docs, but I have had some success.

Gah, we need a mopd in the source tree, probably.

 > There seem to be two main problems with MOPing a kernel. 1) the kernel file is 
 > in the wrong format, and 2) the kernel expects the processor environment 
 > (memory, registers etc) to be set up in a particular way when it is started. I 
 > haven't dug deep enough to confirm #2.

This is the approach I took when getting netbooting working on the hp300:

	- use HP RMP (rbootd on the server) to load a bootblock.
	  The bootblock is in LIF format, the format expected by the
	  ROM.

	- Network bootblock uses rarp to get IP address, RPC bootparams
	  to get NFS server information, mounts server, loads kernel
	  via NFS.

Except for the first part, this is basically how a Sun 3 or SPARC 
netboots.  On a Sun, rarp and tftp are used in the first step by the PROM.

So, what a VAX could do is:

	- use MOP to load bootclock.  The bootblock is in whatever  To 
	  format MOP likes to load.  To avoid hacking mopd to pad
	  segments, link the bootblock as OMAGIC (which doesn't do
	  padding of segments).  Strip a.out header, prepend whatever
	  header MOP likes.

	- Network bootblock uses rarp to get IP address, RPC bootparams
	  to get NFS server information, mounts server, loads kernel
	  via NFS.

(Hint, only the first step is different :-)

You'll note that basically all of the code for the second step 
(rarp/bootparams/nfs) is already in libsa.  Since it's a NetBSD bootblock 
that loads the kernel (as is the disk bootblock), you win :-)

 > I think my initial fix for #2 will be to hack together some custom start up 
 > code for the kernel. 

"Ick."  See above.  Note, the kernel starup code should not have to treat 
netboot as a special case, and having to do so is totally broken :-)

 > That is what NetBSD/sparc and NetBSD/i386 are for ;-)

:-)

Ciao.

--------------------------------------------------------------------------
Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939