From owner-freebsd-stable@FreeBSD.ORG Tue Jun 29 06:49:06 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 918DE106566C for ; Tue, 29 Jun 2010 06:49:06 +0000 (UTC) (envelope-from alexs@ulgsm.ru) Received: from mail.ulgsm.ru (skuns.ulgsm.ru [93.93.136.26]) by mx1.freebsd.org (Postfix) with ESMTP id 32ED48FC1A for ; Tue, 29 Jun 2010 06:49:05 +0000 (UTC) Received: from mail.ulgsm.ru (localhost [127.0.0.1]) by mail.ulgsm.ru (Postfix) with ESMTP id 1F5B43BC32 for ; Tue, 29 Jun 2010 10:49:03 +0400 (MSD) X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on skuns.gsm900.net Received: from mail.ulgsm.ru (localhost [127.0.0.1]) by mail.ulgsm.ru (Postfix) with ESMTP id 0121F3BC30 for ; Tue, 29 Jun 2010 10:49:03 +0400 (MSD) Received: from mail.ulgsm.ru (bazar.gsm900.net [192.168.0.160]) by mail.ulgsm.ru (Postfix) with ESMTP id BDE053BC28 for ; Tue, 29 Jun 2010 10:49:02 +0400 (MSD) Date: Tue, 29 Jun 2010 10:49:02 +0400 From: alexs@ulgsm.ru To: freebsd-stable@freebsd.org Message-ID: <20100629064902.GA39446@mail.ulgsm.ru> References: <20100625152027.GA78442@mail.ulgsm.ru> <20100626113418.GA80299@mail.ulgsm.ru> <20100628061601.GA51359@mail.ulgsm.ru> <20100628102703.GA78354@mail.ulgsm.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: diskless boot, nfs server behind router X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 06:49:06 -0000 * Rick Macklem [2010-06-28 20:41:17 -0400]: > > > On Mon, 28 Jun 2010, Daniel Braniss wrote: > > >> > >> > >> On Mon, 28 Jun 2010, alexs@ulgsm.ru wrote: > >> > >>> > >>> > >>> kernel built with: > >>> options BOOTP # Use BOOTP to obtain IP address/hostname > >>> options BOOTP_NFSROOT # NFS mount root file system using BOOTP info > >>> options BOOTP_NFSV3 > >>> > >> Try building a kernel without the above options, but with > >> options NFS_ROOT > >> specified. I think that's what most pxeboot users do and it was what > >> I had assumed when I looked at the code. > >> > >> If that doesn't fix the problem...I haven't got a solution for you, rick > > > > I use: > > options BOOTP_NFSV3 # Use NFS v3 to NFS mount root > > > Looking at the code, it appears that BOOTP_NFSROOT doesn't set mygateway > in the nfs_diskless structure, which would explain why the mount of root > in the kernel doesn't work. > > I think using NFS_ROOT but not the BOOTPxxx options will work around this > or you could test the following patch and see if it helps. (Testing the > patch would be appreciated, since I don't have any way to test across > multiple subnets and it would be nice to have a fix for the BOOTPxxx > cases.) > > rick > --- untested patch for bootp_subr.c --- > --- nfsclient/bootp_subr.c.sav 2010-06-28 19:16:02.000000000 -0400 > +++ nfsclient/bootp_subr.c 2010-06-28 19:21:52.000000000 -0400 > @@ -1524,6 +1524,7 @@ > printf(" "); > ifctx->gotgw = 1; > gctx->gotgw = 1; > + nd->mygateway = ifctx->gw; > } > } Yes. without BOOTPxxx options boot is fine. I tryed your path with BOOTPxxx options, result panic. Trying to mount root from nfs: Panic: nfs_mountroot: RTM_ADD: 17 cpuid=1 Uptime 10s > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" -- alexs