NFS/BOOTP problem

From: Grzegorz Bernacki <gber_at_freebsd.org>
Date: Tue, 28 Jun 2011 10:54:03 +0200
Hi,

After rebasing to new -current I experienced problem with mounting root 
via NFS. I was getting error: "Mounting from nfs: failed with error 2: 
unknown file system.". I use BOOTP and NFSv3 (option NFSCLIENT). It 
seems that bootp set fs type to 'nfs' and recently NFSv3 was renamed to 
'oldnfs'. Patch below fixes the problem. Do you think it is proper 
solution? Could it be fixed some other better way?

thanks,
grzesiek

diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c
index 49dbc34..a47092d 100644
--- a/sys/nfs/bootp_subr.c
+++ b/sys/nfs/bootp_subr.c
_at__at_ -44,6 +44,7 _at__at_
  __FBSDID("$FreeBSD: src/sys/nfs/bootp_subr.c,v 1.31 2011/04/25 
22:22:51 rmackle

  #include "opt_bootp.h"
+#include "opt_nfs.h"

  #include <sys/param.h>
  #include <sys/systm.h>
_at__at_ -1699,6 +1700,9 _at__at_ bootpc_init(void)
         }

         rootdevnames[0] = "nfs:";
+#ifdef NFSCLIENT
+       rootdevnames[1] = "oldnfs:";
+#endif
         mountopts(&nd->root_args, NULL);

         for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next)
Received on Tue Jun 28 2011 - 07:10:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:15 UTC