[systemd-devel] What are all the reasons systemd could fall to rescue mode

Chris Morin chris.morin2 at gmail.com
Wed Mar 9 19:12:42 UTC 2016


Hi,
   I'm seeing systemd fall to a rescue shell upon reload and am trying
to understand why it's happening. I have a very custom boot graph in
case that matters.

>From reading the systemd documentation and reading the code, as far as
I can tell, the following reasons are the only way rescue.service can
be started:

* It's pulled in as a dependency from another unit.
* It's in the "OnFailure" of a failing unit
* systemd receives SIGRTMIN+1
* A systemctl command is run (such as systemctl isolate rescue.target)

I have no reason to believe any of these are occurring (though I'll
definitly have to do more digging on that one). So is the list above
incomplete?

Another question I had is when is a service considered "failed" when
stopping it? If the ExecStop command returns non-zero, does that
service go to the failed state? How about if services that are
supposed to stop before it fail themselves? I ask because it might be
the case that a service is starting rescue.target via "OnFailure" when
it's shutting down.


More information about the systemd-devel mailing list