From owner-freebsd-current@FreeBSD.ORG Thu Jan 31 11:27:38 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9A3A96AD for ; Thu, 31 Jan 2013 11:27:38 +0000 (UTC) (envelope-from lars@netapp.com) Received: from mx12.netapp.com (mx12.netapp.com [216.240.18.77]) by mx1.freebsd.org (Postfix) with ESMTP id 74A39D63 for ; Thu, 31 Jan 2013 11:27:38 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.84,575,1355126400"; d="scan'208";a="14654774" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx12-out.netapp.com with ESMTP; 31 Jan 2013 03:27:37 -0800 Received: from vmwexceht05-prd.hq.netapp.com (vmwexceht05-prd.hq.netapp.com [10.106.77.35]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id r0VBRbEa014013; Thu, 31 Jan 2013 03:27:37 -0800 (PST) Received: from SACEXCMBX01-PRD.hq.netapp.com ([169.254.2.54]) by vmwexceht05-prd.hq.netapp.com ([10.106.77.35]) with mapi id 14.02.0328.009; Thu, 31 Jan 2013 03:27:36 -0800 From: "Eggert, Lars" To: Craig Rodrigues Subject: Re: mounting root from NFS via ROOTDEVNAME Thread-Topic: mounting root from NFS via ROOTDEVNAME Thread-Index: AQHN/WoQ3bLz4fhIpUOOqbDPPwYM3JhhN1MAgADtYYCAAMxdgIAA5iiA Date: Thu, 31 Jan 2013 11:27:36 +0000 Message-ID: References: <19F92E0C-F004-4F16-A5FC-A10DF84BDCCF@netapp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.106.53.51] Content-Type: text/plain; charset="iso-8859-1" Content-ID: <5F5F1DCAE6CC3C46B543F06F365BA3A7@tahoe.netapp.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "freebsd-current@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2013 11:27:38 -0000 Hi, On Jan 30, 2013, at 22:43, Craig Rodrigues wrote: > What you need to do is, before the FreeBSD kernel boots, your > loader needs to export some environment variables. This will trigger > the various behaviors in the FreeBSD mount code. the loader can export some environment variables (this is how I get the ser= ial console working.) > So as I suggested before, you should continue with: >=20 > (1) Have /usr/home/elars/dst/etc/fstab with: > # Options Dump Pass > 10.11.12.13:/usr/home/elars/dst/ / nfs ro 0 = 0 Done. > (2) From your loader, you need to export this environment variable, so > that the kernel can get it with getenv(). You need at least: >=20 > vfs.root.mountfrom=3Dnfs:10.11.12.13:/usr/home/elars/dst Done. > Now, there are some other environment variables you need to export from t= he > loader. =20 >=20 > boot.netif.ip > boot.netif.netmask > boot.netif.gateway > boot.nfsroot.server > boot.nfsroot.path Done. I also ripped out all the BOOTP* options from the kernel. However, this still fails: Trying to mount root from nfs:10.11.12.13:/usr/home/elars/dst []... mountroot: waiting for device 10.11.12.13:/usr/home/elars/dst ... Mounting from nfs:10.11.12.13:/usr/home/elars/dst failed with error 19. Loader variables: vfs.root.mountfrom=3Dnfs:10.11.12.13:/usr/home/elars/dst Manual root filesystem specification: : [options] Mount using filesystem and with the specified (optional) option list. eg. ufs:/dev/da0s1a zfs:tank cd9660:/dev/acd0 ro (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /) ? List valid disk boot devices . Yield 1 second (for background tasks) Abort manual input mountroot>=20 I did a tcpdump and no traffic shows up on the correct interface (em4). I g= uess I need to set yet another loader environment variable to indicate whic= h interface I'd like to use. Looking at the source, I only see boot.netif.n= ame, but setting that to em4 doesn't help either. Any further ideas? Thanks, Lars=