Page MenuHomeFreeBSD

Chain-loading loader or re-loading loader.conf
AcceptedPublic

Authored by bz on Mar 2 2016, 3:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 1 2024, 8:41 PM
Unknown Object (File)
Nov 9 2023, 4:25 AM
Unknown Object (File)
Oct 8 2023, 3:22 AM
Unknown Object (File)
Sep 13 2023, 3:37 PM
Unknown Object (File)
Jul 6 2023, 6:46 AM
Unknown Object (File)
May 30 2023, 4:07 AM
Unknown Object (File)
Apr 8 2023, 9:07 PM
Unknown Object (File)
Apr 5 2023, 10:40 AM
Subscribers

Details

Reviewers
jhb
jonathan
Summary

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 ...

Test Plan

Been in use for 1-2 years.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bz retitled this revision from to Chain-loading loader or re-loading loader.conf.
bz updated this object.
bz edited the test plan for this revision. (Show Details)
bz added reviewers: jonathan, jhb.
bz set the repository for this revision to rS FreeBSD src repository - subversion.
jonathan edited edge metadata.

So, I can't not approve... :)

sys/boot/common/boot.c
204

Do you mean "/boot/loader.conf"?

This revision is now accepted and ready to land.May 14 2016, 3:43 PM