Today I just learned that systemctl --force --force reboot is a command. We had a computer we remotely connected to which got permission errors and bus errors when we tried to reboot it normally. For some reason the mentioned command did actually manage to shutdown the computer bit did not manage to reboot it correctly.

I wonder what the double --force flag actually accomplishes and what possibly could hinder a regular reboot in this scenario.

  • tychosmoose
    link
    fedilink
    arrow-up
    1
    ·
    15 days ago

    The double --force is in the systemd docs. It’s covered in the systemctl halt section, so it’s talking about it in that context rather than as a reboot:

    If combined with --force, shutdown of all running services is skipped, however all processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the system halt. 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.