Closed CR95580 closed 7 months ago
Correction. The second line changed in "dietpi.txt" was not DOMAIN but
# Hostname
AUTO_SETUP_NET_HOSTNAME=Freebox-39042E
First of all, apart of AUTO_SETUP_NET_WIFI_ENABLED=1
in dietpi.txt
, you did also set the WiFi APs SSID and key in dietpi-wifi.txt
?
getent hosts <someDomain>
is used to check whether DNS is setup correctly to resolve host names. If this step was reached, it means that the IPv4 and in case IPv6 connection/ping test did already succeed. Did you see two lines:
[ OK ] DietPi-Update | Checking IPv4 network connectivity
[ OK ] DietPi-Update | Checking IPv6 network connectivity
Before the getent hosts
error prompt? If so, only the DNS settings seem to be not correct. If you did not apply a static IP in dietpi.txt
, the DHCP server would have need to serve one functional. From the error prompt (or any other console), you can check:
cat /etc/resolv.conf
for the nameserver
entry, which should contain the IP address of your router, in rare cases of your ISP. If this seems valid, please also try testing DNS with another hostname:
getent hosts dietpi.com
getent hosts google.com
If those all fail, try with a different DNS server:
echo 'nameserver 1.1.1.1' > /etc/resolv.conf
getent hosts dietpi.com
which is Cloudflare DNS. If this works, you can either apply a static IP (including static DNS), or check your router/DHCP server's settings, why it serves a non-functional DNS server to clients.
@MichaIng Thanks for the quick response and the explanations. No, I did not see this dietpi-wifi.txt file before my first installation. I redo a brand new installation and I added in this file not only the SSID and the WPA key for the WiFi slot 0 BUT I also changed the WiFi Country Code = FR (yes, I am in France). And now everything is going well. I am ready to begin my Diet !
Okay great. The WiFi country code is usually set/overridden by the AP, i.e. even if you choose another one, after connecting to the AP, it would switch to what the AP enforces. But there are exceptions from this, based on router/AP model.
Creating a bug report/issue
Required Information
Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 ...
Additional Information (if applicable)
This is during the first boot. I only changed before : AUTO_SETUP_NET_WIFI_ENABLED=1 and DOMAIN = 192.168.1.254 in the file "dietpi.txt "
Actual behaviour
Installation stops on the command "getent hosts DOMAIN" and there is no communication with the server !
Extra details
If I ping the server (ping 192.168.1.254), raspberry sends and receives returns from the server !