NFS/BOOTP problem

Grzegorz Bernacki gber at
Tue Jun 28 09:10:06 UTC 2011


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?


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:";
+       rootdevnames[1] = "oldnfs:";
         mountopts(&nd->root_args, NULL);

         for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next)

More information about the freebsd-current mailing list