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

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Mon Jun 13 13:42:34 UTC 2022


>>> Colin Guthrie <gmane at colin.guthr.ie> schrieb am 13.06.2022 um 14:58 in
Nachricht <t87c9t$lon$1 at ciao.gmane.io>:
> Ulrich Windl wrote on 13/06/2022 09:09:
>> 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'"
>> 2) How can I start the network using systemd?
> 
> You may wish to consider "booting" the container rather than just chrooting.

No container involved; an unbootable system instead, and I'd like to have networking available for repair.
So obviously I cannot boot. Without systemd it wouldn't be a problem.

Regards,
Ulrich

> 
> Combined with IPVLAN or similar (which systemd-nspawn makes easy) you 
> can bring up a namespaced network interface inside the container 
> completely isolated from the host.
> 
> I do this for various setups and it works pretty well.
> 
> Col






More information about the systemd-devel mailing list