Page 1 of 1

revolve.conf issue??

PostPosted: 2019-03-27 16:17
by Munty Scruntfundle
I'm trying to find a solution to a DNS problem, my Banana pi running debian can't see the outside world. This is a stretch version, 9 something I think.

I am root.
I CAN nano /etc/resolve.conf, but I can't save, No such file or directory.
I can ls the file, but can't cat it, No such file or directory.
I can't touch the file, No such file or directory.
I can't chmod the file.
I can't chown the file.

lrwxrwxrwx 1 root root 35 Jun 11 2018 resolv.conf -> /var/run/NetworkManager/resolv.conf

Exactly the same outcome trying to use /var/run/NetworkManager/resolv.conf.

I have tried adding the dns-nameserver under the eth0 details in /etc/network/interfaces but this doesn't appear to do anything.

Could someone please suggest a couple of ideas? I can't even update the bloomin thing!

I'm running headless with SSH so the local network settings are fine. I can't get to the desktop.

Many thanks.

Re: revolve.conf issue??

PostPosted: 2019-03-27 17:47
by roseway
The file is called resolv.conf, not resolve.conf. In order to edit it you need to have root privilege.

When you say that you CAN nano /etc/resolve.conf, all that means is that nano will open a new editing session for that non-existent file. You won't be able to save it unless you have root privilege.

Re: revolve.conf issue??

PostPosted: 2019-03-27 17:53
by Head_on_a_Stick
Munty Scruntfundle wrote:lrwxrwxrwx 1 root root 35 Jun 11 2018 resolv.conf -> /var/run/NetworkManager/resolv.conf

Try:
Code: Select all
file /etc/resolv.conf

The file is a symlink and NetworkManager is controlling the content so to change it alter the settings in that program.

If you want to use /etc/network/interfaces instead then delete the symlink and let ifupdown create a new one for you.

Re: revolve.conf issue??

PostPosted: 2019-03-27 18:43
by p.H
Munty Scruntfundle wrote:I have tried adding the dns-nameserver under the eth0 details in /etc/network/interfaces but this doesn't appear to do anything.

Of course not. dns-nameserver(s) options have an effet only if resolvconf is installed and manages resolv.conf. But it does not, as can be seen in the symlink target /var/run/NetworkManager/resolv.conf. If you are using several DNS sources (NetworkManager, /etc/network/interfaces...) I recommend that you install resolvconf.

Note : On a modern Debian system /var/run is also a symlink pointing to /run, and /run is mounted as a tmpfs (memory-based temporary filesystem) which is volatile. If NetworkManager is not running, /run/NetworkManager/ does not exist so /run/NetworkManager/resolv.conf cannot be created.

Re: revolve.conf issue??

PostPosted: 2019-03-27 18:54
by Munty Scruntfundle
After A LOT of messing around with all sorts of guff, here's what finally worked.

Disable NetworkManager. Henceforth known as NetowkBallsupManager.
Stop the service
Disable Systems.resolve. See above for similar renaming convention.
Stop the service.

Delete /etc/resolv.conf
Create /etc/resolv.conf however you want, add the first line nameserver=x.x.x.x #Repalce xxxx as needed.

www ping perfect.

Why are these 2 additions to debian installed when they both obviously conflict with each other and prohibit you making manual changes on a system that may very well be run headless? At the very least turn the damn things off as default? No? Just me?

I hope someone else finds this helpful.

Re: revolve.conf issue??

PostPosted: 2019-03-27 19:03
by Head_on_a_Stick
Munty Scruntfundle wrote:Disable systemd-resolved [corrected]

^ No need to do this, systemd-resolved will *not* modify /etc/resolv.conf unless it is symlinked to one of systemd's provided resolver files, otherwise it merely accepts whatever nameservers are listed in /etc/resolv.conf and continues to provide the resolvectl(1) utility.

Munty Scruntfundle wrote:Why are these 2 additions to debian installed when they both obviously conflict with each other and prohibit you making manual changes on a system that may very well be run headless?

They don't conflict, the behaviour is determined by the presence (or not) of symlinks and their origin.

For the record, NetworkManager can be controlled from the command line and so is suitable for use in headless systems, see nmcli(1) for instructions.

Re: revolve.conf issue??

PostPosted: 2019-03-30 03:00
by tynman
Why are these 2 additions to debian installed when they both obviously conflict with each other and prohibit you making manual changes on a system that may very well be run headless? At the very least turn the damn things off as default? No? Just me?

I assume this refers to the resolve service and to Network-Manager. I think it is worth noting that neither package is installed in Debian by default. If not installed, they don't need to be turned off.