Subject: Re: NFS problems with sunos machines to netbsd sparc
To: None <davem@nadzieja.rutgers.edu>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 11/23/1994 09:49:54
>> (I assumme this is about getting a NetBSD machine to boot diskless
>> off a SunOS machine.)
> No, actually it is about getting a NetBSD machine to run an
> automounter to a sunos machine that will only allow nfs activity over
> priviledged ports.  But both can cause similar problems.

Hm, then my note is less applicable.

>>> Is there a kernel compile time option to set priviledged port nfs
>>> usage by default in Netbsd?
>> There wasn't.  I added one but [...]

This is actually not quite true.  I misinterpreted "by default" in the
context I was expecting - mounting the root filesystem when booting
diskless, when there is no user-land code that can be changed to
compensate.  Sorry if I confused you.

>> I'll be glad to send the patches to anyone who wants them.
> Could you please post the patch so I can see if it solves my problem
> :>

It won't, sorry.  But it's quite small, so here it is anyway.  To use
it, put a line like

	options		NFS_ROOT_OPTIONS="NFSMNT_NOCONN"

in your kernel config.  Note that this affects only mounting root when
booting diskless; it does not apply to other NFS mounts, such as those
coming from the automounter.

*** /sources/supped/netbsd/src/sys/nfs/nfs_vfsops.c	Sun Jul  3 07:05:58 1994
--- /sys/nfs/nfs_vfsops.c	Fri Jul 15 18:26:58 1994
***************
*** 298,303 ****
--- 298,306 ----
  
  	/* Initialize mount args. */
  	bzero((caddr_t) &args, sizeof(args));
+ #ifdef NFS_ROOT_OPTIONS
+ 	args.flags    = NFS_ROOT_OPTIONS;
+ #endif
  	args.addr     = (struct sockaddr *)&ndmntp->ndm_saddr;
  	args.addrlen  = args.addr->sa_len;
  	args.sotype   = SOCK_DGRAM;

I'm not sure that it would even be a good idea to change the default
for all mounts, because then there is no way for user-land to suppress
the default when desired.

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu