WebReflection / archibold.io

archibold.io
ISC License
86 stars 14 forks source link

BENJA: Networking issues on Raspberry Pi 3 model B #19

Closed iafan closed 4 years ago

iafan commented 4 years ago

First of all, thanks for bringing BENJA to the world!

While installing BENJA, I was stuck in a Wi-Fi setup loop after each reboot. If network is not available, the installer tries to request a web page with curl, fails, assumes WiFi was not set up and forces that loop.

After spending some time on figuring out the problem, I finally found an underlying issue described on StackOverflow. It seems to be a combination of Raspberry Pi 3B + ArchLinux ARM + NetworkManager (but may affect other boards as well).

The underlying problem manifests itself like this: even if Raspberry Pi is connected to WiFi and can ping IP addresses (e.g. ping 8.8.8.8 works fine), DNS won't work (ping google.com will fail with "Name or service not known" error).

The solution described on StackOverflow worked for me:

# Press Ctrl+C multiple times to get out of  BENJA setup / WiFi setup and prevent powerdown.

$ su
Password: root

$ systemctl stop systemd-resolved
$ systemctl mask systemd-resolved

$ reboot now

After that, network should start working, and the installation will continue.

What I suggest in this issue (besides providing the solution that worked for me):

1) Maybe try to prevent the WiFi setup loop, check if a WiFi was already set up before, and if it was, just spit the informative and exit to shell, allowing the user to debug the issue. 2) Mention in that message and/or README about su command and root password. 3) See if systemctl mask systemd-resolved is something that can be added unconditionally or if daemons can be reconfigured somehow to work properly on all boards?

WebReflection commented 4 years ago

@iafan thanks for the hint, I've automated that procedure so now it should work, if that is the solution.

Worth mentioning there are few sleep 3 commands around, to simplify the ctr+c escape if needed.

I hope this works now, I will double check soon that's the case, but if you can double check sooner, please let me know 👋