reboot(8) is buggy on a Dell laptop and a GMKtec Nucbox while `shutdown -r` works. While trying to debug this I came across this issue: reboot(8), halt(8), etc. all call openlog(3) with LOG_CONS OR'd into the facility argument instead of logopt. shutdown(8) and init(8) both use the correct form: openlog("shutdown", LOG_CONS, LOG_AUTH);
Fix: https://github.com/freebsd/freebsd-src/pull/2300
Unrelated to this specific bug but: > reboot(8) is buggy on a Dell laptop and a GMKtec Nucbox while `shutdown -r` works. I forgot to mention that this happens only on 15-STABLE. I compiled the version from 16-CURRENT and it works. This commit should have been MFC'ed to 15-STABLE months ago: https://github.com/freebsd/freebsd-src/commit/4453ec5b8716bc465ff5192986099dc75d1f2ce7
^Triage: Cc: original committer.
If by “buggy” you mean “does not behave like its GNU counterpart” then allow me to point out that ours predates yours by at least a decade. We've reluctantly changed ours because the world has become accustomed to your buggy copy, but we will not merge that change to a stable branch.
(In reply to Dag-Erling Smørgrav from comment #4) > If by “buggy” you mean “does not behave like its GNU counterpart” then allow me to point out that ours predates yours by at least a decade. We've reluctantly changed ours because the world has become accustomed to your buggy copy WDYM by "ours" & "yours"? Please don't pay attention to any part of the string after the "@" in my e-mail. I speak only for myself. I like *BSD as much as Linux. By "buggy" I mean that it hangs and never finishes the reboot. > but we will not merge that change to a stable branch. What's wrong with that? Why keep it in the -CURRENT branch then?
(In reply to Ricardo Branco from comment #5) > By "buggy" I mean that it hangs and never finishes the reboot. And how exactly was I supposed to deduce that from your report? Please read this: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html
(In reply to Dag-Erling Smørgrav from comment #6) > And how exactly was I supposed to deduce that from your report? By reading it in full before jumping to wild "us vs. them" claims. That part was vague because I didn't know what was happening yet, but then I found out and added a new comment which is #2. But anyway, this is irrelevant now. Why do you think it shouldn't be MFC'ed to -STABLE?
(In reply to Ricardo Branco from comment #7) > I didn't know what was happening yet, but then I found out and added a new comment which is #2. There is no useful information in comment #2. It comes across as “I think reboot should do what shutdown -r does”. If reboot(8) is failing to behave the way it is documented to behave, please file a separate ticket with something more substantial than “it doesn't work”. Preferably _after_ you've read the article I linked to. > Why do you think it shouldn't be MFC'ed to -STABLE? We try not to break compatibility on stable branches.
(In reply to Dag-Erling Smørgrav from comment #8) Then what does this mean? MFC after: 1 month https://github.com/freebsd/freebsd-src/commit/4453ec5b8716bc465ff5192986099dc75d1f2ce7 dag-erling committed on Dec 10, 2025
(In reply to Ricardo Branco from comment #9) It means I originally intended to MFC but was persuaded not to. Can we please stay on topic?
(In reply to Dag-Erling Smørgrav from comment #10) I had to ask. How was I supposed to know the answer to that question? And there's no topic now. I found 2 issues and submitted the fix for one and found that the other is already fixed in -CURRENT. I didn't ask for a BSD vs GNU flame war. I'm too old for that even in my mid 40s.
(In reply to Ricardo Branco from comment #11) > I found 2 issues and submitted the fix for one and found that the other is already fixed in -CURRENT. No, it is not. Please file another ticket describing in detail what happens when you try to reboot your FreeBSD 15 machine with its original reboot(8) command.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f723b28c9663b70045e6db07f9fe72422a609c16 commit f723b28c9663b70045e6db07f9fe72422a609c16 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2026-06-27 10:04:48 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2026-07-08 05:16:01 +0000 reboot: fix openlog(3) calls LOG_CONS was OR'd into the facility argument instead of logopt, leaving logopt as 0. The correct call is openlog(ident, LOG_CONS, LOG_AUTH), as shutdown(8) and init(8) already do. PR: 296315 Signed-off-by: Ricardo Branco <rbranco@suse.de> Reviewed by: imp, des Pull Request: https://github.com/freebsd/freebsd-src/pull/2300 sbin/reboot/reboot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)