Open jk-ozlabs opened 7 years ago
Initially, I think we could create a convention of a specific binary for kexec & kexec-lite to call when it wants to start a graceful shutdown & kexec. The system would provide that binary to do the right thing for that userspace.
And we'd fall-back to shutdown -r now
, of course.
I just use -f
?
@mpe: we still want a graceful shutdown of userspace, which -f
prevents. In that case, (for example) you'll still have DHCP leases pending.
Currently,
kexec -e
just does a:This makes a couple of assumptions about userspace though:
shutdown
is presentreboot(LINUX_REBOOT_CMD_KEXEC)
). This means that the init system needs to (somehow) detect, out-of-band, that we want to do a kexec reboot rather than a normal one.Neither of these is true for busybox init, hence @mikey 's problems running upstream kexec-lite on petitboot. We have some glue in petitboot to handle this, but that's specific to busybox, and probably not something we want to integrate into
kexec-lite
as-is.So, it would be great if we can design a better, lightweight way to tell init to shutdown & kexec. We'd probably need to coordinate with kexec-tools for this too.