Help,
I somehow totallly f*cked up my Raspberry Pi 4 OS during updating, i now have to do a fresh install.
I have tried anything, the only thing remaining is manually accessing the sd card from my pc.
The question i have is:
Is there a way to save the Pihole Blocklists, configuration and even more important the Whitelist from the sd card ?
Idk, something like copy pasting a file from it to the new install ?
If you were running Pi-hole v6, you can try(this is not guarantee to work) to copy all files from /etc/pihole/. Then install Pi-hole on the new card and copy the original files back to /etc/pihole/.
This (probably) won't work if you were running Pi-hole v5, because the fresh install will create v6 files and the backup will contain v5 files.
Are you trying to access your sd card from a Windows machine?
That would show you only the boot partition.
You'd need to access the Linux partition, preferably from a Linux system.
If you only run Windows, you may be able to access your sc card via WSL, or you may have to install compatible drivers (but that may require you to know the partition as well as filesystem types).
Personally, I found that trying to go the Windows/WSL route to be a pain mostly with USB drives, or MicroSD loaded into a USB adapter, and gave up trying to find a Windows driver that would support a fairly standard Linux file system, like ext4. Spent a good bit of time, kept running into walls, and finally gave up with Windows accessing a Linux partition. Seem to recall I had this working once, and then it would not work.
I created a separate MicroSD for my RPi that can I can easily mount a separate Linux based MicroSD in a USB adapter. Works well, and fewer headaches.
Even if I could somehow get Windows to cooperate, I am not convinced some OS change won’t make a hash of it again.
Get your Raspberry pi 4 running using another SD card, then insert the previous SD card into a USB adaptor, plug into the Pi, and access from the Raspberry Pi.
Windows' disk partition utility won't show you any information for partition types it does not know, apart from acknowledging there is a partition, e.g. for that same sd card:
If Windows would really show the space as free, I'd keep my fingers crossed for you that your partition wasn't deleted or compromised (which apparently didn't happen in your case, as you've succeeded in restoring your system. )