
Error “Failed to talk to init daemon” (SOLVED)
March 27, 2021
You can use command line to shutdown Linux computer, following command will shutdown computer:
shutdown -h now systemctl halt
To reboot, you can use the following command:
systemctl restart
They usually work fine, but on some distributions they require elevated privileges, which means they need to be run with sudo.
But in single user mode, these commands result in the following error:
System has not been booted with systemd as init system (PID 1). Can’t operate. Failed to connect to bus: Host is down Failed to talk to init daemon.
Linux single user mode is used, for example, to reset a forgotten password for the root user or any other user. The operation of the computer in this mode is different from normal and, as you can see from the error message, the system was not booted with systemd as the init of the system, so it cannot connect to the bus and cannot send commands to the init daemon.
Related: How to reset a forgotten login password in Linux
However, there is still a way to turn off the computer.
To log out safely, type:
sync umount /
These commands instruct the OS to write the changes made to the file system (for optimization purposes, they can be stored in the cache), and then unmount the root file system.
After that, to turn off the computer, run:
poweroff -f
Or restart your computer with the command:
reboot -f
Even if these commands did not help, then use the double -f options.
To turn off your computer run:
poweroff -f -f
Or restart your computer with the command:
reboot -f -f
The -f option means forced immediate stop, shutdown, or reboot. When specified once, this results in an immediate but clean shutdown by the system manager. If specified twice, it results in an immediate shutdown without contacting the system manager.
When using the -f option with systemctl halt, systemctl poweroff, systemctl reboot, or systemctl kexec, the selected operation is performed without shutting down all units. However, all processes will be forcibly terminated, and all file systems will be unmounted or remounted read-only. Therefore, it is a radical, but relatively safe option to request an immediate restart. If you specify --force twice for these operations (except for kexec), they will be executed immediately, without killing any processes or unmounting any filesystems. Warning: specifying --force twice for any of these operations can result in data loss. Note that if you specify --force twice, the selected operation is performed by systemctl itself and is not associated with the system manager. This means that the command must be executed even if the system manager fails.
Related articles:
- What is the difference between “systemctl reboot” and “reboot” and “systemctl poweroff” and “poweroff” (99.7%)
- Do services need to be restarted when updating packages (71.2%)
- How to change the default operating system in Arch Linux (for UEFI and systemd-boot) (54.9%)
- How to Run a Program Automatically on Startup in Linux (54.9%)
- Analogue of the --force option in pacman (50.3%)
- PostgreSQL error “An old version of the database format was found” (SOLVED) (RANDOM - 0.3%)
"solved"
no, you figured out to shutdown the machine
the problem still remains and have to do this hack every time want to shut machine down
nothing solved, dangerous (admitted yourself) hack
Greetings! All data is written to disk (even if it was previously cached) with the “sync” command, then the root partition is unmounted with the “umount /” command. After these procedures, it is safe to turn off the computer even by pulling the plug out of the socket.
As for the situation itself, it is extremely rare, for example, the described problem occurs when resetting the root password.
Your concerns are unfounded.