From owner-freebsd-net@FreeBSD.ORG Tue Feb 17 01:57:03 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67117F6F for ; Tue, 17 Feb 2015 01:57:03 +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 0CF7A276 for ; Tue, 17 Feb 2015 01:57:02 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2D/BACEn+JU/95baINbg1haBIJ/vzUKhSdKAoFXAQEBAQEBfIQNAQEEAQEBICsgCxsYAgINGQIpAQkmBggHBAEcBIgMDbcRlxsBAQEBAQUBAQEBAQEBARqBIYlrhBwBARs0B4JogUIFijqIVYNBgzc4iQKEfYM+IoICHIFuIDEHgQQ5fwEBAQ X-IronPort-AV: E=Sophos;i="5.09,591,1418101200"; d="scan'208";a="191284162" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 16 Feb 2015 20:56:56 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id D6058B3F31; Mon, 16 Feb 2015 20:56:55 -0500 (EST) Date: Mon, 16 Feb 2015 20:56:55 -0500 (EST) From: Rick Macklem To: Beeblebrox Message-ID: <2127899926.4385980.1424138215864.JavaMail.root@uoguelph.ca> In-Reply-To: <20150217013256.668aa838@rsbsd.rsb> Subject: 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.10] 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: Tue, 17 Feb 2015 01:57:03 -0000 Beeblebrox wrote: > Well, I removed all the BOOTP* items from config and re-built kernel. > > * With FreeBSD's pxeboot everything works normally and root is > mounted as NFSv3. dhcp.conf has option root-path defined. > > * When trying to use Grub, boot stops at the "mountroot>" prompt, > wich was the original problem as far as I recall. The grub.cfg file > already passes these params to the FreeBSD kernel to no avail: > vfs.root.mountfrom="nfs:192.168.2.1:/data/amd64" I believe the syntax for this is: vfs.root.mountfrom=nfs:/data/amd64 but I'm not sure. Here`s the comment from vfs_mountroot.c for this: * The root filesystem is detailed in the kernel environment variable 72 * vfs.root.mountfrom, which is expected to be in the general format 73 * 74 * :[][ :[] ...] 75 * vfsname := the name of a VFS known to the kernel and capable 76 * of being mounted as root 77 * path := disk device name or other data used by the filesystem 78 * to locate its physical store 79 * 80 * If the environment variable vfs.root.mountfrom is a space separated list, 81 * each list element is tried in turn and the root filesystem will be mounted 82 * from the first one that suceeds. 83 * 84 * The environment variable vfs.root.mountfrom.options is a comma delimited 85 * set of string mount options. These mount options must be parseable 86 * by nmount() in the kernel. > boot.nfsroot.server="192.168.2.1" > boot.nfsroot.path="/data/amd64" > These 2 lines cover the information and are used for NFS_ROOT. (I'd just get rid of vfs.root.mountfrom if you are going to use NFS_ROOT.) >From nfs_diskless.c, here is the list of environment variables used by the NFS_ROOT case: * Populate the essential fields in the nfsv3_diskless structure. 147 * 148 * The loader is expected to export the following environment variables: 149 * 150 * boot.netif.name name of boot interface 151 * boot.netif.ip IP address on boot interface 152 * boot.netif.netmask netmask on boot interface 153 * boot.netif.gateway default gateway (optional) 154 * boot.netif.hwaddr hardware address of boot interface 155 * boot.nfsroot.server IP address of root filesystem server 156 * boot.nfsroot.path path of the root filesystem on server 157 * boot.nfsroot.nfshandle NFS handle for root filesystem on server 158 * boot.nfsroot.nfshandlelen and length of this handle (for NFSv3 only) 159 * boot.nfsroot.options NFS options for the root filesystem Alternately, set vfs.root.mountfrom and put all three of these options back in your kernel config. options BOOTP options BOOTP_NFSROOT options BOOTP_NFSV3 <-- this one gets the BOOTP* case to use NFSv3 rick ps: All I do when trying to answer these questions is look in the sources. (To me, that`s what open source is all about.) > -- > 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" >