specifying nfs root in loader.conf with vfs.root.mountfrom

Erik Norgaard norgaard at locolomo.org
Fri Feb 5 10:14:02 UTC 2010


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:


Booting up I get:

nfs_diskless: no NFS handle
Trying to mount root from nfs:
nfs_diskless: no NFS handle
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 

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

More information about the freebsd-questions mailing list