[systemd-devel] emergency vs. rescue

Bill Nottingham notting at redhat.com
Tue Sep 7 10:18:55 PDT 2010


Lennart Poettering (lennart at poettering.net) said: 
> > It reads confusingly, in that if sysinit is 'Before' emergency, the
> > implication would be that if you enable emergency mode, sysinit would be
> > started before it. It isn't, as the dependency isn't there.
> 
> sysinit.target has a Conflicts with emergency.target.

Not currently in the packages here; sysinit only conflicts with shutdown.

> > Two other emergency points:
> > - it doesn't have the same sort of boot alias as 'single'. If you're
> >   going for compat with old sysvinit, it should have an 'emergency' alias
> >   (that leaves out systemd.unit=....)
> 
> Hmm, not sure I follow? This emergency mode didn't really exist in
> sysv.

If sysvinit is passed 'emergency' on the command line, it starts a shell.
(This is all done in init itself, not inittab or other configuration.)

> Are you asking for a simpler way to boot into it? Simpler than passing
> "systemd.unit=emergency.target" at the kernel cmdline?

Right, much like 'single' starts the rescue mode, 'emergency' should
start this mode.

> > - respawn is pretty pointless here (as it is for rescue). It should
> >   just have ExecStartPost=/bin/systemctl default
> 
> Hmm, you have a point there. I need to think about this.

That line works fine for rescue mode in testing... it should work OK for
emergency mode (as long as it's started during boot and not later - perhaps
emergency should have RefuseManualStart=yes?)

Bill


More information about the systemd-devel mailing list