Cannot install Pi-Hole

That rules out DHCP lease renewal as a cause for the rewrite.
I'm out of ideas as to what's causing this...

As another attempt ot preserve a public DNS server during installation, you could try altering resolvconf's default settings:

 sudo nano /etc/resolvconf/resolv.conf.d/head
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8

Exit with saving, then restart resolvconf:

sudo systemctl restart resolvconf.service

Check contents of resolv.conf to verify this worked:

cat /etc/resolv.conf

To be sure, reboot your Pi-hole machine and double check.
If your public DNS server is still present in resolv.conf, you're ready to retry Pi-hole's installation script again.

EDIT:
Don't forget to remove your public DNS server from /etc/resolvconf/resolv.conf.d/head once you're done.

3 Likes