1

How to disable systemd service manually?

I can't boot. The system is stuck on "Failed to start Network Time Synchronization."

I have access to the file system and can edit files. What can I do to disable a systemd service? Can I just delete this file /lib/systemd/system/systemd-timesyncd.service?

4
  • 3
    If you see "Failed to start Network Time Synchronization", then that's not what it's stuck on. That message means it gave up and moved on. Commented Apr 19, 2018 at 2:44
  • 2
    Further to Patrick: Stop! You are floundering around. In bootstrap and shutdown the last thing printed on the screen does not necessarily bear any relationship to what your computer is doing. Look at the logs. Use the rescue and emergency modes. Invoke the kbrequest login. Determine what your system is doing. Then address that. Commented Apr 19, 2018 at 5:09
  • At this point you are better off reinstalling the OS from scratch. Unless you want to learn a lot by just fooling around, which is perfectly fine contrary to hysterical comments you may read here. This is your system, you own it, and it is perfectly fine to fool around with it. Commented Apr 19, 2018 at 15:14
  • @Patrick, I think that @dsstorefile's solution worked and that the time sync could be why it got stuck the first time. After I ran sudo ln -s /dev/null /media/user/%UUID%/etc/systemd/system/systemd-timesyncd.service, it was able to boot past the failed time sync. However, I ran into a completely separate, unrelated problem, but I was able to figure out how to fix it. I have documented my solution here: raspberrypi.stackexchange.com/questions/83044/… Commented Apr 19, 2018 at 19:04

1 Answer 1

2

As said by @JdeBP boot with recovery console, start a root shell, then issue the command journalctl -xb to see what happened.

If this does not show you anything of useful, set Storage=persistent into /etc/systemd/journald.conf, reboot, and repeat the above steps in the recovery console.

1

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.