From owner-freebsd-current@FreeBSD.ORG Wed Jan 30 09:32:27 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6C0E91A9 for ; Wed, 30 Jan 2013 09:32:27 +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 4DA4DA2F for ; Wed, 30 Jan 2013 09:32:26 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.84,566,1355126400"; d="scan'208";a="14041674" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx12-out.netapp.com with ESMTP; 30 Jan 2013 01:32:26 -0800 Received: from vmwexceht01-prd.hq.netapp.com (vmwexceht01-prd.hq.netapp.com [10.106.76.239]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id r0U9WQAF021140; Wed, 30 Jan 2013 01:32:26 -0800 (PST) Received: from SACEXCMBX01-PRD.hq.netapp.com ([169.254.2.54]) by vmwexceht01-prd.hq.netapp.com ([10.106.76.239]) with mapi id 14.02.0328.009; Wed, 30 Jan 2013 01:32:25 -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/WoQ3bLz4fhIpUOOqbDPPwYM3JhhN1MAgADtYYA= Date: Wed, 30 Jan 2013 09:32:25 +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: <5EF283655378804F86C58C3F6E4CA976@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: Wed, 30 Jan 2013 09:32:27 -0000 Hi, On Jan 29, 2013, at 20:22, Craig Rodrigues wrote: > What kind of architecture are you trying to do this on? Is this > i386/amd64 or something else? amd64 > I am not familiar with netboot compared to > PXE. Is TFTP involved at all with netboot? TFTP is not involved. The kernel gets booted by our custom loader (over HTT= P) and the root FS is supposed to be mounted over NFS. > What does your dhcpd configuration file look like? Completely standard, with the addition of a "root-path" option. (Which I wo= uld like to get rid of by setting ROOTDEVNAME in the kernel.) > Also, are you using the FreeBSD loader, or something else? What kinds of > customizations have you done on the loader? Custom loader.=20 > If through your setup you have already managed to load the kernel over > the network, then a lot of the hard work has been done. Telling the kern= el > where the root file system is located becomes the next tricky part. Right, that's the step I am struggeling with.=20 > In src/sys/boot/common/boot.c which is part of the loader (not the kernel= ), > if you look in the getrootmount() function, > you will see that the loader will try to figure out where the root file > system > is by parsing /etc/fstab, and looking for the "/" mount. >=20 > So, if your kernel is located in: >=20 > /usr/home/elars/dst/boot/kernel/kernel >=20 > Then create a file /usr/home/elars/dst/etc/fstab file with something like= : >=20 > # Device Mountpoint FSType > Options Dump Pass > 10.11.12.13:/usr/home/elars/dst/ / nfs ro 0 = 0 Thanks, will try that! > Alternatively, if you don't want to create an /etc/fstab file, then > you could put something like this in your loader.conf file: >=20 > vfs.root.mountfrom=3Dnfs:10.11.12.13:/usr/home/elars/dst Will try that too, but not sure if this works with our custom loader. Lars >=20 > If you can get this to work without introducing new kernel options, > that would be ideal, because the kernel options you are > enabling are triggering behaviors. >=20 > -- > Craig Rodrigues > rodrigc@crodrigues.org