Systemctl –Force –Force Reboot
systemctl --force --force reboot systemctl --force --force reboot echo b > /proc/sysrq-triggerOf course, it's a measure of last resort, but there's not reason not to let root do it (i.e. expose an interface to the syscalls that already exist).
It sounds like systemctl --force --force reboot will just invoke the `reboot` syscall directly and thus avoid this issue.
For a regular reboot to work, all file-systems must be able to unmount cleanly.
If you for whatever reason have a file-system which have become non-responsive and is “hanging” any process which tries to interact with it, regular “systemctl reboot” and “systemctl reboot -force” may fail to actually trigger a reboot, further preventing you from fixing your issue with the non-responsive file-system.
In these cases “systemctl reboot —force —force” is useful. Especially on remote machines you cannot physically power-cycle.
I don’t remember the exact specifics beyond that, but this has happened to me and I’ve needed this at least once.
It has happened to me several times on debian, pc accessible by SSH, I try to reboot and it gets stuck
maybe even
echo sub > /proc/sysrq-trigger
echo s .. # sync echo u .. # unmount echo b .. # reboot
Just a guess though
- switch keyboard to _r_aw mode
- gracefully t_e_rminate all processes
- k_i_ll all remaining processes
- _s_ync filesystems
- _u_nmount filesystems
- re_b_oot
You need the "loop" to feed the characters one-by-one to /proc/sysrq-trigger.
Thanks for the explanation what the "sub" did (and more).
This is an actual thing. Systemd was a mistake.
> If --force is specified twice, the operation is immediately executed without terminating any processes or unmounting any file systems. This may result in data loss. Note that when --force is specified twice the halt operation is executed by systemctl itself, and the system manager is not contacted. This means the command should succeed even when the system manager has crashed.