Reboot Ubuntu if init daemon fails / systemd died

I got following error on an really badly "injured" Ubuntu machine:

Failed to start reboot.target: Failed to activate service 'org.freedesktop.systemd1': timed out
See system logs and 'systemctl status reboot.target' for details.
Failed to talk to init daemon.

Rebooting was not possible anymore, due to the beauty of 2933 zombie processes - slowing down the machine to a crawl.

However, this neat issue provided the answer to STILL get it to reboot:

# Reboot
sudo systemctl --force --force reboot
# Shutdown
sudo systemctl --force --force poweroff

"Cool", as Gregory House would say 😉

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.