Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jun 2011 10:54:03 +0200
From:      Grzegorz Bernacki <gber@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        rmacklem@FreeBSD.org
Subject:   NFS/BOOTP problem
Message-ID:  <4E0996AB.9000802@freebsd.org>

next in thread | raw e-mail | index | archive | help
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
@@ -44,6 +44,7 @@
  __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>
@@ -1699,6 +1700,9 @@ 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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E0996AB.9000802>