This directory has a bare bones, pre-alpha set of support tools for setting
up a server for diskless/dataless nfs clients and net booting them.

The basic idea is as follows:
- Use tftp or some proprietary bootstrap protocol (decnet mop etc.), making
  no assumptions that it will help fill in the nfs_diskless structure.
- Try to code the server tools such that they could be ported or cross
  compiled for most any Unix/nfs server. (not just BSD)
  (The pmax, which knows tftp, but expects to get a file in Coff was
   oddball enought to put some light on these problems.)
- Make the tools bare bones non-interactive commands that could be called
  from a shell script tailored to the architecture.

What is here:
diskless_offset.c - This little program reads a "vmunix" object file and
	writes the file byte offset of the nfs_diskless structure in it to
	standard out. It was kept separate because it sometimes has to
	be compiled/linked in funny ways depending on the client architecture.
	(See the comment at the beginning of it.)

diskless_setup.c - This program is run on the server and sets up files for a
	given client. It mostly just fills in an nfs_diskless structure and
	writes it out to either the "vmunix" file or a separate file called

diskless_boot.c - There are two functions in here that are called by the
	boot server to get the right "vmunix" file. They read the "vmunix"
	file, but optionally fill in the nfs_diskless structure from a
	separate "setup.<official-hostname>" file so that there is only
	one copy of "vmunix" for all similar (same arch etc.) clients.
	An example use of these functions is the hacked tftpd in this
	directory. (the hacked tftpd has NOT BEEN TESTED!)

	These functions use a text file called
	/var/diskless/boot.<official-hostname> to control the netboot.

The basic setup steps are:
- make a "vmunix" for the client(s) with mountroot() == nfs_mountroot()
  and swdevt[0].sw_dev == NODEV if it is to do nfs swapping as well
  Note that the size should be filled in with the same value given to
  diskless_setup as an argument when run on the server to set it up.
- run diskless_offset on the vmunix file to find out the byte offset
  of the nfs_diskless structure
- run diskless_setup on the server to set up the nfs_diskless structure
  for that client
  - it can either be written into the vmunix file (the -x option) or
    saved in /var/diskless/setup.<official-hostname> (the default)
- create/edit a file called /var/diskless/boot.<official-hostname>
  where the contents are as follows:
  1st line - pathname of the vmunix file
  2nd line - pathname and byte offset of the setup file (only if the -x
	option wasn't used above

	/var/diskless/setup.rickers.cis.uoguelph.ca 642308

- compile up a modified net server (such as tftpd) with calls to open_boot()
  and read_boot().
  - for tftpd, these calls are used for accesses to the file "vmunix", which
    is not otherwise allowed for tftpd (normally all names must start with /)

- create a /var subtree for each client in an appropriate place on the server,
  such as /var/diskless/var/<client-hostname>/...
  (if you have a little tar file of an empty /var subtree, then you can just
   # mkdir /var/diskless/var/<client-hostname>
   # cd /var/diskless/var/<client-hostname>
   # tar xpf var.tar
  (by using the <client-hostname> to differentiate /var for each host, you
   can easily hack /etc/rc so that it mounts the right one from the server)

This is only a first stab at it. Any comments/improvements would be
Thanks, rick
nb: There is no makefile, since how the programs are compiled depends on
	where they are going to be run and the client architecture being
	booted. (To run them on non-4.4 hosts, they need a mix of native
	.h files and 4.4 .h files.)