diskless decstation questions
Kurt J. Lidl
lidl at eng.umd.edu
Wed May 22 09:15:04 AEST 1991
In article <ROBM.91May20114859 at ataraxia.Berkeley.EDU> robm at ataraxia.Berkeley.EDU (Rob McNicholas) writes:
>In /usr/include/sys/mop.h, the netblk structure is defined as:
>
>struct netblk {
> char srvname[32]; /* server hostname (boot server)*/
> unsigned long srvipadr; /* server IP address (boot server)*/
> char cliname[32]; /* client hostname */
> unsigned long cliipadr; /* client IP address */
> unsigned long brdcst; /* broadcast address */
> unsigned long netmsk; /* network mask address */
> short swapfs; /* swap file system type*/
> short rootfs; /* root file system type*/
> short swapsz; /* swap size in 1/2 Meg units */
> short dmpflg; /* dump flag 0 - disabled */
> /* 1 - enabled */
> char rootdesc[80]; /* root filesys descriptor */
> char swapdesc[80]; /* swap file descriptor */
> char reserved[20]; /* for later use */
>};
>
>My question is: What is the meaning of 'swap file system type' and
>'root file system type'?
Well, thorugh empirical evidence (we tested lots of things, grunged through
those horrible "build it on the fly" shell scripts and looking at
Ultrix 3.1 source code), we have determined that the following values
should be used:
0x1 for the swap file system type
0x5 for the root file system type
This gives a root & swap type for type nfs -- probably what you want...
>Also, does 'srvname' have to be the name of the host that supplies the
>initial 'netload' and 'netblk' files, or can one machine do the
>initial booting, supplying a netblk file that refers to another
>machine which the client can then mount it's filesystems from?
srvname is the machine that will be providing the NFS services to the
client -- it has nothing to do with where the client gets the initial
files from -- that is all handled through MOP -- which runs right on
the ethernet hardware -- related to DECNet, but not to TCP/UDP/IP,
which is what NFS is all about...
The "one machine" that you refer to has to give more than just a
netblock.o -- you probably also need to feed it the netload.sys file
and the kernel that you are trying to boot.
>Finally, is anything special (DEC-specific) done with the swap file,
>or can it reside on any host that supports NFS?
Well, it works running off a sun3 and sun4... Should work for anything
that knows about NFS...
>p.s. Once again I'll ask: Is there any technical documentation
>available on how DEC implements is diskless support? Then you can all
>tell me to just RTFM :-)
Use the source, Luke!
Unfortunately, we never finished writing the MOP loader for our suns --
so we never finished the final touches on the "make your vs2000's" into
X-terminals...
But we do have a standard way of frobbing the MOP databases -- we wrote
a little C program that digests a file like this (a few example lines):
# X-Terminal Name Ethernet Address Server (defaults to rift)
soda00.eng.umd.edu 08-00-2b-07-a4-94
soda05.eng.umd.edu 08-00-2b-07-38-05 jolt.eng.umd.edu
soda06.eng.umd.edu 08-00-2b-07-39-ba
And then spews out a bunch of .c files that will compile down to
the "netblock.o" format that the mop_mom server will hand off to
the client when it boots. The program also takes care of automatically
added the machines to the MOP databases when it is generating a new
bootfile... It does the mapping from name->IP number by gethostbyname(),
so if you use nameservice, you always get the right answer :-)
Here is a sample .c file that our program generates:
/* Worthless comment */
/* This is 'puter generated code */
#include <sas/mop.h>
struct netblk nblk={
"jolt.eng.umd.edu", /* server hostname (boot server) */
0x800885E3, /* server IP address (boot server) */
"soda00.eng.umd.edu", /* client hostname */
0x800885E4, /* client IP address */
0x800885FF, /* broadcast address */
0xFFFFFF00, /* network mask address */
0x1, /* swap file system type */
0x5, /* root file system type */
0xC, /* swap size in 1/2 Meg units */
0x0, /* dump flag 0-disabled, 1-enabled */
"/export/vax/root/soda_root", /* root filesys descriptor */
"/export/vax/swap/soda_swap", /* swap file descriptor */
"" /* for later use (by DEC?) */
};
-Kurt
--
/* Kurt J. Lidl (lidl at eng.umd.edu) | Unix is the answer, but only if you */
/* UUCP: uunet!eng.umd.edu!lidl | phrase the question very carefully. */
/* "It's 5:50 a.m., Do you know where your stack pointer is?" */
More information about the Comp.unix.ultrix
mailing list