https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293654
Bug ID: 293654
Summary: boot loader kernels_autodetect no longer follows
symlinks after 14.4-RELEASE
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
While d04415c520b03 fixed PR 292232, the code in core.kernelList() was testing
for directories in a way that prevented symlinks from being followed. This
prevents a kernel symlink from being considered "bootable" which results in a
random kernel not named "kernel" being booted. (Random because the list of
potentially bootable kernels is in unsorted/filesystem order.)
This means when I attempt to boot kernel/kernel.LBL in the above example, I get
kernel.GENERIC instead.
core.kernelList() has two checks to see if a candidate file is a "directory",
first is the ftype returned by lfs.dir() (which doesn't follow symlinks) and
the other is via lfs.attributes() (which does follow symlinks):
for file, ftype in lfs.dir("/boot") do
local fname = "/boot/" .. file
if file == "." or file == ".." then
goto continue
end
if ftype then
if ftype ~= lfs.DT_DIR then
goto continue
end
elseif lfs.attributes(fname, "mode") ~= "directory" then
goto continue
end
The fix is to remove the first check. Here's a differential that solves this by
my testing:
https://reviews.freebsd.org/D55713
--
You are receiving this mail because:
You are the assignee for the bug.