From: Carsten Haitzler carsten.haitzler@arm.com
Using a fixed DNS IP is not right - if you DHCP fetch your IP address your DHCP server will tell you what DNS server to use - you should use that one as then at least internal DNS lookups for names behind a NAT work where a fixed 8.8.8.8 etc. won't. Do this by moving to Network Manager - it does this right. Problem then solved.
CI passes except for FVP - but CI is yet again broken and no-op CI runs fail the same way
https://git.morello-project.org/carhai01/morello-rootfs-images/-/pipelines/1...
Carsten Haitzler (1): morello: Network: Move to network manager to solve DNS
context/build_debian_image.sh | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-)
From: Carsten Haitzler carsten.haitzler@arm.com
Hardcoding 8.8.8.8 or any other DNS is a hacky workaround systemd networkd not properly setting up resolv.conf based on DHCP info. An easy solution - move to network manager. It actually gets this right. It will also handle multple network interfaces (if you plug in some USB ones) as well as Wifi (via USB) if you attach it etc. so use a better solution. Network Manager.
Signed-off-by: Carsten Haitzler carsten.haitzler@arm.com --- context/build_debian_image.sh | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/context/build_debian_image.sh b/context/build_debian_image.sh index a0137ae..a9b4dfa 100755 --- a/context/build_debian_image.sh +++ b/context/build_debian_image.sh @@ -52,6 +52,7 @@ PACKAGES=( libncursesw5 libncurses5-dev libncursesw5-dev + network-manager )
# Install dependencies @@ -63,12 +64,9 @@ echo 'root:morello' | chpasswd echo -e "none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0" >> /etc/fstab mount /dev/shm
-# Enable network -systemctl enable systemd-networkd -echo -e "[Match]\nName=e*\n[Network]\nDHCP=yes" | tee /etc/systemd/network/dhcp.network >/dev/null +# Hostname basics echo morello > /etc/hostname -echo 127.0.0.1 localhost > /etc/hosts -echo 127.0.1.1 morello >> /etc/hosts +echo 127.0.0.1 localhost morello > /etc/hosts
# Allow root access to ssh sed -i 's|#PermitRootLogin prohibit-password|PermitRootLogin yes|g' /etc/ssh/sshd_config @@ -106,21 +104,6 @@ source $MORELLO_HOME/env/morello-sdk-restore # Install Entropy generators apt-get install rng-tools haveged jitterentropy-rngd -y
-# Create /etc/resolv.conf -cat > /etc/resolv.conf << EOF -nameserver 8.8.8.8 -nameserver 8.8.4.4 -EOF - -# Create morello.network -cat > /etc/systemd/network/morello.network << EOF -[Match] -Name=enp7s0 - -[Network] -DHCP=ipv4 -EOF - # Create local service for the final system configuration cat > /etc/systemd/system/morello-config.service << EOF [Unit]
CI now works:
https://git.morello-project.org/carhai01/morello-rootfs-images/-/pipelines/1...
On 5/3/23 12:05, carsten.haitzler@foss.arm.com wrote:
From: Carsten Haitzler carsten.haitzler@arm.com
Using a fixed DNS IP is not right - if you DHCP fetch your IP address your DHCP server will tell you what DNS server to use - you should use that one as then at least internal DNS lookups for names behind a NAT work where a fixed 8.8.8.8 etc. won't. Do this by moving to Network Manager - it does this right. Problem then solved.
CI passes except for FVP - but CI is yet again broken and no-op CI runs fail the same way
https://git.morello-project.org/carhai01/morello-rootfs-images/-/pipelines/1...
Carsten Haitzler (1): morello: Network: Move to network manager to solve DNS
context/build_debian_image.sh | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-)
linux-morello-distros@op-lists.linaro.org