[systemd-devel] Antw: [EXT] Re: Q: Start network in chroot?

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Tue Jun 14 06:03:19 UTC 2022


>>> Topi Miettinen <toiwoton at gmail.com> schrieb am 13.06.2022 um 18:45 in
Nachricht
<70cd12d1-6372-8d8c-90bd-144d1f7b3b31 at gmail.com>:
> On 13.6.2022 11.09, Ulrich Windl wrote:
>> Hi!
>> 
>> Two questions:
>> 1) Why can't I use "systemctl start network" in a chroot environment (e.g.

> mounting the system from a rescue medium to fix a defective kernel)? When I

> try I get: "Running in chroot, ignoring command 'start'"
> 
>  From docs/ENVIRONMENT.md:
> * `$SYSTEMD_IGNORE_CHROOT=1` — if set, don't check whether being invoked 
> in a
>    `chroot()` environment. This is particularly relevant for systemctl, 
> as it
>    will not alter its behaviour for `chroot()` environments if set. 
> Normally it
>    refrains from talking to PID 1 in such a case; turning most 
> operations such
>    as `start` into no-ops.  If that's what's explicitly desired, you might
>    consider setting `$SYSTEMD_OFFLINE=1`.
> 
> -Topi

That reads interesting, but I really don't understand "This is particularly
relevant for systemctl, 
as it will not alter its behaviour for `chroot()` environments if set."; does
that mean the setting is being ignored?
If so, why is it "relevant" then? Or is it just poor wording, meaning
actually: "it DOES alter the behavior for chroot() environments"?
And the "SYSTEMD_OFFLINE" does the same (bad) thing in non-chroot
environments?

Regards,
Ulrich





More information about the systemd-devel mailing list