Bug 257209

Summary: Typing ? at a loader prompt does not show the commands from loader.4th
Product: Base System Reporter: Ceri Davies <ceri>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: emaste, grahamperrin, kevans
Priority: ---    
Version: CURRENT   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Boot menu from a virtualbox 14-CURRENT snapshot
none
First page of ? output
none
Second and final page of ? output none

Description Ceri Davies freebsd_committer freebsd_triage 2021-07-15 15:08:10 UTC
Created attachment 226486 [details]
Boot menu from a virtualbox 14-CURRENT snapshot

disable-module is a very useful loader command if you are trying to get certain things to work (in my case, loading nvidia.ko from loader.conf makes the machine unbootable), but it does not appear if you type ? at a loader prompt.

stand/forth/loader.4th suggests that it (and other useful commands) ought to:

: .? 2 spaces 2swap 15 #type 2 spaces type cr ;

\ Execute the ? command to print all the commands defined in
\ C, then list the ones we support here. Please note that this
\ doesn't use pager_* routines that the C implementation of ?
\ does, so these will always appear, even if you stop early
\ there. And they may cause the commands to scroll off the
\ screen if the number of commands modulus LINES is close
\ to LINEs....
: ?
  ['] ? execute
  s" boot-conf" s" load kernel and modules, then autoboot" .?
  s" read-conf" s" read a configuration file" .?
  s" enable-module" s" enable loading of a module" .?
  s" disable-module" s" disable loading of a module" .?
  s" toggle-module" s" toggle loading of a module" .?
  s" show-module" s" show module load data" .?
  s" try-include" s" try to load/interpret files" .?
;

See the screenshots for evidence of it not working, but while this is a vbox installation I have the same issue on a physical amd64 machine.
Comment 1 Ceri Davies freebsd_committer freebsd_triage 2021-07-15 15:08:44 UTC
Created attachment 226487 [details]
First page of ? output
Comment 2 Ceri Davies freebsd_committer freebsd_triage 2021-07-15 15:09:12 UTC
Created attachment 226488 [details]
Second and final page of ? output
Comment 3 Ed Maste freebsd_committer freebsd_triage 2021-07-26 00:27:03 UTC
Indeed - by default the lua support is now used, everything under forth/* is not. It looks like we need to implement/extend lua loader help support.
Comment 4 Ceri Davies freebsd_committer freebsd_triage 2021-07-26 07:13:21 UTC
The commands do work though (at least disable-module) does.