networking problems with generated live systems #43

Open
opened 2024-08-21 08:28:11 +00:00 by Ghost · 1 comment

I changed our live system a while ago from fakechroot to mmdebstrap.
https://github.com/AminaBank/livedeb/pull/12
Then I discovered that after this change, the live system has no network connectivity. The system didn't get an IP address from DHCP. After I modified the commands to enable root on the generated image, I was able to execute "systemctl start systemd-networkd" to make networking work.
I got the networking working in the live system working, by adding the following option to mmdebstrap:
-customize-hook='chroot "$1" systemctl enable systemd-networkd'

What is the likelyhood that I also need to manually enable other services, that were automatically enabled with the fakechroot approach?

Recently we also discovered that the machines running this and similar LiveOS sometimes lose network connectivity. The same can happen whether the IP address came from DHCP or from a static assignment. Sometimes a machine works perfectly fine for a month, but after rebooting it can't connect to the network any more.

Did anybody else encounter networking problems with mmdebstrap built live OSes? In the years before, when we used fakechroot we didn't have this sort of problems.

I changed our live system a while ago from fakechroot to mmdebstrap. https://github.com/AminaBank/livedeb/pull/12 Then I discovered that after this change, the live system has no network connectivity. The system didn't get an IP address from DHCP. After I modified the commands to enable root on the generated image, I was able to execute "systemctl start systemd-networkd" to make networking work. I got the networking working in the live system working, by adding the following option to mmdebstrap: -customize-hook='chroot "$1" systemctl enable systemd-networkd' What is the likelyhood that I also need to manually enable other services, that were automatically enabled with the fakechroot approach? Recently we also discovered that the machines running this and similar LiveOS sometimes lose network connectivity. The same can happen whether the IP address came from DHCP or from a static assignment. Sometimes a machine works perfectly fine for a month, but after rebooting it can't connect to the network any more. Did anybody else encounter networking problems with mmdebstrap built live OSes? In the years before, when we used fakechroot we didn't have this sort of problems.
Owner

I think you should look into what systemd scripts do differently depending on whether they are executed in fakechroot versus in an unshared user namespace chroot. Systemd scripts will check whether they are in a chroot or not and then do things differently compared to being run on root.

Also, maybe make sure what the default for systemd-networkd is these days because maybe the default changed. On my system, it is disabled for example.

I think you should look into what systemd scripts do differently depending on whether they are executed in fakechroot versus in an unshared user namespace chroot. Systemd scripts will check whether they are in a chroot or not and then do things differently compared to being run on root. Also, maybe make sure what the default for systemd-networkd is these days because maybe the default changed. On my system, it is disabled for example.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: josch/mmdebstrap#43
No description provided.