From owner-freebsd-current@FreeBSD.ORG Tue Jan 29 19:22:54 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 EEBBD4FE for ; Tue, 29 Jan 2013 19:22:54 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-oa0-f49.google.com (mail-oa0-f49.google.com [209.85.219.49]) by mx1.freebsd.org (Postfix) with ESMTP id A192E15C for ; Tue, 29 Jan 2013 19:22:54 +0000 (UTC) Received: by mail-oa0-f49.google.com with SMTP id j6so846895oag.36 for ; Tue, 29 Jan 2013 11:22:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=mLnsmp9ZwooXgMGuYlNeN0ujLAB7GmWBecAyNv8TozI=; b=X1PKhpjeUcwcpTmg6IP+m+z2A1d/4WLcs1ng7uyo71J1QPpmozSfVrmTM5TLR03Rng Dk9qxGfjJM85MVMlwY+1o8ovw7/36bT9VxzgWR5gnazicCa4ezgREUzW8d1RAVxEhQO7 a3Fll+VPf2JHUh7Njud1esKVdXidGGybPLsRno4ECfullwmL2m2WbZY7zycMbCLB++n9 UWKAy1EAtEOfAcUBTi22MFfv9NexrtyDGd6KfY6jPGKhSw3XDTMKpl9/c7V46nAM1qIR +ETc91ateSO0YNZtZA8fjxlIKHgLNKOElErHKyvA3iew5kXgChZ7x1kG6uFwKLYHTne1 9O4Q== MIME-Version: 1.0 X-Received: by 10.60.170.242 with SMTP id ap18mr1613896oec.97.1359487368216; Tue, 29 Jan 2013 11:22:48 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.60.172.225 with HTTP; Tue, 29 Jan 2013 11:22:48 -0800 (PST) In-Reply-To: References: <19F92E0C-F004-4F16-A5FC-A10DF84BDCCF@netapp.com> Date: Tue, 29 Jan 2013 11:22:48 -0800 X-Google-Sender-Auth: 0VE8J7N2axDyAFKxiReI_jO9DJw Message-ID: Subject: Re: mounting root from NFS via ROOTDEVNAME From: Craig Rodrigues To: "Eggert, Lars" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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: Tue, 29 Jan 2013 19:22:55 -0000 On Tue, Jan 29, 2013 at 1:17 AM, Eggert, Lars wrote: > > On Jan 29, 2013, at 10:13, Lars Eggert > wrote: > > On Jan 29, 2013, at 9:34, Craig Rodrigues wrote: > > I had read both before, and they're very useful documents. Unfortunately, they don't fully apply to my case, since I'm not PXE-booting the system; it netboots the kernel from a custom loader. So once the kernel bootstraps, I need it to obtain an IP address and then NFS-mount root. > Hi, What kind of architecture are you trying to do this on? Is this i386/amd64 or something else? I am not familiar with netboot compared to PXE. Is TFTP involved at all with netboot? What does your dhcpd configuration file look like? Also, are you using the FreeBSD loader, or something else? What kinds of customizations have you done on the loader? 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 kernel where the root file system is located becomes the next tricky part. 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. So, if your kernel is located in: /usr/home/elars/dst/boot/kernel/kernel Then create a file /usr/home/elars/dst/etc/fstab file with something like: # Device Mountpoint FSType Options Dump Pass 10.11.12.13:/usr/home/elars/dst/ / nfs ro 0 0 Alternatively, if you don't want to create an /etc/fstab file, then you could put something like this in your loader.conf file: vfs.root.mountfrom=nfs:10.11.12.13:/usr/home/elars/dst 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. -- Craig Rodrigues rodrigc@crodrigues.org