Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Feb 2010 11:06:47 +0100
From:      Erik Norgaard <norgaard@locolomo.org>
To:        questions@freebsd.org
Subject:   specifying nfs root in loader.conf with vfs.root.mountfrom
Message-ID:  <4B6BEDB7.4060703@locolomo.org>

next in thread | raw e-mail | index | archive | help
Hi:

OK, I know I'm not doing this the easy way, don't try to convince me 
about other ways :)

I'm doing PXE boot diskless, fetching the GENERIC kernel with TFTP.

Problem is that since the kernel is fetched with tftp, there is no nfs 
root file system mounted when kernel finish loading.

There are, as I see two solutions to this: Compile the kernel with BOOTP 
and BOOTP_COMPAT options to allow the kernel o rerequest root-path 
option set with dhcp.

Or, configure the root path in loader.conf: (from defaults/loader.conf)

#vfs.root.mountfrom=""          # Specify root partition in a way the
                                 # kernel understands

So, I set in my diskless loader.conf:

vfs.root.mountfrom="nfs:192.168.0.1:/var/diskless/FreeBSD"

Booting up I get:

nfs_diskless: no NFS handle
Trying to mount root from nfs:192.168.0.1:/var/diskless/FreeBSD
nfs_diskless: no NFS handle
ROOT MOUNT ERROR:
If you have invalid mount options, reboot, and first try to the 
following from the loader prompt:

      set vfs.root.mountfrom.options=rw

and then remove invalid options from /etc/fstab
...

Question: How do I specify an nfs share as root path with 
vfs.root.mountfrom?

Thanks, Erik
-- 
Erik Nørgaard
Ph: +34.666334818/+34.915211157                  http://www.locolomo.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B6BEDB7.4060703>