I'm having the same problem, any changes in the web gui aren't saved. Not changes in the whitelist/blacklist, nor changes in the settings..
I thought I'd give you a debug to read but pihole -d gives me the following error:
"./pihole: line 60: /opt/pihole/piholeDebug.sh: No such file or directory"
I've run pihole -r, it runs fine and installs everything but I have to reboot afterwards to make it start..
Any ideas? I've searched google and answers here, but nothing have worked so far..
I'm not using dietpi, just raspbian. I'd rather not reset the memory stick and start over since I have a couple of other applications set up..
Thanks, try running pihole -r and then check the /opt/pihole directory again, there should be a handful of files there. Then reboot and check that directory again. It sounds like your SD card may have gone in to read-only mode, are other files that change on the Pi saved over reboots, or do they reset and miss changes?
Also, we can look at the output from: mount | grep "(ro" to see if there are any partitions that have been mounted as read only.
Thanks for your help! No the sd-card doesn't seem to be in a read-only state; I've tested creating text files and they still exists after a reboot. I'm using the pi for a couple of other applications that are working as they should
The pihole application has been updated a couple of times, I had it even before it was possible to whitelist/blacklist in the gui. I don't think I ever have gotten that functionality to work - it's now lately I started trying it out
mount | grep "(ro" gives the following result:
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
I created the opt/pihole folder myself and then started pihole -r . This is what I see in the command prompt:
:::
::: You are root.
::: Verifying free disk space...
:::
::: Updating local cache of available packages... done!
:::
::: Checking apt-get for upgraded packages.... done!
:::
::: Your system is up to date! Continuing with Pi-hole installation...
::: Checking for apt-utils... installed!
::: Checking for debconf... installed!
::: Checking for dhcpcd5... installed!
::: Checking for git... installed!
::: Checking for iproute2... installed!
::: Checking for whiptail... installed!
:::
::: Stopping dnsmasq service... done.
:::
::: Stopping lighttpd service... done.
::: Using Google DNS servers.
::: Static IP already configured
::: IPv4 address: 192.168.0.[xxx]/24
::: IPv6 address:
::: Web Interface On.
::: Logging On.
::: --reconfigure passed to install script. Not downloading/updating local repos
::: Checking for bc... installed!
::: Checking for cron... installed!
::: Checking for curl... installed!
::: Checking for dnsmasq... installed!
::: Checking for dnsutils... installed!
::: Checking for iputils-ping... installed!
::: Checking for lsof... installed!
::: Checking for netcat... added to install list!
::: Checking for sudo... installed!
::: Checking for unzip... installed!
::: Checking for wget... installed!
::: Checking for lighttpd... installed!
::: Checking for php5-common... installed!
::: Checking for php5-cgi... installed!
... and then nothing more happens - and the web gui for pihole stops working.. But if I reboot it starts working again and the gui shows I have Pi-hole Version v2.13.1 Web Interface Version v2.5.1 installed..
Okay, it looks like you have the repository code from the current version, but the running version is a rather old one. If you haven't customized the Pi-hole install much, I would suggest a fresh install to make sure all the old code is gone and the new stuff is installed.
That will print a whole lot of stuff to the terminal, but we want to see mostly whats at the end before the script reports an error or fails to complete.
And lets check that, it's actually a different Contact Support error than before, the first one was a failure to clone and the second one is a failure to update. I'm wondering if you have a connection issue with the git pull.
But if you could, let's go back to a fresh start and do a verbose install.
Yes I think you're right with my problem being caused by connectivity issues; if I try to ping google after a fresh reboot it's working fine.. Then if I try installing pihole and it stops with the error message I can't ping google anymore ("unknown host google.com") until I reboot..
Here is the whole installation verbose: (I've changed the last numbers of the local ip adress to "xxx", super haxzor safety ;))
+ set -e
+ tmpLog=/tmp/pihole-install.log
+ instalLogLoc=/etc/pihole/install.log
+ setupVars=/etc/pihole/setupVars.conf
+ lighttpdConfig=/etc/lighttpd/lighttpd.conf
+ webInterfaceGitUrl=https://github.com/pi-hole/AdminLTE.git
+ webInterfaceDir=/var/www/html/admin
+ piholeGitUrl=https://github.com/pi-hole/pi-hole.git
+ PI_HOLE_LOCAL_REPO=/etc/.pihole
+ PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)
+ PI_HOLE_INSTALL_DIR=/opt/pihole
+ useUpdateVars=false
+ IPV4_ADDRESS=
+ IPV6_ADDRESS=
+ QUERY_LOGGING=true
+ INSTALL_WEB=true
++ stty size
++ echo 24 80
+ screen_size='24 80'
++ awk '{print $1}'
++ echo '24 80'
+ rows=24
++ echo '24 80'
++ awk '{print $2}'
+ columns=80
+ r=12
+ c=40
+ r=20
+ c=70
+ skipSpaceCheck=false
+ reconfigure=false
+ runUnattended=false
+ [[ '' != true ]]
+ main
+ echo :::
:::
+ [[ 0 -eq 0 ]]
+ echo '::: You are root.'
::: You are root.
+ distro_check
+ command -v apt-get
+ PKG_MANAGER=apt-get
+ UPDATE_PKG_CACHE='apt-get update'
+ PKG_INSTALL=(${PKG_MANAGER} --yes --no-install-recommends install)
+ PKG_COUNT='apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+ apt-get install --dry-run iproute2
+ iproute_pkg=iproute2
+ apt-get install --dry-run php
+ phpVer=php5
+ INSTALLER_DEPS=(apt-utils debconf dhcpcd5 git ${iproute_pkg} whiptail)
+ PIHOLE_DEPS=(bc cron curl dnsmasq dnsutils iputils-ping lsof netcat sudo unzip wget)
+ PIHOLE_WEB_DEPS=(lighttpd ${phpVer}-common ${phpVer}-cgi)
+ LIGHTTPD_USER=www-data
+ LIGHTTPD_GROUP=www-data
+ LIGHTTPD_CFG=lighttpd.conf.debian
+ DNSMASQ_USER=dnsmasq
+ [[ -f /etc/pihole/setupVars.conf ]]
+ [[ false == true ]]
+ verifyFreeDiskSpace
+ echo '::: Verifying free disk space...'
::: Verifying free disk space...
+ local required_free_kilobytes=51200
++ df -Pk
++ grep -m1 '\/$'
++ awk '{print $4}'
+ local existing_free_kilobytes=12524148
+ [[ 12524148 =~ ^([0-9])+$ ]]
+ [[ 12524148 -lt 51200 ]]
+ update_package_cache
+ echo :::
:::
+ echo -n '::: Updating local cache of available packages...'
::: Updating local cache of available packages...+ eval apt-get update
+ echo ' done!'
done!
+ notify_package_updates_available
+ echo :::
:::
+ echo -n '::: Checking apt-get for upgraded packages....'
::: Checking apt-get for upgraded packages....++ eval 'apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+++ apt-get -s -o Debug::NoLocking=true upgrade
+++ grep -c '^Inst'
+++ true
+ updatesToInstall=0
+ echo ' done!'
done!
+ echo :::
:::
++ uname -r
+ [[ -d /lib/modules/4.4.50-v7+ ]]
+ [[ 0 -eq 0 ]]
+ echo '::: Your system is up to date! Continuing with Pi-hole installation...'
::: Your system is up to date! Continuing with Pi-hole installation...
+ install_dependent_packages 'INSTALLER_DEPS[@]'
+ argArray1=("${!1}")
+ declare -a argArray1
+ declare -a installArray
+ command -v debconf-apt-progress
+ for i in '"${argArray1[@]}"'
+ echo -n '::: Checking for apt-utils...'
::: Checking for apt-utils...+ dpkg-query -W '-f=${Status}' apt-utils
+ grep 'ok installed'
+ echo ' installed!'
installed!
+ for i in '"${argArray1[@]}"'
+ echo -n '::: Checking for debconf...'
::: Checking for debconf...+ dpkg-query -W '-f=${Status}' debconf
+ grep 'ok installed'
+ echo ' installed!'
installed!
+ for i in '"${argArray1[@]}"'
+ echo -n '::: Checking for dhcpcd5...'
::: Checking for dhcpcd5...+ dpkg-query -W '-f=${Status}' dhcpcd5
+ grep 'ok installed'
+ echo ' installed!'
installed!
+ for i in '"${argArray1[@]}"'
+ echo -n '::: Checking for git...'
::: Checking for git...+ dpkg-query -W '-f=${Status}' git
+ grep 'ok installed'
+ echo ' installed!'
installed!
+ for i in '"${argArray1[@]}"'
+ echo -n '::: Checking for iproute2...'
::: Checking for iproute2...+ dpkg-query -W '-f=${Status}' iproute2
+ grep 'ok installed'
+ echo ' installed!'
installed!
+ for i in '"${argArray1[@]}"'
+ echo -n '::: Checking for whiptail...'
::: Checking for whiptail...+ dpkg-query -W '-f=${Status}' whiptail
+ grep 'ok installed'
+ echo ' installed!'
installed!
+ [[ 0 -gt 0 ]]
+ return 0
+ checkSelinux
+ command -v getenforce
+ [[ false == false ]]
+ welcomeDialogs
+ whiptail --msgbox --backtitle Welcome --title 'Pi-hole automated installer' '\n\nThis installer will transform your device into a network-wide ad blocker!' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations: http://pi-hole.net/donate' 20 70
+ whiptail --msgbox --backtitle 'Initiating network interface' --title 'Static IP Needed' '\n\nThe Pi-hole is a SERVER so it needs a STATIC IP ADDRESS to function properly.
In the next section, you can choose to use your current network settings (DHCP) or to manually edit them.' 20 70
+ mkdir -p /etc/pihole/
+ stop_service dnsmasq
+ echo :::
:::
+ echo -n '::: Stopping dnsmasq service...'
::: Stopping dnsmasq service...+ command -v systemctl
+ systemctl stop dnsmasq
+ echo ' done.'
done.
+ [[ true == true ]]
+ stop_service lighttpd
+ echo :::
:::
+ echo -n '::: Stopping lighttpd service...'
::: Stopping lighttpd service...+ command -v systemctl
+ systemctl stop lighttpd
+ echo ' done.'
done.
+ get_available_interfaces
++ ip -o link
++ awk '{print $2}'
++ grep -v 'state DOWN\|lo'
++ cut -d: -f1
++ cut -d@ -f1
+ availableInterfaces=eth0
+ chooseInterface
+ interfacesArray=()
+ local interfacesArray
+ local interfaceCount
+ local chooseInterfaceCmd
+ local chooseInterfaceOptions
+ local firstLoop=1
++ wc -l
++ echo eth0
+ interfaceCount=1
+ [[ 1 -eq 1 ]]
+ PIHOLE_INTERFACE=eth0
+ setDNS
+ local DNSSettingsCorrect
+ DNSChooseOptions=(Google "" OpenDNS "" Level3 "" Norton "" Comodo "" DNSWatch "" Custom "")
++ whiptail --separate-output --menu 'Select Upstream DNS Provider. To use your own, select Custom.' 20 70 6 Google '' OpenDNS '' Level3 '' Norton '' Comodo '' DNSWatch '' Custom ''
+ DNSchoices=Google
+ case ${DNSchoices} in
+ echo '::: Using Google DNS servers.'
::: Using Google DNS servers.
+ PIHOLE_DNS_1=8.8.8.8
+ PIHOLE_DNS_2=8.8.4.4
+ use4andor6
+ local useIPv4
+ local useIPv6
+ cmd=(whiptail --separate-output --checklist "Select Protocols (press space to select)" ${r} ${c} 2)
+ options=(IPv4 "Block ads over IPv4" on IPv6 "Block ads over IPv6" on)
++ whiptail --separate-output --checklist 'Select Protocols (press space to select)' 20 70 2 IPv4 'Block ads over IPv4' on IPv6 'Block ads over IPv6' on
+ choices='IPv4
IPv6'
+ for choice in '${choices}'
+ case ${choice} in
+ useIPv4=true
+ for choice in '${choices}'
+ case ${choice} in
+ useIPv6=true
+ [[ -n true ]]
+ find_IPv4_information
+ local route
++ ip route get 8.8.8.8
+ route='8.8.8.8 via 192.168.0.xxx dev eth0 src 192.168.0.xxx
cache '
++ awk '{for (i=1; i<=NF; i++) if ($i~/dev/) print $(i+1)}'
+ IPv4dev=eth0
++ awk '{print $7}'
+ IPv4bare=192.168.0.xxx
++ ip -o -f inet addr show
++ grep 192.168.0.xxx
++ awk 'END {print}'
++ awk '{print $4}'
+ IPV4_ADDRESS=192.168.0.xxx/24
++ awk '{print $3}'
+ IPv4gw=192.168.0.1
+ getStaticIPv4Settings
+ local ipSettingsCorrect
+ whiptail --backtitle 'Calibrating network interface' --title 'Static IP Address' --yesno 'Do you want to use your current network settings as a static address?
IP address: 192.168.0.xxx/24
Gateway: 192.168.0.xxx' 20 70
+ whiptail --msgbox --backtitle 'IP information' --title 'FYI: IP Conflict' 'It is possible your router could still try to assign this IP to a device, which would cause a conflict. But in most cases the router is smart enough to not do that.
If you are worried, either manually set the address, or modify the DHCP reservation pool so it does not include the IP you want.
It is also possible to use a DHCP reservation, but if you are going to do that, you might as well set a static address.' 20 70
+ setStaticIPv4
+ local IFCFG_FILE
+ local IPADDR
+ local CIDR
+ [[ -f /etc/dhcpcd.conf ]]
+ grep -q 192.168.0.xxx/24 /etc/dhcpcd.conf
+ echo '::: Static IP already configured'
::: Static IP already configured
+ [[ -n true ]]
+ useIPv6dialog
++ ip -6 route get 2001:4860:4860::8888
++ grep -v unreachable
++ awk -F ' ' '{ for(i=1;i<=NF;i++) if ($i == "src") print $(i+1) }'
+ IPV6_ADDRESS=
+ [[ ! -z '' ]]
+ echo '::: IPv4 address: 192.168.0.xxx/24'
::: IPv4 address: 192.168.0.xxx/24
+ echo '::: IPv6 address: '
::: IPv6 address:
+ '[' '!' true ']'
+ setAdminFlag
+ local WebToggleCommand
+ local WebChooseOptions
+ local WebChoices
+ WebToggleCommand=(whiptail --separate-output --radiolist "Do you wish to install the web admin interface?" ${r} ${c} 6)
+ WebChooseOptions=("On (Recommended)" "" on Off "" off)
++ whiptail --separate-output --radiolist 'Do you wish to install the web admin interface?' 20 70 6 'On (Recommended)' '' on Off '' off
+ WebChoices='On (Recommended)'
+ case ${WebChoices} in
+ echo '::: Web Interface On.'
::: Web Interface On.
+ INSTALL_WEB=true
+ setLogging
+ local LogToggleCommand
+ local LogChooseOptions
+ local LogChoices
+ LogToggleCommand=(whiptail --separate-output --radiolist "Do you want to log queries?\n (Disabling will render graphs on the Admin page useless):" ${r} ${c} 6)
+ LogChooseOptions=("On (Recommended)" "" on Off "" off)
++ whiptail --separate-output --radiolist 'Do you want to log queries?\n (Disabling will render graphs on the Admin page useless):' 20 70 6 'On (Recommended)' '' on Off '' off
+ LogChoices='On (Recommended)'
+ case ${LogChoices} in
+ echo '::: Logging On.'
::: Logging On.
+ QUERY_LOGGING=true
+ clone_or_update_repos
+ [[ false == true ]]
+ getGitFiles /etc/.pihole https://github.com/pi-hole/pi-hole.git
+ local directory=/etc/.pihole
+ local remoteRepo=https://github.com/pi-hole/pi-hole.git
+ echo :::
:::
+ echo '::: Checking for existing repository...'
::: Checking for existing repository...
+ is_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local curdir
+ local rc
+ curdir=/home/pi
+ [[ -d /etc/.pihole ]]
+ rc=1
+ cd /home/pi
+ return 1
+ make_repo /etc/.pihole https://github.com/pi-hole/pi-hole.git
+ local directory=/etc/.pihole
+ local remoteRepo=https://github.com/pi-hole/pi-hole.git
+ echo -n '::: Cloning https://github.com/pi-hole/pi-hole.git into /etc/.pihole...'
::: Cloning https://github.com/pi-hole/pi-hole.git into /etc/.pihole...+ [[ -d /etc/.pihole ]]
+ git clone -q --depth 1 https://github.com/pi-hole/pi-hole.git /etc/.pihole
+ return 128
+ echo 'Unable to clone repository, please contact support'
Unable to clone repository, please contact support
+ exit 1
Now I feel really stupid; after a good nights sleep I realized I had setup my router to automatically push out my pihole as the only dns server for all clients and that meant the pi itself was setup with it. So as soon as the pihole intallataion started and pihole was shut down, the pi lost its internet connection and of course couldn't connect to the git repository.....
When I updated the dns settings for the pi the installation script worked perfectly and now everything works perfectly
This was of course impossible for you to debug so please forgive me for taking up your time. Thanks for all your help, I will of course donate for this project. Keep up the great work!