[systemd-devel] Fall back to shell and still see failure

Chris Morin chris.morin2 at gmail.com
Mon May 18 12:23:30 PDT 2015

I was hoping that was it, but it turns out that emergency.service is
already of type idle.
I know the console port is very slow on my device. Could this be
caused by some kind of buffer flushing?
This is the output on the console port:
[  OK  ] Started Chasfs Flashutil.
[  OK  ] Reached target ChWelcome to emergency mode! After logging in,
type "journalctl -xsu

Notice the spaces between the "su" and the "login-4.2".
Also, the string "Reached target Chasfs Flashutil" doesn't get to complete.

On Mon, May 18, 2015 at 1:35 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Mon, 18.05.15 13:23, Chris Morin (chris.morin2 at gmail.com) wrote:
>> Hi
>>   During a normal boot on my system, the last service to launch starts
>> a special shell which isn't your standard linux shell. Unfortunately,
>> before getting to that service, there is a long chain of dependencies
>> which have to run. I want to drop to a normal linux shell when any of
>> these dependencies fail to be able to jump right into debugging it.
>> I set the "OnFailure" option of the last service to
>> "emergency.target". This works great. The only issue is that the shell
>> appears before systemd has a chance to display which service actually
>> failed.
>>  I can obviously check which service failed with "systemctl --failed"
>> but I'd like to have it displayed during boot as it normally is.
>> I'm assuming I can't see the failure message because emergency.service
>> grabs control of the console before systemd can print out it's
>> message. Is this the case? Is there any way to get what I'm looking
>> for?
> Type=idle is for cases like this. See systemd.service(5) for details.
> Lennart
> --
> Lennart Poettering, Red Hat

More information about the systemd-devel mailing list