Welcome! Log In Create A New Profile

Advanced

Howto: install Pi-hole 6.x on Dockstar/Debian 12.x

Posted by rsinklair 
Howto: install Pi-hole 6.x on Dockstar/Debian 12.x
June 16, 2025 12:50PM
Pi-hole seem to have withdrawn support for armv5 when they released Pi-hole v6, so we need to manually build the pihole-FTL binary in order to use Pi-hole on Seagate Dockstar , or other armv5 devices.

The following was done on a fresh install of the standard kirkwood build downloaded from this wiki ( Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2 ).

First, make sure you have at least 256MB of swap (v. important during compilation of pihole-FTL). I used 512MB.
- see instructions elsewhere on this Wiki on how to add a swapfile : https://forum.doozan.com/read.php?2,133753

Second step, download and build pihole-FTL, as per instructions at https://docs.pi-hole.net/ftldns/compile/
sudo apt install git wget ca-certificates build-essential libgmp-dev m4 cmake libidn2-dev libunistring-dev libreadline-dev xxd

# build nettle:
wget https://ftp.gnu.org/gnu/nettle/nettle-3.9.1.tar.gz
tar -xzf nettle-3.9.1.tar.gz
cd nettle-3.9.1
./configure --libdir=/usr/local/lib --enable-static --disable-shared --disable-openssl --disable-mini-gmp -disable-gcov --disable-documentation
make -j $(nproc)
sudo make install
# build libmbedtls
wget https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v3.5.0.tar.gz -O mbedtls-3.5.0.tar.gz
tar -xzf mbedtls-3.5.0.tar.gz
cd mbedtls-3.5.0
sed -i '/#define MBEDTLS_THREADING_C/s*^//**g' include/mbedtls/mbedtls_config.h
sed -i '/#define MBEDTLS_THREADING_PTHREAD/s*^//**g' include/mbedtls/mbedtls_config.h
make -j $(nproc)
sudo make install
# build FTL
git clone https://github.com/pi-hole/FTL.git  
cd FTL
If you run build.sh at this point , you are likely to find that it uses increasing amounts of swap, starts thrashing and eventually dies with a segmentation fault after an hour and a half :
[ 38%] Building C object src/database/CMakeFiles/sqlite3.dir/sqlite3.c.o
{standard input}: Assembler messages:
{standard input}: Internal error (Segmentation fault).
Please report this bug.
gmake[2]: *** [src/database/CMakeFiles/sqlite3.dir/build.make:90: src/database/CMakeFiles/sqlite3.dir/sqlite3.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:685: src/database/CMakeFiles/sqlite3.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
After several hours of trial, error and investigation on how to reduce memory usage during compilation using gcc's -Ox flags, I noticed that the gcc optimisations are controlled by $CMAKE_BUILD_TYPE , and this was set by default to "RelWithDebInfo", i.e with bloaty Debug info

So we need to edit FTL/src/CMakeLists.txt, and change the CMake build type to "Release" :
...
#set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "" FORCE)
       #set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING "" FORCE)
        set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
(I also tried using MinSizeRel, but compilation failed & exited as soon as there were any compiler Warnings at all ..
./build.sh install
It now built FTL in about an hour :)


Third Step: Run the pi-hole installation script.
But before we run it, we need to edit it so that it doesn't get confused when it finds an armv5tel version of the pihole-FTL executable already built:

Download the install script :
wget -O basic-install.sh https://install.pi-hole.net

edit basic-install.sh and make two edits :
.. first mod: add an additional check to permit armv5 :
# added the following 4 lines for dockstar robin 13jun2025
        elif [[ "${rev}" -eq 5 ]]; then
            # If ARMv5 is found (e.g., dockstar )
            printf "%b  %b Detected ARMv5 architecture\\n" "${OVER}" "${TICK}"
            l_binary="pihole-FTL-armv5snotdead"
        else
            # Otherwise, Pi-hole does not support this architecture
            printf "%b  %b This processor architecture is not supported by Pi-hole (%s)\\n" "${OVER}" "${CROSS}" "${cpu_arch}"
            l_binary=""
.. second mod: comment out 7 lines performing checksum check :
# commented this checksum check when building local FTL robin 13jun2025
    #if [[ ! "${remoteSha1}" =~ ^[a-f0-9]{40}$ ]]; then
    #    printf "  %b Remote checksum not available, trying to redownload...\\n" "${CROSS}"
    #    return 0
    #elif [[ "${remoteSha1}" != "${localSha1}" ]]; then
    #    printf "  %b Remote binary is different, downloading...\\n" "${CROSS}"
    #    return 0
    #fi

Now run the the install script: it should run through all the additional installation tasks, such as downloading blacklists, adding domains to the gravity database; creating cron jobs etc.
$ bash basic-install.sh

run 'pihole setpassword ', then connect to your pihole web-console using a web browser, http://yourhostname/admin/ and make sure all looks OK , especially that it shows Status='Active' at top-left, and tens of thousands of 'Domains On Lists' in the green box at top-right of the Dashboard.

Note: my dashboard was initially showing 'Error: -2' in the green 'Domains On Lists' box : I had to manually run 'pihole -g' to update gravity db to fix this.



Edited 2 time(s). Last edit at 06/16/2025 12:58PM by rsinklair.
Re: Howto: install Pi-hole 6.x on Dockstar/Debian 12.x
June 16, 2025 04:25PM
Up in the Wiki. Thanks!

Quote

Home Automation & Tools

X10
CALDav Calendar Server using Radicale
Pogoplug Network Stack with PiHole: pics, and description
Pi-hole on Pogoplug Mobile
Pi-hole on Pogoplug Pro V3 (OXNAS)
Pi-hole 5.0 ad-blocker on Seagate Dockstar
Pi-hole 6.x ad-blocker on Seagate Dockstar/Debian 12.x

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: