[systemd-devel] emergency vs. rescue

Lennart Poettering lennart at poettering.net
Sun Sep 5 10:43:23 PDT 2010


On Fri, 03.09.10 15:30, Bill Nottingham (notting at redhat.com) wrote:

> Is there any real, useful, reason to define both of these? In RH/Fedora, we
> don't support a distinction, and haven't since switching away from sysvinit.
> As they're set up now in systemd, they're identical except for some string
> output, and do not have any different handling in the daemon itself aside
> from the different arguments. It seems far simpler to define one and worry
> about adding more later rather than creating a reserved word/signal/target
> that will live forever that may not be necessary.

In systemd, "emergency" is little more than an equivalent to
init=/bin/sh on the kernel command like. i.e. you get a shell, but
almost nothing else (except for systemd in the background which you can
then ask to do more). No services are started, no mount points mounted,
no sockets established, nothing. Just a raw, delicious shell and
systemd's promise to be around if you need more. In contrast to that
"rescue" is equivalent to the old runlevel 1 (or S), i.e. sysinit is
run, everything is mounted, but no normal services are started yet.

I think emergency mode is kinda nice for debugging purposes, since it
allows you to boot bit-by-bit, simply by starting in the emergency mode
and then starting the various services and other units that are part of
the early boot step-by-step. This will become particularly useful when
Fedora splits up sysinit into various smaller scripts which could then
be started seperately and independently.

Consider it a part of our boot-up debugging tools.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list