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.
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).
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?
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.
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.