I'm using a Raspberry Pi B, with Raspbian. After upgrading to Jessie, watchdog daemon doesn't start at boot anymore. Starting it manually using "sudo service watchdog start" does work. I tried:

  • purging and reinstalling watchdog
  • update-rc.d watchdog defaults && update-rc.d watchdog enable
  • systemctl enable watchdog produces this error:

The unit files have no [Install] section. They are not meant to be enabled using systemctl.

I checked

  • syslog with systemd verbosity on debug, no results. Other than the watchdog device nothing is mentioned.
  • systemctl list-units | grep -i watchdog is emtpy (unless I started it manually)
  • My default runlevel is 5 and the priority of watchdog in /etc/rc5.d/ is also 5.

What else can I try?

up vote 5 down vote accepted

Open

/lib/systemd/system/watchdog.service

and add

[Install]
WantedBy=multi-user.target

Systemd needs the [Install]-Section for a Unit to know how it should enable/disable the Unit.

Services installed on the system come with default unit files that are stored in the /usr/lib/systemd/system/ directory. System Administrators should not modify these files directly, therefore any customization must be confined to configuration files in the /etc/systemd/system/ directory.

Link...

Update:

Just make link for default config /lib/systemd/system/[service name].service to /etc/systemd/system/multi-user.target.wants/[service name].service, aka:

# ln /lib/systemd/system/watchdog.service /etc/systemd/system/multi-user.target.wants/watchdog.service

Then reboot system:

# reboot

And check what service starts automatically:

# systemctl status watchdog.service
  • Can you be more specific with your answer? Please don't rely on outer links, as they may be dead any time. – Tomasz Sep 23 '16 at 14:51
  • Thomas, I expanded my answer – Алексей Максимов Sep 23 '16 at 15:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.