Page MenuHomeFreeBSD

loader.8: Document module commands
Needs ReviewPublic

Authored by ziaee on Jun 6 2025, 5:47 PM.
Tags
None
Referenced Files
F131763956: D50727.id163873.diff
Fri, Oct 10, 11:43 PM
F131755849: D50727.id163873.diff
Fri, Oct 10, 10:15 PM
F131718573: D50727.id163873.diff
Fri, Oct 10, 2:57 PM
Unknown Object (File)
Tue, Oct 7, 5:39 AM
Unknown Object (File)
Sun, Oct 5, 10:51 PM
Unknown Object (File)
Sun, Oct 5, 10:49 PM
Unknown Object (File)
Fri, Sep 26, 1:02 AM
Unknown Object (File)
Thu, Sep 25, 11:21 PM

Details

Reviewers
carlavilla
mhorne
ivy
manu
Group Reviewers
manpages
Loader
Summary

Begin documenting module loader commands in loader(8), where the reader would look for them. Segregate them by their availability in individual loader implementations, like build(7) targets. These details were graciously donated by kevans.

MFC after: 3 days
Co-authored-by: Kyle Evans <kevans@freebsd.org>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67672
Build 64555: arc lint + arc unit

Event Timeline

ziaee requested review of this revision.Jun 6 2025, 5:47 PM

I think this one is even more misplaced than the others because it's not available in the simp flavor at all. There are also other module commands that might be good to document: toggle-module, enable-module at least

ziaee retitled this revision from loader_simp.8: Document disable-module to loader.8: Document module commands.Jun 11 2025, 10:16 PM

Attempt documenting all of them together in loader.8.

Let's also talk about these ones, similarly constrained in availability:

  • boot-conf: loads the loader config and commence the autoboot sequence
  • read-conf $file: load the specified configuration file
  • reload-conf: reload configuration (as if we had just entered loader)

One more module option one:

  • show-module-options: describe all of the modules that loader is currently aware of and whether they are enabled or not

Device option specfic to lua:

  • disable-device $device: sets a newbus hint to disable the device; e.g., disable-device pci0 will set hint.pci.0.disabled=1)
stand/man/loader.8
92
pauamma_gundo.com added inline comments.
stand/man/loader.8
97

Alternatively, split it into one explanation per command.

if ok, co-authored-by: kevans? i dont want to steal the credit

stand/man/loader.8
109

Does this undo all the enable/disable/toggle-module commands, etc?
Is that what 'as if freshly entering the loader' means.
Also 'entering loader' -> 'entering the loader' no?

stand/man/loader.8
109

Does this undo all the enable/disable/toggle-module commands, etc?

That's my understanding but I don't actually know.

Also 'entering loader' -> 'entering the loader' no?

Yes.

Do I need to do anything else here?

stand/man/loader.8
109

It wipes out any module commands and reverts the environment as best as it can to a pre-loader state. It doesn't enumerate all env vars, but if a loader.conf sets a var foo, we recorded the state of foo and restore that value upon reload. So if you manually set another var, bar, that wasn't in any loader.conf: that stays, but if you overwrote the aforementioned foo and loader.conf had set it, that'll get lost.

stand/man/loader.8
109

So you're saying it only undoes the application of loader.conf?

stand/man/loader.8
109

It's not so black and white since it undoes *some* command-line actions but not others, but that's the general goal.

incorporate kevans suggestion from IRC

ziaee edited the summary of this revision. (Show Details)