Summary: | fsck not checking disk if sysctl kern.boottrace.enabled=1 is set | ||
---|---|---|---|
Product: | Base System | Reporter: | Oleksii Samorukov <samm> |
Component: | conf | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | imp, mhorne |
Priority: | --- | ||
Version: | 14.0-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
Oleksii Samorukov
2024-05-15 05:58:52 UTC
Okay, so the problem is that "$autoboot" is used by the fsck script but not exported, so when the boot trace is running, the script does not work. Without a backtrace, export is not needed as the script is sourced. P.S. Looks like fsck is only rc.d script depending on $autoboot. Not sure if its better to export it or change fsck to no use it... Proposed fix is at https://github.com/freebsd/freebsd-src/pull/1261 So part of the problem is that the boottrace stuff doesn't export any of the variables. What about _boot or rc_fast? It looks like rc_fast is reconstructed whenver _boot is fast* in rc.subr and only set when _boot has been set to 'faststart'. The fix is a bit of a hack. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f13275cf03ae3ce220efb7a323f73290276a731f commit f13275cf03ae3ce220efb7a323f73290276a731f Author: Alex Samorukov <samm@freebsd.org> AuthorDate: 2024-05-28 14:45:30 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-29 19:29:53 +0000 export $autoboot var when running from $boottrace_cmd At the moment, if bootrace profiling is enabled, autoboot is not exported to the rc scripts. This causes fsck to not check the root filesystem. To fix this, pass _boot, rc_fast and autoboot to the boottrace process to mimic what diretly sourcing the rc.d scripts. PR: 278993 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1261 libexec/rc/rc.subr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) |