[Bug 292232] loader: kernels_autodetect fails on initial load

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 07 Jan 2026 02:20:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292232

--- Comment #1 from Kyle Evans <kevans@freebsd.org> ---
Wild ass guess, the oversight is probably this (not even remotely tested)

diff --git a/stand/lua/core.lua b/stand/lua/core.lua
index ad417e5f97e5..a006a3d5da26 100644
--- a/stand/lua/core.lua
+++ b/stand/lua/core.lua
@@ -289,6 +289,8 @@ function core.kernelList()
                                kernels[n] = kernels[n + 1]
                        end
                end
+
+               loader.setenv("kernel", kernels[1])
        end

        core.cached_kernels = kernels

-- 
You are receiving this mail because:
You are the assignee for the bug.