Thankyou for responding, I have tried this temporary fix but it did not work for me. resolv.conf is a symlink file that is updated by network-manager ( another dependency required by the home assistant installer ). Every time I boot the machine resolv.conf in overwritten.
Might be worth lodging an issue on Github then.
man NetworkManager.conf
-
Using the CLI edit
/etc/NetworkManager/NetworkManager.conf
-
Search for the [main] section in this file. It should look something like this:
[main]
dns=default
plugins=keyfile
autoconnect-retries-default=0
rc-manager=file
- Now change dns=default to dns=none just after the [main] tag like this:
[main]
dns=none
plugins=keyfile
autoconnect-retries-default=0
rc-manager=file
- Save the file and restart NetworkManager.service:
sudo systemctl restart NetworkManager.service
- Edit
resolv.conf
and add the DNS-server of your choice.
Next time you reboot your /etc/resolv.conf file will not get updated when using nm (network-manager).
Hope this helps.
Thank you, I will give it a bash ( pun intended ) tonight to see if permanently setting resolv.conf file to a set name server will solve the internet issue. I have done 3 or 4 installs, only my first time around did editing resolv.conf help the internet issue until I rebooted of course.
Also make sure you have disabled IPv6 withHA if your LAN is on IPv4 only:
HA → Settings → System → Network → Configure network interfaces: IPv6 → Disable
Thankyou for your suggestion regarding the IPV6. After I finally got home assistant installed ( solution below ) my internet die again just after home assistant loaded fully and before I was able to log into the GUI. I disabled IPV6 and stopped and started systemd-resolved and now everything is working, even after multiple reboots.
I have had heaps of trouble getting Home Assistant Supervised installed on an old laptop. The only solution that work for me was provided by @snakuzzo over at github ( Bug Report: Problems with systemd-resolved in 1.5.0 · Issue #304 · home-assistant/supervised-installer · GitHub ).
When I first saw his solution I had high hopes as it actually addresses the cause of the problem, systemd-resolved.
Here was his solution :-
"when you install systemd-resolved, it doesn’t work fine using stub listener (default option). If you disable stub listener, using another DNS server, it works fine.
So…to bypass the issue…
sudo apt install systemd-resolved
At this time, this breaks name resolution…
sudo nano /etc/systemd/resolved.conf
Uncomment this lines with no stub listener and your DNS server (eg. your router address):
DNS=192.168.1.1
DNSStubListener=no
Save and restart systemd-resolved
sudo systemctl restart systemd-resolved
Now check name resolution and go on with installation
This is the solution that worked for me!!
My Error
E: Unable to locate package systemd-resolved
Show us the output of:
sudo cat /etc/apt/sources.list
Well, this guide is for HA Supervised using Debian 12 (but not Ubuntu). Sorry, I cant help you with this one
Please note THIS and THIS. You wont be able to install HA Supervised on any other OS than Debian 11 (obsolete soon) and Debian 12 (future proof).
OK I’m reinstalling Debian 12
@Tamsy This is my Debian, I can’t update any packages right now
ngocdung@Linix:~$ sudo cat /etc/apt/sources.list
#deb cdrom:[Debian GNU/Linux 12.1.0 _Bookworm_ - Official amd64 NETINST with firmware 20230722-10:48]/ bookworm main non-free-firmware
deb http://deb.debian.org/debian/ bookworm main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware
# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main non-free-firmware
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
You might try adding main
and contrib
before non-free-firmware
My [working] sources.list:
# deb cdrom:[Debian GNU/Linux 11.3.0 _Bullseye_ - Official amd64 DVD Binary-1 20220326-11:23]/ bookworm contrib main
# deb cdrom:[Debian GNU/Linux 11.3.0 _Bullseye_ - Official amd64 DVD Binary-1 20220326-11:23]/ bookworm contrib main
deb http://deb.debian.org/debian/ bookworm main
deb-src http://deb.debian.org/debian/ bookworm main
deb http://security.debian.org/debian-security bookworm-security main contrib
deb-src http://security.debian.org/debian-security bookworm-security main contrib
# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main contrib
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib
Blockquote
I fixed it like you, but the error still exists
What’s the error you get?
ngocdung@Linix:~$ sudo apt update -y && sudo apt upgrade
Ign:1 http://security.debian.org/debian-security bookworm-security InRelease
Ign:2 http://deb.debian.org/debian bookworm InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:1 http://security.debian.org/debian-security bookworm-security InRelease
Ign:2 http://deb.debian.org/debian bookworm InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:1 http://security.debian.org/debian-security bookworm-security InRelease
Ign:2 http://deb.debian.org/debian bookworm InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Try
sudo apt-get --allow-releaseinfo-change update
ngocdung@Linix:~$ sudo apt-get --allow-releaseinfo-change update
Ign:1 http://deb.debian.org/debian bookworm InRelease
Ign:2 http://security.debian.org/debian-security bookworm-security InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:2 http://security.debian.org/debian-security bookworm-security InRelease
Ign:1 http://deb.debian.org/debian bookworm InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:2 http://security.debian.org/debian-security bookworm-security InRelease
Ign:1 http://deb.debian.org/debian bookworm InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Err:2 http://security.debian.org/debian-security bookworm-security InRelease
But you have a connection? Does ping security.debian.org
work?
ngocdung@Linix:~$ ping security.debian.org
ping: security.debian.org: Temporary failure in name resolution
ngocdung@Linix:~$ ping google.com
ping: google.com: Temporary failure in name resolution