Thank you for providing and continuously updating Pi-hole. Things have been great until the below issue updating FTL via pihole -up command. Any help with this is appreciated, but I understand it is not a priority.
Expected Behaviour:
Expect pihole -up to complete update of FTL to latest version
Actual Behaviour:
pi@raspberrypi:~ $ pihole -v
Pi-hole version is v5.2.4 (Latest: v5.2.4)
AdminLTE version is v5.3 (Latest: v5.3.1)
FTL version is v5.3.4 (Latest: v5.5.1)
pi@raspberrypi:~ $ pihole -up
[i] Checking for updates...
[i] Pi-hole Core: up to date
error: unknown object type 0 at offset 507018 in .git/objects/pack/pack-e6b628bd60042e4ab0c8964479202d09117f98e3.pack
fatal: packed object ee7edb5fabb207beaa77b4bc86ba1c79aaa55afd (stored in .git/objects/pack/pack-e6b628bd60042e4ab0c8964479202d09117f98e3.pack) is corrupt
fatal: the remote end hung up unexpectedly
[i] Web Interface: up to date
[i] FTL: update available
[i] FTL out of date, it will be updated by the installer.
[✓] Root user check
[✗] Update local cache of available packages
Error: Unable to update package cache. Please try "apt-get update"
Unable to complete update, please contact Pi-hole Support
Debug Token:
pihole -d
/opt/pihole/piholeDebug.sh: line 1: syntax error near unexpected token (' /opt/pihole/piholeDebug.sh: line 1: c!?uSr▒bXleN6 bps('
Try this to check and potentially fix your local Git version:
cd /etc/.pihole
sudo git status
If the local repository is corrupt, these commands will remove it and replace it with fresh (the nuclear option). Back up your Pi-hole settings with the teleporter (admin GUI > Settings) just in case you end up having to do a more extensive repair (like a reinstall).
Status looks okay. I've created a backup (good call), should I run the commands to rebuild (the nuclear option)?
pi@raspberrypi:/etc/.pihole $ sudo git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
Ok, no worries - really appreciate the speedy reply! This was a vanilla install just a few weeks ago, would like to fix it but can always reinstall if needed. Thanks again!
Honestly, looks like you're suffering some file system issues, given the object corrupt message from the .git directory, and the garbage output from running the debug script.
What hardware is this running on? If it is a Raspberry Pi, make sure the power supply you are using is rated for the device, as not having enough power/amperage can cause corruptions like this.
Edit, the output of git status suggests modified files - assuming you've not made any local changes?
It’s running on a raspberry pi zero w. Initial install was done using a micro usb cable for power, I’ve since purchased a dedicated raspberry pi power source.
Given all the corruption issues and errors would it be best to make a new install with new micro sd card? Sounds like best path.
Yeah, I think this is probably the sanest option at this stage - if there are corruptions there - there could be corruptions in any number of places on the SD card. A re-flash will sort it out.
Had a new RaspberryPi ZeroW and 16gb micro SD card. Rebuilt pihole using the dedicated power supply, back up and running. Appreciate all the help and it was quick to rebuild.