Bug#991185: systemd: 'systemctl start anacron.service' from emergency mode kills emergency shell

Michael Biebl biebl at debian.org
Wed Jul 21 14:46:47 BST 2021


So,

I looked into this a bit.

What you are seeing is actually expected or rather easy to explain:

When emergency mode is triggered (either by a boot failure or adding 
emergency to the kernel command line), emergency.target is started and 
emergency.service as a result of it.

sysinit.target has "Conflicts=emergency.service emergency.target"

So, whenever something triggers the start of sysinit.target, it will in 
turn stop emergency.{service,target}

Basically, all units aside from early boot services have an explicit 
dependency on sysinit.target (see e.g. systemctl show -p Requires -p 
After anacron.service)

So, by starting such a service, you also trigger the start of 
sysinit.target, which in turn stops emergency.{service,target}

This has been raised a while ago and fix committed
https://github.com/systemd/systemd/pull/6765

Unfortunately, this was reverted, as it caused a dependency loop
https://github.com/systemd/systemd/pull/6904

After that, nothing has happened anymore regarding this issue afaics.


Would you be willing to file an upstream bug report?
Maybe there is a way, to find a solution for this without causing a 
regression.


For the time being, you might consider using single/rescue mode. It 
doesn't seem to have such a conflicts with sysinit.target.

Regards,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20210721/3046c04d/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list