How to restart systemd after it crash? systemd currently crash during VirtualBox installation. Problem is already tracked by this issue#10716. I'm using Ubuntu 18.10.
sudo dpkg -i virtualbox-5.2_5.2.20-125813_Ubuntu_bionic_amd64.deb
Setting up virtualbox-5.2 (5.2.20-125813~Ubuntu~bionic) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Failed to enable unit: Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
sudo journalctl --no-pager -b -0 -p 0..4
dec 08 20:20:55 machine kernel: systemd[1]: segfault at 40000 ip 00007fe8fdcb9116 sp 00007ffd6f134918 error 4 in libc-2.28.so[7fe8fdc2e000+171000]
dec 08 20:20:55 machine systemd[1]: Caught <SEGV>, dumped core as pid 6345.
dec 08 20:20:55 machine systemd[1]: Freezing execution.
I tried to execute following commands, but without success. The only solution that I came up is to hard restart my machine.
sudo systemctl restart org.freedesktop.systemd1
Failed to restart org.freedesktop.systemd1.service: Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
# This finish without errors, but "list-units" still doesn't show anything
sudo systemctl daemon-reexec
sudo systemctl list-units --no-pager
Failed to list units: Connection timed out
sudo systemctl daemon-reload
Failed to reload daemon: Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)