From owner-freebsd-net@FreeBSD.ORG Mon Feb 16 01:08:40 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ED01696 for ; Mon, 16 Feb 2015 01:08:40 +0000 (UTC) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 14D7EFA7 for ; Mon, 16 Feb 2015 01:08:39 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DWBABxQuFU/95baINcg1haBIJ/vy8KhSdKAoFYAQEBAQEBfIQMAQEBAwEBAQEgBCcgCwUuAgINGQIpAQkmBggHBAEaAgSIBAgNtgOWNwEBAQEBAQQBAQEBAQEBARqBIY4HAQEbNAeCaIFCBYo6iFWDQYNviQKIOyKEDCAxB4EEOX8BAQE X-IronPort-AV: E=Sophos;i="5.09,584,1418101200"; d="scan'208";a="191005533" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 15 Feb 2015 20:08:33 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 3192AB3F35; Sun, 15 Feb 2015 20:08:33 -0500 (EST) Date: Sun, 15 Feb 2015 20:08:33 -0500 (EST) From: Rick Macklem To: Beeblebrox Message-ID: <553358175.3932227.1424048913197.JavaMail.root@uoguelph.ca> In-Reply-To: <20150215174056.34912959@rsbsd.rsb> Subject: more re: NFS and diskless: some questions re nfs_diskless.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.95.12] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 01:08:40 -0000 Beeblebrox wrote: > I have several questions on implementing the features in > nfs_diskless.c. Understanding these parameters are necessary to get > a decent menu-driven (grub2) boot process working for clients. > > 1. for diskless clients get mounted as V2 instead of V3. I > have defined { boot.nfsroot.options="nfsv3" }, but has no effect. > Does the kernel need (options BOOTP_NFSV3)? If you are using the BOOTP + BOOTP_NFSROOT case then, yes, you also need "options BOOTP_NFSV3" to get it to use NFSv3 instead of NFSv2. The environment variables (except vfs.root.mountfrom, see below) are ignored for the BOOTP + BOOTP_NFSROOT case. > Considering that > nfs_diskless.c routine checks "get handle size. If this succeeds, > it's an NFSv3 setup" and {nd3->root_fhsize = len; is_nfsv3 = 1;} > might there be easier solution? This executes for the "options NFSROOT" case, not the BOOTP + BOOTP_NFSROOT one. > > 2. My DHCP server has {option root-path} defined and correctly mounts > the NFS root. However, I would like to offer amd64/i386 choice from > menu, which requires different root-path. I therefore plan to remove > {option root-path} from dhcp.conf and pass nfsroot parameter in the > boot menu using params ( boot.nfsroot.server="192.168.2.1" \ > boot.nfsroot.path="/data/amd64" ) > Yet when I do that, the kernel is booted, NIC goes up but: > re0 link state changed to UP > Received DHCP Ack packet on re0 from 192.168.2.1 (accepted) > DHCP/BOOTP timeout for server 255.255.255.255 > The client is on 192.168.2.0/26 (broadcast is 192.168.2.63), Kernel > has (options BOOTP/ options BOOTP_NFSROOT). Is there a solution to > this? > Oh, if the only thing you want to override is the root fs, I think you can set this environment variable (look at bootpc_init() in sys/nfs/bootp_subr.c) if you are using the BOOTP + BOOTP_NFSROOT case. vfs.root.mountfrom rick > Regards. > -- > FreeBSD_amd64_11-Current_RadeonKMS > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to > "freebsd-net-unsubscribe@freebsd.org" >