p64
Posts: 2
Joined: Fri Apr 01, 2016 1:13 am

How to prevent Raspberry Pi to shutdown using watchdog?

Fri Apr 01, 2016 6:52 am

Hi!

I have about 40 Rasbperry B+ working constantly on different locations. I use Raspbian jessie. I've setup watchdog with "nowayout=1":

Code: Select all

cat /etc/modprobe.d/watchdog.conf
options bcm2708_wdog nowayout=1 heartbeat=13
Watchdog is working: if I terminate watchdog and then terminate wd_keepalive then after few seconds Raspberry is rebooting. But when I execute command "shutdown -h 0" Raspberry shutdowns and never starts again. I know there is an ability to prevent complete shutdowning, but I have no idea how to do it. Please, help me!

sprinkmeier
Posts: 410
Joined: Mon Feb 04, 2013 10:48 am
Contact: Website

Re: How to prevent Raspberry Pi to shutdown using watchdog?

Fri Apr 01, 2016 10:40 am

p64 wrote: ... "shutdown -h 0" ...
try

Code: Select all

shutdown -r 0
?
It seems to be that "shut down and halt" is a perfectly legitimate way of asking the system to shut down and stay off.

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: How to prevent Raspberry Pi to shutdown using watchdog?

Fri Apr 01, 2016 12:10 pm

Hi,
Shutdown process disable watchdog. Its is not a system fault, is a legitimate system of.
I suggest to disable stop of watchdog daemon of shutdown process.
I don't sure (check documentation of distribution in use), but this command remove watchdog from runlevel 0 (halt)
update-rc.d watchdog stop 1 6 . start 2 3 4 5

p64
Posts: 2
Joined: Fri Apr 01, 2016 1:13 am

Re: How to prevent Raspberry Pi to shutdown using watchdog?

Sat Apr 02, 2016 1:55 pm

pksato wrote:Hi,
Shutdown process disable watchdog. Its is not a system fault, is a legitimate system of.
I suggest to disable stop of watchdog daemon of shutdown process.
I don't sure (check documentation of distribution in use), but this command remove watchdog from runlevel 0 (halt)
update-rc.d watchdog stop 1 6 . start 2 3 4 5
I was trying your command. This is the output:

Code: Select all

root@raspberrypi:/home/pi# update-rc.d watchdog stop 1 6 . start 2 3 4 5
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start runlevel arguments (3 4 5) do not match watchdog Default-Start values (2 3 4 5)
update-rc.d: warning: stop runlevel arguments (6) do not match watchdog Default-Stop values (0 1 6)
This command isn't changing system's behevior. Is it still proper way to remove watchdog from "shutdown procedure" while Rasbpian Jessie is using systemd?

Return to “General discussion”