Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jan 2013 11:22:48 -0800
From:      Craig Rodrigues <rodrigc@crodrigues.org>
To:        "Eggert, Lars" <lars@netapp.com>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: mounting root from NFS via ROOTDEVNAME
Message-ID:  <CAG=rPVezTjcTp_AXsOMWYCSM1_xFJDvmUwdguHdZBABanGGrxw@mail.gmail.com>
In-Reply-To: <D4D47BCFFE5A004F95D707546AC0D7E91F674CDE@SACEXCMBX01-PRD.hq.netapp.com>
References:  <D4D47BCFFE5A004F95D707546AC0D7E91F671642@SACEXCMBX01-PRD.hq.netapp.com> <CAG=rPVergKVKUO=VySvM65WPJO_Od1tkWvx45tM_sEyO65mwUg@mail.gmail.com> <19F92E0C-F004-4F16-A5FC-A10DF84BDCCF@netapp.com> <D4D47BCFFE5A004F95D707546AC0D7E91F674CDE@SACEXCMBX01-PRD.hq.netapp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 29, 2013 at 1:17 AM, Eggert, Lars <lars@netapp.com> wrote:
>
> On Jan 29, 2013, at 10:13, Lars Eggert <lars@netapp.com>
>  wrote:
> > On Jan 29, 2013, at 9:34, Craig Rodrigues <rodrigc@crodrigues.org>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVezTjcTp_AXsOMWYCSM1_xFJDvmUwdguHdZBABanGGrxw>