[comp.unix.ultrix] Ultrix diskless client weirdness

osyjm@caesar.cs.montana.edu (Jaye Mathisen) (02/18/91)

I have a VS2000 booted diskless off of a DS5000/200.  I've had to go through
and change IP addresses on these machines, and now the VS won't boot.  The
error is:

mountrpc: pmap_kgetport returned error 1
nfs_mountrpc: Cannot get port for mount device
Followed by a panic/registers, etc.


However, other machines can mount the DS disks fine, YP works fine, and
dms shows that the VS IP address has indeed been changed.  The dlparams
file has the correct stuff in it, as near as I can tell...  Where else
should I be looking?  I can always re-install the client, but that's
a pain.
--
 Jaye Mathisen,sysmgr 410 Roberts Hall,Dept. of Computer Science
 Montana State University,Bozeman MT 59717         PHONE: (406) 994-{4780,3931} 

mra@srchtec.uucp (Michael Almond) (02/18/91)

In article <3501@dali> osyjm@caesar.cs.montana.edu (Jaye Mathisen) writes:
>
>
>I have a VS2000 booted diskless off of a DS5000/200.  I've had to go through
>and change IP addresses on these machines, and now the VS won't boot.

Okay, I've gone through this same problem.  If you look in /etc/dms on the
DS5000 you see that it is actually a shell script and this is how I found
out how it adds a client and thus how to avoid re-installing a client.

There are some commands you can use to examine the 'node' database that
mop uses.  They are:

	getnode - display one or more entries from the nodes database
	addnode - add or change an entry in the nodes database
	remnode - remove one or more entries from the nodes database

You con't modify an entry in the database, but you can remove it and then
add it back in the node database, leaving the client directory and other dms
files uneffected.

Try 'getnode <hostname>', where <hostnaem> is whatever you call it when
working with dms.  This should show you the old ethernet address for your
VS2000.

Now 'remnode <hostname>' and then 'addnode <ethernet-address> <node-name>'.

It's been a while since I've done this, but I just looked over the /etc/dms
script again to recall the steps.

-- 
Michael R. Almond (Georgia Tech Alumnus)           mra@srchtec.uucp (registered)
search technology, inc.				             mra@searchtech.com
4725 peachtree corners cir., suite 200		       emory!stiatl!srchtec!mra
norcross, georgia 30092					 (404) 441-1457 (office)

sac@decuk.uvo.dec.com (Stephen A Carpenter) (02/18/91)

Internet address changes in a diskless environment.
ULTRIX V4.0


The Internet address of a diskless client is determined by the network
boot block the system send as the secondary load file. This file is
initially created by DMS but at the present time DMS does not have
the capability to change an existing netblk.


NOTE: If you attempt to change the IP address of either the client or
      server without modifying the netblk then your DISKLESS CLIENTS
      WILL NOT BOOT.



The definition of the network boot block is in /usr/include/sas/mop.h and
the netblk structure is shown below.


  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        */
  };
                                   

In order to change the IP address of the client or of the server you will need
to modify the netblk.

The code for the boot block is in the file /etc/bootblk.c on the diskless
client.



An example of this file is:

  #include <sas/mop.h>
  struct netblk   nblk={
  "my_server",
  0x10b38001, "my_client", 0x10b3803e, 0x10b380ff, 0xffffff00,
  0,
  5,
  0,
  0,
  "/dlclient0/my_client.root",
  "rz3b",
  ""
  };



A quick cross-reference with the mop include file will tell you which fields
represent which data.

To change the IP addresses you need to use the command /usr/diskless/makpkt.

The format of this command is:

  makpkt server_IP_addr client_name client_IP_addr broadcast netmask



Here is an example of using makpkt to change the network boot block parameters.


 For a server of address 16.128.128.4 and a client called fred of address
16.128.128.19 on a class B network you'll need to use the command:

  % makpkt 16.128.19.4 fred 16.128.20.19 16.128.255.255 255.255.0.0

this will produce the output:

  0x10801304,
  "fred",
  0x10801413,
  0x1080ffff,
  0xffff0000,


You will now need to edit netblk.c and replace the line

  0x10b38001, "my_client", 0x10b3803e, 0x10b380ff, 0xffffff00,

with

  0x10801304, "fred", 0x10801413, 0x1080ffff, 0xffff0000,


The next step is to compile the new netblk.

  % cc -c netblk.c


If you are changing the client IP address then you will also need to modify
the CLIARP field in /etc/dlparam on the client.

eg.
  CLIARP="16.182.128.61"


Finally you can change the server and/or client IP address on the server
and reboot.



Stephen Carpenter
UK ULTRIX Support

--
Stephen Carpenter               sac@decuk.uvo.dec.com

UK Ultrix Support
Digital Equipment Corporation