No Wi-Fi or raspi-config after uninstall

Expected Behaviour:

Installing and uninstalling Pihole should leave Pi in same state it was in before starting.

  • Raspian
  • RaspberryPi 4

Actual Behaviour:

Uninstaller asks questions which were not poised during install. Only when I reached "uninstall git?" did I think that something was up.

I now have no WiFi connection nor even raspi-config command available anymore.

Debug Token:

N/A - pihole not installed anymore

Dump of Potentially Useful Info

cat /etc/resolve.conf

nameserver 8.8.8.8

I changed this manually as it was 127.... after pihole uninstall.

iwconfig

lo       no wireless extensions.
wlan0    IEEE 802.11   ESSID:off/any
         Mode:Managed   Access Point: Not-Associated   Tx-Power=31 dBm
         Rety short limit:7    RTS thr:off    Fragment thr:off
         Power Management:on

eth0     no wireless extensions.

/etc/resolv.conf is managed by the system, I suspect that /etc/dhcpcd.conf was modified or you selected to remove dhcpcd5.

The uninstaller is in need of work but it does tell you to verify if a package should be removed in the start of the process. We can not know if a Pi-hole installed package or a Pi-hole dependency is safe to remove or not, that's a decision you have to make when presented with the option to remove a package.

Thanks Dan

I have seen recommendations to remove dhcpcd5 so I have. Source: Ubuntu network broken after Pi-hole uninstall - SOLVED - #3 by deHakkelaar

I'm down a bit of a rabbit hole here. Quite interested to try and rectify without LAN (means moving Pi, monitor, keyboard, mouse up to the router where ethernet is available) or flashing (kinda boring and we don't learn anything.

This issue is quite unlike any other I have read. I particuarly cannot fathom why raspi-config is no longer available. Surely that is not a prerequisite?

Any tips on what should be in /etc/dhcpcd.conf?

Here is an example of such a file on a Pi 3B+ running Buster.

cat /etc/dhcpcd.conf

# A sample configuration for dhcpcd. See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private

# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1


interface eth0
    static ip_address=192.168.0.155/24
    static routers=192.168.0.1
    static domain_name_servers=127.0.0.1

That package is how Raspbian handles IP addressing. Removing it from Ubuntu is okay, removing it from Raspbian is gutting the network stack.

OK Dan, I have internet back now. I threw an awful lot of commands so would be difficult to say exactly what the issue was.

I had re-installed dhcpcd5 previously but had no effect that time. This time is was the final piece of the puzzle.

apt-get install raspi-config got the confiuration tool back. Based on the log output that may have had something to do with whiptail being removed.

Here is a log of the commands I had built up whilst trying to resolve without dhcpc5 installed:

sudo ifconfig wlan0 down
sudo rfkill unblock wifi
iwconfig wlan0 essid "TheInternetSSID"
iwconfig wlan0 ap any
ifconfig wlan0 up
sudo ifconfig wlan0 up

When desperation was high I actually tried to migrate to systemd-networkd and ran these commands:

mkdir -p /var/log/journal
systemd-tmpfiles --create --prefix /var/log/journal
systemctl mask networking.service
systemctl mask dhcpcd.service
mv /etc/network/interfaces /etc/network/interfaces~
sed -i '1i resolveconf=NO' /etc/resolveconf.conf
systemctl enable systemd-networkd.service
systemctl enable systemd-resolved.service
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

After all that dhcpcd5 and reboot was all I needed.

The difficulty is that we don't know what you want to uninstall.

Let's take the git package for example. Pi-hole needs git, so it's a dependency. We don't know if it was previously installed prior to Pi-hole or if it was installed with Pi-hole. We don't know if you want to remove Pi-hole and keep git for another use, or if you want to remove all packages that Pi-hole uses. So we ask for every package that we may have interacted with and leave it to the system admin to decide if they want to keep or remove. It's not a simple operation nor something that can be scripted away from the system admin.

I get that.

It's also something I've never come across in my experience.

YAGNI is what some might say.

It's noble to remove what you potentially added. Is it a battle worth being involved with? I see you are having the same conversation elsewhere, for a few years: Uninstalling Pi-hole removes (?) rsync · Issue #1605 · pi-hole/pi-hole · GitHub

I don't understand what you are saying.

If you didn't ask the questions during uninstall. Either:

A: Someone who cares looks up the documentation and figures out what was installed and works to remove the dependencies.

B: Someone who doesn't care, isn't burnt.

Either way, you don't have to work on something which might not be missed. For me it was like the "Have you read the T&Cs?" type question on install. You click "Yes". Has anyone actually read it, of course not. Equally I didn't know what whiptail was, cognetively I wasn't prepared for such an implication. I hadn't considered that the installer might remove something which was already present before I'd even started.

What would be your ideal solution then?

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.