Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix soft-reboot to support secure boot enabled platforms #56

Closed
wants to merge 1 commit into from

Conversation

vivekrnv
Copy link
Owner

What I did

  1. soft-reboot is failing on platforms with Secure boot enabled
root@sn-5400:/home/admin# soft-reboot
kexec unload failed: Permission denied
kexec_load failed: Permission denied
entry       = 0x86eff7760 flags = 0x3e0000
nr_segments = 7
segment[0].buf   = 0x556cb2a1ad30
segment[0].bufsz = 0x70
segment[0].mem   = 0x100000
segment[0].memsz = 0x1000
segment[1].buf   = 0x556cb2a22d70
segment[1].bufsz = 0x168
segment[1].mem   = 0x101000
segment[1].memsz = 0x1000
segment[2].buf   = 0x556cb2a1b320
segment[2].bufsz = 0x30
segment[2].mem   = 0x102000
segment[2].memsz = 0x1000
segment[3].buf   = 0x7f0b3655e010
segment[3].bufsz = 0x1fcf164
segment[3].mem   = 0x868c30000
segment[3].memsz = 0x1fd0000
segment[4].buf   = 0x7f0b38532210
segment[4].bufsz = 0x7b7418
segment[4].mem   = 0x86ac00000
segment[4].memsz = 0x438c000
segment[5].buf   = 0x556cb2a151c0
segment[5].bufsz = 0x4422
segment[5].mem   = 0x86eff2000
segment[5].memsz = 0x5000
segment[6].buf   = 0x556cb2a0df10
segment[6].bufsz = 0x70e0
segment[6].mem   = 0x86eff7000
segment[6].memsz = 0x9000
Watchdog armed for 180 seconds
Nothing has been loaded!
  1. Use mokutil instead of bootctl as bootctl is not installed in Bookworm

How I did it

How to verify it

After fixing the scripts

root@sn5600:/home/admin# soft-reboot
+ SECURE_UPGRADE_ENABLED=1
+ [[ CHECK_SECURE_UPGRADE_ENABLED -ne 0 ]]
+ load_kernel_secure
+ invoke_kexec -s
packet_write_wait: port 22: Broken pipe

admin@sn5600:~$ show reboot-cause
User issued 'soft-reboot' command [User: admin, Time: Tue Jul 23 11:06:43 PM UTC 2024]

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@vivekrnv
Copy link
Owner Author

@davidpil2002 please review

@vivekrnv vivekrnv closed this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant