Version: rolling (vyos-1x as of 2026-11-18, kernel 6.18.62)
Component: system_option.py (conf_mode)
Summary
At boot, when the kernel options managed by system option (e.g. reboot-on-panic → panic=60) differ from the running kernel command line, apply() reloads the kernel with kexec -l --kexec-file-syscall and systemctl kexec. With kernel lockdown (lockdown=integrity or confidentiality), kexec_file_load refuses the image (Lockdown: kexec: kexec of unsigned images is restricted). The exception aborts system_option.py, the boot config load is marked failed, and no system option setting is applied (not even the defaults).
Steps to reproduce (installed image):
- set system option reboot-on-panic, commit, save. This adds panic=60 to boot_opts in /boot/grub/grub.cfg.d/vyos-versions/<image>.cfg.
- In that file, remove panic=60 from boot_opts and add lockdown=integrity.
- Reboot.
Actual result
kernel: Lockdown: kexec: kexec of unsigned images is restricted; see man kernel_lockdown.7 vyos-configd: File "/usr/libexec/vyos/conf_mode/system_option.py", line 616, in apply vyos-configd: OSError: [Errno 255] failed to run command: kexec -l /boot/vmlinuz --initrd=/boot/initrd.img '--command-line=...'
/tmp/vyos-config-status is 1, show configuration commands | match "system option" is empty, and /proc/sys/kernel/panic is 0.
Without lockdown=, the same boot kexecs into the new command line and the config loads fine.
Cause
kexec_file_load under lockdown needs a kernel signature it can verify. The VyOS kernel has CONFIG_KEXEC_SIG=y but no secondary or platform keyring (CONFIG_INTEGRITY off), so only the build-time module signing key is trusted.
Side effect: generate() has already rewritten boot_opts before apply() fails. It drops non-managed parameters like a hand-added lockdown=, so the problem hits the first boot after an option change, and later boots silently run without lockdown.
Expected result
The boot config load completes. If the kernel can't be reloaded, warn (as already done after boot: "Kernel configuration options have changed … reboot") and continue. GRUB already carries the new options, so the next reboot applies them.
Suggested fix
Catch the failure of the kexec -l call in apply(), emit a Warning, and continue instead of failing the commit. Optionally skip the kexec attempt when /sys/kernel/security/lockdown shows a level other than [none].
Found while working on T9605 (PR vyos/vyos-1x#5660).