Pi unresponsive after uninstalling pihole & dependancies


I am sure this is not a DHCP related problem…

I had Dietpi v8 running on an R-Pi 4 and just tried to uninstall pi-hole (and its dependancies) via dietpi-software.

  • Pi-hole was running but disabled and not being used.
  • My router is running DHCP and my network is still up and running with internet access etc.
  • I did have unbound installed, but also not active as pi-hole was not active.
  • I also had homeassistant, Homebridge and Tautulli installed.

My process was:

  • I uninstalled pi-hole and then went to uninstall dependancies
  • I uninstalled git - OK
  • I then went to uninstall the next app that was presented to me (I cannot remember what it was called but think it started with (or had “lib” in its name).
  • I clicked yes and shortly after my Pi became unresponsive and my SSH session was terminated.

I have been unable to access my R-Pi by SSH (multiple power cycles) and my router shows it as not connected. The red light is on and after a power cycle, the yellow light flashes quickly a few times and then goes off permanently.

Is there anything I can do to recover by accessing the SD card directly from my Mac or do I need to start again from scratch by flashing a new copy of Dietpi v8?


yes you ran into a trap. You broke your system on network level following the PiHole question to remove dependency. We could try to repair if you are able to connect a screen keyboard.

But your are not alone. We had other uses with same issue. We tried to convince PiHole dev to remove that question, but without success until now.


thanks for you reply.

I did note that the wording was something like “may be a dependancy” but it didn’t mention about being a dependancy for anything else that was critical.

I may be able to link it to a monitor and keyboard though (I was running headless).


So I am able to connect and see my Pi on a monitor when the SD card is not in. When I put* the SD card in and power cycle, I just get a blank screen.


[edit: typo*]

ok there is a way to probably show something. remove the SD card and plug it to a computer where you could access the bootFS. There you should have a cmdline.txt open the file and remove the quiet. Plug back the SD card and power on the RPi.


OK, I removed the quiet but the screen is still blank.

Separately, I flashed a 2nd SD card from new, installed Homeassistant (which is the thing I most want) and got it all running nicely. I then copied my HA config directory across to it (to mnt/dietpi_userdata/homeassistant, including .storage etc) whilst homeassistant wasn’t running and restarted homeassistant. However HA now just hangs. Is there something dumb I have overlooked whilst coping my HA directory across either from the SD card (which I did yesterday) or just now when I copied it back?

I don’t have that much experience to copy HA from one system to another. Are there any logs? And what is the status of the service

systemctl status home-assistant
journalctl -u home-assistant

thanks for your reply. I don’t know what I did but that 2nd SD card is now toast.

This leaves me with my original problem. Should I just re flash it and start again from scratch?

OK, I can see what my problem is.

Having refreshed my SD card from scratch, installing HA and then copying my data back across, HA won’t start because of permission errors.

I’ll reinstall HA (again) from scratch and this time observe those permissions.

Thanks for you help!

try to use copy command with the option to preserve permission or better to use rsync

Thanks, I’ll definitely look into rsync for next time. I’ll be copying to a locally mounted drive then.

OK, so I know that everything in /dietpi/homeassistant/ need to be:

  • Owner/Group “homeassistant” which is 998 and 995
  • The files all need to have have permission 644 and the folders need to have 755.

I know I can use something like chmod -r 644 . but that changes both files and folders. Would I have to do that and then manually change all the folders to 755?

Is chown -R 998:995 . the right one for permissions (assuming I am logged in as root)?

[edit: typo]

[edit 2] well, I’m an idiot! - when I copied all the files back, the file/folder permissions were fine, it was just the UID/GId that was wrong so hopefully chown -R 998:995 . is all I need to do.


chown -R homeassistant:homeassistant /dietpi/homeassistant/
chmod -R 755 /dietpi/homeassistant/

But usually using rsync will copy all permissions as you have it on your backup


…so for my education - chmod -R 755 /dietpi/homeassistant/ would set the files correctly as well or is it simply OK to have 755 for everything?

/dietpi/homeassistant/ is this a symlink? …that directory does not exist.


You, sir, are a scholar and a gentleman!

I used chown -R homeassistant:homeassistant homeassistant/ from within the /mnt/dietpi_userdata directory and itvs now working (phew).

I learned a lot chatting to you and appreciate your patience and guidance (copied below). I would still appreciate answers to my 2 questions (re-copied below) though for my personal learning.

  • chmod -R 755 /dietpi/homeassistant/ would set the files correctly as well or is it simply OK to have 755 for everything?
  • /dietpi/homeassistant/ is this a symlink? …that directory does not exist.

thanks you!

ahhh lol I just copied the directoty names from your post, did not noticed it was incorrect. Of course the correct directory for HA is


having it set to 755 should be ok.

great, thanks for clarifying! :smiley:

yw :sunglasses: