Jonathan Anderson (aka jra40) once wrote:
The kernel knows how to access its root filesystem over NFS, but it doesn't speak the mount protocol: it relies on the NFS server and file handle opened by the loader. In our setup, however, that handle is incorrect: it refers to the boot filesystem rather than the root filesystem. I have patched FreeBSD's pxeboot to "pivot" from the boot filesystem to whatever value of vfs.root.mountfrom is set in boot/loader.conf; we hope to get this change upstreamed soon, but probably not in time for FreeBSD 10.0. Hopefully in 10.1/9.3 we won't need this custom boot loader any more!
Bjoern (bz) added:
jra40's patch with two hacks on top:
(1) a kernel_other_nfs variable which will make us call
announce_boot_intent() earlier to allow us to also load the kernel from the new location.
(2) if (1) is applied also re-load config file(s) allowing us
to only have a bootstrapping jump-configuraiton on the original NFS and the real one at the new location. This is something I needed for automated benchmarks which cannot alter loader.conf, e.g., for changing kernel names, on the original NFS from the test machine. This might be leaky?
What I'd ideally love to have is a "mini-pxeboot" that does
nothing but bootstrap-jump-kick-start the real one from the
new location terminating itself. That may be a lot cleaner
to implement and remove all the other worries. However if it
would be the same pxeboot, that would indeed be nice as well.
Discuss!
Putting this out so that it doesn't get lost ...