summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGrant Slater <github@firefishy.com>2025-11-10 14:50:20 +0000
committerGrant Slater <github@firefishy.com>2025-11-10 15:08:07 +0000
commit6631fd47cb313258b869870982f7b3e2f970eaee (patch)
tree32ba8b543ab3a519e3ae40523c24ccbd140235d3 /src
parent25224cff345210aaecaa4db95a67bd759af666fb (diff)
downloadvyos-1x-6631fd47cb313258b869870982f7b3e2f970eaee.tar.gz
vyos-1x-6631fd47cb313258b869870982f7b3e2f970eaee.zip
T8003: Add early kernel panic reboot support
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/system_option.py5
-rwxr-xr-xsrc/op_mode/image_installer.py4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/conf_mode/system_option.py b/src/conf_mode/system_option.py
index a0b3dd72c..80b9f96bd 100755
--- a/src/conf_mode/system_option.py
+++ b/src/conf_mode/system_option.py
@@ -196,6 +196,11 @@ def generate(options):
if 'quiet' in options['kernel']:
cmdline_options.append('quiet')
+ # Early reboot on kernel panic via kernel cmdline
+ # Keep this in sync with image_installer.py:get_cli_kernel_options()
+ if 'reboot_on_panic' in options:
+ cmdline_options.append('panic=60')
+
if 'disable_hpet' in kernel_opts:
cmdline_options.append('hpet=disable')
diff --git a/src/op_mode/image_installer.py b/src/op_mode/image_installer.py
index 93c45b03f..92e649789 100755
--- a/src/op_mode/image_installer.py
+++ b/src/op_mode/image_installer.py
@@ -521,6 +521,10 @@ def get_cli_kernel_options(config_file: str) -> list:
if 'quiet' in kernel_options:
cmdline_options.append('quiet')
+ # Early reboot on kernel panic via kernel cmdline (must match system_option.py)
+ if dict_search('system.option.reboot-on-panic', config_dict) is not None:
+ cmdline_options.append('panic=60')
+
if 'disable-hpet' in kernel_options:
cmdline_options.append('hpet=disable')