I'm using an aarch64 environment as the example context for this note.

I have instances of the various PkgBase kernels and one or more
personal kernel builds. Currently:

# ls -Tlod /boot/kernel*/nfsd*
-r--r--r--  1 root wheel - 401600 Mar 17 18:45:35 2024 
/boot/kernel.CA76-NODBG.good/nfsd.ko
-r--r--r--  1 root wheel - 401600 Mar 17 18:45:35 2024 
/boot/kernel.CA76-NODBG/nfsd.ko
-r--r--r--  1 root wheel - 388624 Mar 15 19:18:47 2024 
/boot/kernel.GENERIC-DEBUG.good/nfsd.ko
-r--r--r--  1 root wheel - 388624 Mar 15 19:18:47 2024 
/boot/kernel.GENERIC-MMCCAM/nfsd.ko
-r--r--r--  1 root wheel - 425968 Mar 15 19:18:47 2024 
/boot/kernel.GENERIC-NODEBUG.good/nfsd.ko
-r--r--r--  1 root wheel - 425968 Mar 15 19:18:47 2024 
/boot/kernel.GENERIC-NODEBUG/nfsd.ko
-r--r--r--  1 root wheel - 388624 Mar 15 19:18:47 2024 /boot/kernel/nfsd.ko

The kernel.CA76-*/ ones are my tailored builds. The others are
from PkgBase. (amd64 also has a PkgBase kernel.MINIMAL/ .)

I originally used loader.conf lines like the following
to control what loaded by default:

#kernel="kernel"
#kernel="kernel.GENERIC-DEBUG.good"
kernel="kernel.GENERIC-NODEBUG"
#kernel="kernel.GENERIC-NODEBUG.good"
#kernel="kernel.GENERIC-MMCCAM"
#
#kernel="kernel.CA76-DBG"
#kernel="kernel.CA76-NODBG"

However, I found that the /etc/rc.conf lines like:

rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_flags="-r"
nfs_client_enable="YES"

did not cause nfsd to load (for example). I worked
around this by also having an assignment to
kern.module_path :

#kernel="kernel.GENERIC-DEBUG.good"
#kern.module_path="/boot/kernel.GENERIC-DEBUG.good"
kernel="kernel.GENERIC-NODEBUG"
kern.module_path="/boot/kernel.GENERIC-NODEBUG"
#kernel="kernel.GENERIC-NODEBUG.good"
#kern.module_path="/boot/kernel.GENERIC-NODEBUG.good"
#kernel="kernel.GENERIC-MMCCAM"
#kern.module_path="/boot/kernel.GENERIC-MMCCAM"
#
#kernel="kernel.CA76-DBG"
#kern.module_path="/boot/kernel.CA76-DBG"
#kernel="kernel.CA76-NODBG"
#kern.module_path="/boot/kernel.CA76-NODBG"

(That suggests that kern.module_path did not automatically
track the kernel= assignment.)

That worked for loading the loader.conf specified default
kernel and the matching nfsd . But, if, in the loader menu,
I pick a different kernel, the problem returns, likely from
still trying the kern.module_path from the loader.conf (?).

Note: My keeping a little library of kernels around is new.
I've no history to know how long the behavior that I've seen
has been this way.

Is there a way for it to automatically use the likes of the
nfsd.ko from the same directory as the kernel in all cases,
where I pick the default kernel place via loader.conf ? Do
I need to do more manual steps in the loader, not just use
the menu selections to override the defaults for this
sufficiently to have the likes of the matching nfsd.ko load?


===
Mark Millard
marklmi at yahoo.com


Reply via email to