Jump to content

Le Potato is not updating resolv.conf on boot.


Recommended Posts

Posted

Whenever I've been booting up these potatoes, network never works right off the bat when you're using static IPs.

 

/etc/network/interfaces

source /etc/network/interfaces.d/*

# Wired adapter #1
allow-hotplug eth0
no-auto-down eth0
iface eth0 inet static
    address 192.168.5.200
    netmask 255.255.255.0
    gateway 192.168.5.6
    dns-nameservers 8.8.8.8 192.168.5.6

# Local loopback
auto lo
iface lo inet loopback

 

I'm able to ping 8.8.8.8 but unable to ping google.com

user@lepotato0:~$ ping google.com
ping: unknown host google.com
user@lepotato0:~$ nslookup google.com
;; connection timed out; no servers could be reached

user@lepotato0:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=13.5 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=11.1 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=57 time=16.6 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=57 time=11.3 ms
♥
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 11.199/13.178/16.627/2.194 ms
user@lepotato0:~$

I've been manually fixing this by executing sudo ifdown eth0; sudo ifup eth0;

Then I tried this answer:  https://unix.stackexchange.com/questions/275428/i-can-ping-ips-but-cant-resolve-domains

 

And it works...BUT resolv.conf is overwritten on reboot, so I would have to write into this file every time I boot up. Shouldn't this be something that's automatic on boot?

Posted

Can you provide output from 'sudo armbianmonitor -u' please after you manually adjusted DNS resolving and DNS works? And then for a static IP address assignment why don't you use auto instead?

# Wired adapter #1
auto eth0
iface eth0 inet static
    address 192.168.5.200
    netmask 255.255.255.0
    gateway 192.168.5.6
    dns-nameservers 8.8.8.8 192.168.5.6

 

Posted
10 hours ago, NinjaKitty said:

 

And it works...BUT resolv.conf is overwritten on reboot, so I would have to write into this file every time I boot up. Shouldn't this be something that's automatic on boot?

 

you could try this one:

https://askubuntu.com/questions/157154/how-do-i-include-lines-in-resolv-conf-that-wont-get-lost-on-reboot

English translation:

My solved. "only 12.4"

I noticed that if you add the dns-nameserver in interfaces that do not take the name resolution server Thanks to the help found here have solved the problem.

http://manpages.ubuntu.com/manpages/lucid/man8/resolvconf.8.html

To make resolv.conf not change when we edit manually do this in the terminal:

sudo resolvconf –disable-updates
after:

sudo resolvconf -a eth0 # or your network Interfas
then manually edit /run/resolvconf/resolv.conf

adding a maximum of two DNS servers. thanks P.S. not forget to restart:

sudo /etc/init.d/networking restart

 

Posted
23 minutes ago, NinjaKitty said:

I don't know what people think of editing base files

 

Why did you not provide output of 'sudo armbianmonitor -u' as requested?

Posted

For everyome else stumbling accross this thread:

 

1) if someone asks you for 'armbianmonitor -u' output then simply provide it. Armbian devs spent a lot of time and efforts on a tool to provide necessary debug info so we can help you more easily. Not providing this information is also a great way to prevent us from fixing issues

 

2) Since for Le Potato currently only Xenial images are available I simply gave it a try with correctly defined /etc/network/interfaces settings. It just works as expected, no need to follow outdated tutorials for outdated Ubuntu versions that introduce just another bunch of different problems:

 

root@odroidxu4:~# head /etc/network/interfaces
source /etc/network/interfaces.d/*

# Wired adapter #1
auto enx001e06330005
iface enx001e06330005 inet static
address 192.168.83.254
netmask 255.255.255.0
gateway 192.168.83.1
dns-nameservers 192.168.83.1 9.9.9.9
#	hwaddress ether # if you want to set MAC manually
root@odroidxu4:~# ping -c 2 google.com
PING google.com (172.217.22.238) 56(84) bytes of data.
64 bytes from muc11s02-in-f14.1e100.net (172.217.22.238): icmp_seq=1 ttl=57 time=13.4 ms
64 bytes from muc11s02-in-f14.1e100.net (172.217.22.238): icmp_seq=2 ttl=57 time=12.6 ms

--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 12.650/13.038/13.426/0.388 ms
root@odroidxu4:~# nslookup google.com
Server:		192.168.83.1
Address:	192.168.83.1#53

Non-authoritative answer:
Name:	google.com
Address: 172.217.22.238

root@odroidxu4:~# armbianmonitor -u
/var/log/armhwinfo.log has been uploaded to http://sprunge.us/LCKf
Please post the URL in the Armbian forum where you've been asked for.

 

Posted
4 hours ago, tkaiser said:

Why did you not provide output of 'sudo armbianmonitor -u' as requested?

I was not referring to your answer, and I didn't see your answer since I was skimming by really quick, so I apologize for that.

 

I will try switching to auto. It was on these settings because they were the defaults given to me when I installed Armbian (I didn't change any of the keywords)

I've already resolved it one way, so I don't think armbianmonitor will be necessary. I am aware of this since I've already been providing armbianmonitor in my previous thread.

 

Thanks for all the help.

 

Posted

If I remember correctly, allow-hotplug eth0 pretty much does a similar thing as auto eth0,

 

So, as I expected on reboot, changing to auto eth0; didn't do anything.

root@lepotato2:~# head /etc/network/interfaces
source /etc/network/interfaces.d/*

# Wired adapter #1
auto eth0
iface eth0 inet static
address 192.168.5.202
netmask 255.255.255.0
gateway 192.168.5.6
dns-nameservers 8.8.8.8 8.8.4.4
#       hwaddress ether # if you want to set MAC manually
root@lepotato2:~# ping -c 2 google.com
ping: unknown host google.com
root@lepotato2:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=12.6 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=11.8 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=54 time=12.0 ms
♥
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 11.865/12.203/12.668/0.351 ms
root@lepotato2:~# ifdown eth0; ifup eth0;
root@lepotato2:~# armbianmonitor -u
System diagnosis information will now be uploaded to
gzip: /var/log/armhwinfo.log.1.gz: unexpected end of file
http://sprunge.us/dfHP
Please post the URL in the forum where you've been asked for.

root@lepotato2:~#

 

Posted
27 minutes ago, NinjaKitty said:

gzip: /var/log/armhwinfo.log.1.gz: unexpected end of file

 

Unfortunatenly there's most of the information missing. Anyway, would be interesting to get the output of the following 3 commands 20 seconds after a reboot and then 3 seconds after you did the 'ifdown eth0; ifup eth0' again.

ip addr
netstat -rn
nslookup google.com

And then please output from 'armbianmonitor -u' again afterwards. Thank you.

Posted (edited)

Different potato, but should be the same exact configuration other than the local IP being 1 off.

root@lepotato1:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 76:35:c0:b2:fc:be brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 82:0b:e2:7c:90:19 brd ff:ff:ff:ff:ff:ff
    inet 192.168.5.201/24 brd 192.168.5.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::800b:e2ff:fe7c:9019/64 scope link
       valid_lft forever preferred_lft forever
root@lepotato1:~# head /etc/network/interfaces
source /etc/network/interfaces.d/*

# Wired adapter #1
auto eth0
iface eth0 inet static
address 192.168.5.201
netmask 255.255.255.0
gateway 192.168.5.6
dns-nameservers 8.8.8.8 8.8.4.4
#       hwaddress ether # if you want to set MAC manually
root@lepotato1:~# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.5.6     0.0.0.0         UG        0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
192.168.5.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
root@lepotato1:~# nslookup google.com
;; connection timed out; no servers could be reached

root@lepotato1:~# ifdown eth0; ifup eth0;
root@lepotato1:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 76:35:c0:b2:fc:be brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 82:0b:e2:7c:90:19 brd ff:ff:ff:ff:ff:ff
    inet 192.168.5.201/24 brd 192.168.5.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::800b:e2ff:fe7c:9019/64 scope link
       valid_lft forever preferred_lft forever
root@lepotato1:~# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.5.6     0.0.0.0         UG        0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
192.168.5.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
root@lepotato1:~# nslookup google.com
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   google.com
Address: 172.217.5.110

root@lepotato1:~# armbianmonitor -u System diagnosis information will now be uploaded to http://sprunge.us/CBgd Please post the URL in the forum where you've been asked for.

Edited by Tido
link outside code box
Posted
14 minutes ago, NinjaKitty said:

Different potato, but should be the same exact configuration other than the local IP being 1 off

 

Well, here in dmesg output docker0 is missing (I was interested in this) but doesn't matter since on this other Potato the problem is the same and I've to admit that I've no clue what's going on (other than reading quickly through your other thread and realizing that this might be really a hardware/driver related problem). Thank you for the provided information, now I've at least something to look into (wrong armbianmonitor output that needs fixes)

Posted
5 hours ago, tkaiser said:

hardware/driver related problem

The current image is a "testing" release for that reason.  Also, 4.13 is an "in progress" support situation for the meson-gxl, I'm running 4.14 with the current patchset through some testing to move NEXT to it.

Posted

Is there any action at the moment to take care of this issue? From what I'm hearing, this is a valid issue, so has this been added to the "todo" list? if so, what's the current status?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines