<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Howto: pi-hole ad-blocker on Seagate Dockstar</title>
        <description> In case this is useful for anyone else, here&amp;#039;s my notes on 

How to install pi-hole 5.0 on Seagate Dockstar running Debian 10  
---------------------------------------------------------

This was performed on a fresh install of the standard install ( Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2  )

install curl:  

# apt install curl


Download pi-hole installscript. But first, install latest ca-certificates if you don&amp;#039;t have them , otherwise curl refuses to connect to some https sites

# apt install ca-certificates

# curl -sSL https://install.pi-hole.net &amp;gt; pihole-basic-install.sh


Note: had to edit the install script to change &amp;#039;binary&amp;#039; to &amp;#039;l_binary&amp;#039; on one line in pihole-basic-install.sh, as otherwise it exited during the &amp;#039;FTL Checks&amp;#039; section -
   
...
 	 	printf &amp;quot;%b  %b Detected ARM architecture\\n&amp;quot; &amp;quot;${OVER}&amp;quot; &amp;quot;${TICK}&amp;quot;
     		# set the binary to be used
     --&amp;gt;        l_binary=&amp;quot;pihole-FTL-arm-linux-gnueabi&amp;quot;
    ...


# bash pihole-basic-install.sh

The install script runs through lots of checks, asks you some questions, then downloads lighttpd, php, dnsmasq etc

....
...
   FTL Checks...

  [â] Detected ARM architecture
   Checking for existing FTL binary...
  [â] Downloading and Installing FTL
  [â] Installing scripts from /etc/.pihole

   Installing configs from /etc/.pihole...
  [â] No dnsmasq.conf found... restoring default dnsmasq.conf...
...
.....
  [â] Swapping databases
   Number of gravity domains: 87259 (84818 unique domains)
   Number of exact blacklisted domains: 0
   Number of regex blacklist filters: 0
   Number of exact whitelisted domains: 0
   Number of regex whitelist filters: 0
  [â] pihole-FTL: no process found
  [â] Cleaning up stray matter
  [â] Restarting DNS server

  [â] DNS service is NOT running
/opt/pihole/updatecheck.sh: line 77: /usr/bin/pihole-FTL: No such file or directory
/opt/pihole/updatecheck.sh: line 91: /usr/bin/pihole-FTL: No such file or directory
   Web Interface password: xxxx
   This can be changed using &amp;#039;pihole -a -p&amp;#039;

   View the web interface at http://pi.hole/admin or http://192.168.17.39/admin

   You may now configure your devices to use the Pi-hole as their DNS server
   Pi-hole DNS (IPv4): 192.168.17.39
   If you set a new IP address, please restart the server running the Pi-hole

   The install log is located at: /etc/pihole/install.log
Installation Complete!


Looks good, however looks like there was a problem with getting the pre-compiled pihole-FTL binary ( which is the core part of pi-hole) :


# /usr/bin/pihole-FTL --version
-bash: /usr/bin/pihole-FTL: No such file or directory
# ls -l /usr/bin/pihole-FTL
-rwxr-xr-x 1 root root 6860972  May 27 08:59 /usr/bin/pihole-FTL

How strange : &amp;#039;No such file&amp;#039; error , but it&amp;#039;s clearly there - have we got some weird filesystem corruption or something ?!


# od -c /usr/bin/pihole-FTL |head
0000000 177   E   L   F 001 001 001  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000020 003  \0   (  \0 001  \0  \0  \0 240 356 001  \0   4  \0  \0  \0
0000040 330 375   x  \0 002 004  \0 005   4  \0      \0  \t  \0   (  \0
0000060   (  \0   %  \0 001  \0  \0   p 324   , 033  \0 324   , 033  \0
....

# file /usr/bin/pihole-FTL
/usr/bin/pihole-FTL: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, with debug_info, not stripped
# ldd /usr/bin/pihole-FTL
 not a dynamic executable

So looks like no filesystem corruption, it&amp;#039;s probably just compiled for a different ARM architecture than what we have
 
So we have to build FTL from source :
     ( taken from instructions at  https://docs.pi-hole.net/ftldns/compile/ :


# apt install build-essential libgmp-dev m4

Although libnettle (for DNSSEC) was already installed by the main pihole installer above, we are going to need the header files etc, so best build nettle too :


# wget https://ftp.gnu.org/gnu/nettle/nettle-3.6.tar.gz
# tar -xvzf nettle-3.6.tar.gz
# cd nettle-3.6
# ./configure
# make
# make install

Note: before compiling FTL, make sure you have at least 256MB of swap available, as it is a memory-hungry compile.


# apt install libsqlite3-dev

# git clone https://github.com/pi-hole/FTL.git
# cd FTL
# make
# make install
# service pihole-FTL restart


NOTE : If it still runs out of RAM during the make ( e.g. gcc dies unexpectedly after 10 min with something like 
   
cc: fatal error: Killed signal terminated program cc1
   compilation terminated.
   make: *** [Makefile:146: build/database/sqlite3.o] Error 1

then one way to reduce RAM usage during compile is to reduce the amount of optimisation gcc does by editing the Makefile and changing -O3 to -O1 or even -O0 :


HARDENING_FLAGS=-fstack-protector-strong -Wp,-D_FORTIFY_SOURCE=2 -O1 -Wl,-z,relro,-z,now  .......

-O1 worked for me on a Dockstar with 128MB of RAM and 192MB of swap. 

You should now see pihole-FTL process running, listening on port 53 , and can configure your laptop etc to use it as a DNS resolver.

You can use pi-hole&amp;#039;s handy web-admin interface (URL shown above)  to view what it&amp;#039;s doing, update the blacklists and to whitelist domains/sites if required.

Cheers
Rob

edit : added swap space info</description>
        <link>https://forum.doozan.com/read.php?2,103584,103584#msg-103584</link>
        <lastBuildDate>Thu, 05 Mar 2026 20:15:44 -0600</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,121259#msg-121259</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,121259#msg-121259</link>
            <description><![CDATA[ davygravy Wrote:<br />
-------------------------------------------------------<br />
&gt; I upgraded PiHole-FTL and the rest of the package<br />
&gt; set... no hiccups.  It looks like our Kirkwood<br />
&gt; devices are finally supported in mainline PiHole.<br />
<br />
Really good to hear! I was considering running Pihole on a Dockstar, and thought to check here if anyone else had got it right first. What is the performance like? And how much swap space have you given it?]]></description>
            <dc:creator>megal0maniac</dc:creator>
            <category>Debian</category>
            <pubDate>Mon, 24 May 2021 08:33:03 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,112224#msg-112224</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,112224#msg-112224</link>
            <description><![CDATA[ I upgraded PiHole-FTL and the rest of the package set... no hiccups.  It looks like our Kirkwood devices are finally supported in mainline PiHole.]]></description>
            <dc:creator>davygravy</dc:creator>
            <category>Debian</category>
            <pubDate>Fri, 04 Dec 2020 22:03:16 -0600</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,110954#msg-110954</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,110954#msg-110954</link>
            <description><![CDATA[ Kirkwood users may get a treat soon... If things go as planned, our plugs may be officially supported soon. (not holding my breath... one can still build one&#039;s own, but here&#039;s hoping...)<br />
<br />
<a href="https://discourse.pi-hole.net/t/build-for-pihole-ftl-arm-soft-float/39254/22"  rel="nofollow">https://discourse.pi-hole.net/t/build-for-pihole-ftl-arm-soft-float/39254/22</a>]]></description>
            <dc:creator>davygravy</dc:creator>
            <category>Debian</category>
            <pubDate>Thu, 12 Nov 2020 20:11:30 -0600</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,110829#msg-110829</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,110829#msg-110829</link>
            <description><![CDATA[ davygravy,<br />
<br />
Good to see you posting again :)<br />
<br />
If you are running my later kernel version, or turned on BFQ IO Scheduler (CONFIG_IOSCHED_BFQ)  in your own compiled kernel, it might explain the improvement in swapping. Also perhaps io_uring (CONFIG_IO_URING) play a role in this improvement too.<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />Updated 23 Aug 2020: <br />
<br />
Kernel linux-5.8.3-kirkwood-tld-1 package has been uploaded. The following features were added/updated: <br />
<br />
- BFQ IO Scheduler is now the default in the kernel. This is an improvement in making the system more responsive when under memory stress (Note: use a large swap space to avoid OOM killer).</div></blockquote>]]></description>
            <dc:creator>bodhi</dc:creator>
            <category>Debian</category>
            <pubDate>Tue, 10 Nov 2020 16:59:43 -0600</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,110814#msg-110814</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,110814#msg-110814</link>
            <description><![CDATA[ Thanks for posting your findings...<br />
<br />
yafbu Wrote:<br />
-------------------------------------------------------<br />
&gt; Hi and thanks for the tutorial. It helped a lot,<br />
&gt; and finally my old dockstar has again something to<br />
&gt; do.<br />
&gt; <br />
&gt; Just ran into the mentioned error described in<br />
&gt; <pre class="bbcode">
&gt; NOTE : If it still runs out of RAM during the make
&gt; ( e.g. gcc dies unexpectedly after 10 min with
&gt; something like
&gt; cc: fatal error: Killed signal terminated program
&gt; cc1
&gt;    compilation terminated.
&gt;    make: *** [Makefile:146:
&gt; build/database/sqlite3.o] Error 1
&gt;</pre>
&gt; but could not change the compile options due to<br />
&gt; the change in FTL from make to cmake.<br />
&gt; <br />
&gt; My solution was to follow the instructions on<br />
&gt; <a href="https://docs.pi-hole.net/ftldns/compile/"  rel="nofollow">https://docs.pi-hole.net/ftldns/compile/</a><br />
&gt; (especially additionally install libidn11-dev and<br />
&gt; cmake) and install swapspace<br />
&gt; <pre class="bbcode">
&gt; sudo apt-get install swapspace 
&gt;</pre>
&gt; afterward the FTL ./build.sh script ran about more<br />
&gt; than half a day (mainly at 98% on the sqlite3<br />
&gt; step) but in the end suceeded.<br />
&gt; <br />
&gt; -yafbu<br />
<br />
All spot on, I installed on a PP V4 ... no USB drive, just a 32GB mmc that I had laying around with Bodhi’s latest Debian rootfs on it. <br />
<br />
I can confirm a compile time of a little more than 12 hours. I was shocked that it actually worked utilizing mmc for swap, perhaps in some aspects, space is space.]]></description>
            <dc:creator>davygravy</dc:creator>
            <category>Debian</category>
            <pubDate>Tue, 10 Nov 2020 16:11:35 -0600</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,106869#msg-106869</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,106869#msg-106869</link>
            <description><![CDATA[ <b>Edit: the pihole-FTL-armel-native binary seems to crash the moment someone tries to connect. Disregard post.</b><br />
<br />
So I was looking through the pihole installer when I noticed they provide a pre-built armel compatible binary in their repository.  The problem is the way they go about detecting your device architecture is somewhat flawed.  It will only download the armel binary if it detects you&#039;re running the script from within a docker environment. These are the relevant variables:<br />
<br />
<pre class="bbcode">
machine=$(uname -m)
rev=$(uname -m | sed &quot;s/[^0-9]//g;&quot;)
lib=$(ldd /bin/ls | grep -E &#039;^\s*/lib&#039; | awk &#039;{ print $1 }&#039;)</pre>
<br />
The script itself has no direct checks that I could see for an armel environment it just downloads <b>pihole-FTL-arm-linux-gnueabi</b> (hard float?) by default once the <b>$rev</b> variable is determined not to be greater than &quot;6&quot;. It&#039;s meant to handle anything that&#039;s ARMv6 and lower.  If you add this bit here after line 2425 it should detect things correctly and download the correct binary:<br />
<br />
<pre class="bbcode">
        elif [[ &quot;${lib}&quot; == &quot;/lib/ld-linux.so.3&quot; ]]; then
            #
            if [[ &quot;${rev}&quot; -lt 6 ]]; then
                printf &quot;%b  %b Detected ARM soft float architecture\\n&quot; &quot;${OVER}&quot; &quot;${TICK}&quot;
                # set the binary to be used
                l_binary=&quot;pihole-FTL-armel-native&quot;
            fi</pre>
<br />
I&#039;ve tested this already on a fresh Debian Stretch install running SysVinit and can confirm it works. If you&#039;re on systemd the script fails at the &quot;restarting lighttpd service&quot; step. Not entirely sure why that is.]]></description>
            <dc:creator>alexr</dc:creator>
            <category>Debian</category>
            <pubDate>Sat, 29 Aug 2020 23:41:27 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,106794#msg-106794</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,106794#msg-106794</link>
            <description><![CDATA[ Hi and thanks for the tutorial. It helped a lot, and finally my old dockstar has again something to do.<br />
<br />
Just ran into the mentioned error described in<br />
<pre class="bbcode">
NOTE : If it still runs out of RAM during the make ( e.g. gcc dies unexpectedly after 10 min with something like
cc: fatal error: Killed signal terminated program cc1
   compilation terminated.
   make: *** [Makefile:146: build/database/sqlite3.o] Error 1</pre>
but could not change the compile options due to the change in FTL from make to cmake.<br />
<br />
My solution was to follow the instructions on <a href="https://docs.pi-hole.net/ftldns/compile/"  rel="nofollow">https://docs.pi-hole.net/ftldns/compile/</a> (especially additionally install libidn11-dev and cmake) and install swapspace<br />
<pre class="bbcode">
sudo apt-get install swapspace</pre>
afterward the FTL ./build.sh script ran about more than half a day (mainly at 98% on the sqlite3 step) but in the end suceeded.<br />
<br />
-yafbu]]></description>
            <dc:creator>yafbu</dc:creator>
            <category>Debian</category>
            <pubDate>Wed, 26 Aug 2020 03:01:44 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,106514#msg-106514</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,106514#msg-106514</link>
            <description><![CDATA[ Just tried compiling new pihole version on a new Debian Stretch rootfs with latest kernel, worked fine. Just had to make sure i was using a swap file as noted by rsinklair.]]></description>
            <dc:creator>alexr</dc:creator>
            <category>Debian</category>
            <pubDate>Fri, 07 Aug 2020 15:21:58 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,106324#msg-106324</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,106324#msg-106324</link>
            <description><![CDATA[ Well I just tried to update pihole and ran into the same snag with the FTL file.  So i tried to recompile as per your instructions but it doesn&#039;t use make anymore it uses cmake. So I installed cmake but I get the following error:<br />
<pre class="bbcode">
root@dockstar:/FTL/cmake# cmake ..
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
IDN
    linked by target &quot;pihole-FTL&quot; in directory /FTL/src

-- Configuring incomplete, errors occurred!
See also &quot;/FTL/cmake/CMakeFiles/CMakeOutput.log&quot;.
See also &quot;/FTL/cmake/CMakeFiles/CMakeError.log&quot;.</pre>
<br />
This was just updated 7/15/2020.  So perhaps you could take a look at it and update your instructions. <br />
Thanks<br />
-john]]></description>
            <dc:creator>jshand</dc:creator>
            <category>Debian</category>
            <pubDate>Sat, 18 Jul 2020 16:51:48 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,105659#msg-105659</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,105659#msg-105659</link>
            <description><![CDATA[ SOLVED:<br />
I can&#039;t install llibsqlite3-dev.  This is the error I get even though I have done an apt clean:<br />
<pre class="bbcode">
root@dockstar:~# apt install libsqlite3-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  sqlite3-doc
The following NEW packages will be installed:
  libsqlite3-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 714 kB of archives.
After this operation, 1967 kB of additional disk space will be used.
E: You don&#039;t have enough free space in /var/cache/apt/archives/.

root@dockstar:~# du -ch /var/cache/apt/archives/
4.0K	/var/cache/apt/archives/partial
8.0K	/var/cache/apt/archives/
8.0K	total</pre>
<br />
Turns out I had run out of space usb stick. duh!]]></description>
            <dc:creator>jshand</dc:creator>
            <category>Debian</category>
            <pubDate>Mon, 29 Jun 2020 18:59:39 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,103919#msg-103919</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,103919#msg-103919</link>
            <description><![CDATA[ I&#039;ve added Rob&#039;s tutorial to the Wiki:<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong>https://forum.doozan.com/read.php?2,23630,23630#msg-23630</strong><br />
<br />
Home Automation &amp; Tools <br />
<br />
X10 <br />
CALDav Calendar Server using Radicale <br />
Pogoplug Network Stack with PiHole: pics, and description <br />
Pi-hole on Pogoplug Mobile <br />
Pi-hole on Pogoplug Pro V3 (OXNAS) <br />
<b>Pi-hole ad-blocker on Seagate Dockstar</b></div></blockquote>]]></description>
            <dc:creator>bodhi</dc:creator>
            <category>Debian</category>
            <pubDate>Mon, 01 Jun 2020 03:22:11 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,103594#msg-103594</guid>
            <title>Re: Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,103594#msg-103594</link>
            <description><![CDATA[ Thanks Rob,<br />
<br />
Very nice. Another Pi-hole tutorial to add to the Wiki!]]></description>
            <dc:creator>bodhi</dc:creator>
            <category>Debian</category>
            <pubDate>Thu, 28 May 2020 17:02:19 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,103584,103584#msg-103584</guid>
            <title>Howto: pi-hole ad-blocker on Seagate Dockstar</title>
            <link>https://forum.doozan.com/read.php?2,103584,103584#msg-103584</link>
            <description><![CDATA[ In case this is useful for anyone else, here&#039;s my notes on <br />
<br />
How to install pi-hole 5.0 on Seagate Dockstar running Debian 10  <br />
---------------------------------------------------------<br />
<br />
This was performed on a fresh install of the standard install ( Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2  )<br />
<br />
install curl:  <br />
<pre class="bbcode">
# apt install curl</pre>
<br />
<br />
Download pi-hole installscript. But first, install latest ca-certificates if you don&#039;t have them , otherwise curl refuses to connect to some https sites<br />
<pre class="bbcode">
# apt install ca-certificates

# curl -sSL <a href="https://install.pi-hole.net"  rel="nofollow">https://install.pi-hole.net</a> &gt; pihole-basic-install.sh</pre>
<br />
<br />
Note: had to edit the install script to change &#039;binary&#039; to &#039;l_binary&#039; on one line in pihole-basic-install.sh, as otherwise it exited during the &#039;FTL Checks&#039; section -<br />
   <pre class="bbcode">
...
 	 	printf &quot;%b  %b Detected ARM architecture\\n&quot; &quot;${OVER}&quot; &quot;${TICK}&quot;
     		# set the binary to be used
     --&gt;        l_binary=&quot;pihole-FTL-arm-linux-gnueabi&quot;
    ...</pre>
<br />
<pre class="bbcode">
# bash pihole-basic-install.sh</pre>
<br />
The install script runs through lots of checks, asks you some questions, then downloads lighttpd, php, dnsmasq etc<br />
<pre class="bbcode">
....
...
  <i> FTL Checks...

  [â] Detected ARM architecture
  <i> Checking for existing FTL binary...
  [â] Downloading and Installing FTL
  [â] Installing scripts from /etc/.pihole

  <i> Installing configs from /etc/.pihole...
  [â] No dnsmasq.conf found... restoring default dnsmasq.conf...
...
.....
  [â] Swapping databases
  <i> Number of gravity domains: 87259 (84818 unique domains)
  <i> Number of exact blacklisted domains: 0
  <i> Number of regex blacklist filters: 0
  <i> Number of exact whitelisted domains: 0
  <i> Number of regex whitelist filters: 0
  [â] pihole-FTL: no process found
  [â] Cleaning up stray matter
  [â] Restarting DNS server

  [â] DNS service is NOT running
/opt/pihole/updatecheck.sh: line 77: /usr/bin/pihole-FTL: No such file or directory
/opt/pihole/updatecheck.sh: line 91: /usr/bin/pihole-FTL: No such file or directory
  <i> Web Interface password: xxxx
  <i> This can be changed using &#039;pihole -a -p&#039;

  <i> View the web interface at <a href="http://pi.hole/admin"  rel="nofollow">http://pi.hole/admin</a> or <a href="http://192.168.17.39/admin"  rel="nofollow">http://192.168.17.39/admin</a>

  <i> You may now configure your devices to use the Pi-hole as their DNS server
  <i> Pi-hole DNS (IPv4): 192.168.17.39
  <i> If you set a new IP address, please restart the server running the Pi-hole

  <i> The install log is located at: /etc/pihole/install.log
Installation Complete!
</i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></pre>
<br />
Looks good, however looks like there was a problem with getting the pre-compiled pihole-FTL binary ( which is the core part of pi-hole) :<br />
<br />
<pre class="bbcode">
# /usr/bin/pihole-FTL --version
-bash: /usr/bin/pihole-FTL: No such file or directory
# ls -l /usr/bin/pihole-FTL
-rwxr-xr-x 1 root root 6860972  May 27 08:59 /usr/bin/pihole-FTL</pre>
<br />
How strange : &#039;No such file&#039; error , but it&#039;s clearly there - have we got some weird filesystem corruption or something ?!<br />
<br />
<pre class="bbcode">
# od -c /usr/bin/pihole-FTL |head
0000000 177   E   L   F 001 001 001  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000020 003  \0   (  \0 001  \0  \0  \0 240 356 001  \0   4  \0  \0  \0
0000040 330 375   x  \0 002 004  \0 005   4  \0      \0  \t  \0   (  \0
0000060   (  \0   %  \0 001  \0  \0   p 324   , 033  \0 324   , 033  \0
....

# file /usr/bin/pihole-FTL
/usr/bin/pihole-FTL: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, with debug_info, not stripped
# ldd /usr/bin/pihole-FTL
 not a dynamic executable</pre>
<br />
So looks like no filesystem corruption, it&#039;s probably just compiled for a different ARM architecture than what we have<br />
 <br />
So we have to build FTL from source :<br />
     ( taken from instructions at  <a href="https://docs.pi-hole.net/ftldns/compile/"  rel="nofollow">https://docs.pi-hole.net/ftldns/compile/</a> :<br />
<br />
<pre class="bbcode">
# apt install build-essential libgmp-dev m4</pre>
<br />
Although libnettle (for DNSSEC) was already installed by the main pihole installer above, we are going to need the header files etc, so best build nettle too :<br />
<br />
<pre class="bbcode">
# wget <a href="https://ftp.gnu.org/gnu/nettle/nettle-3.6.tar.gz"  rel="nofollow">https://ftp.gnu.org/gnu/nettle/nettle-3.6.tar.gz</a>
# tar -xvzf nettle-3.6.tar.gz
# cd nettle-3.6
# ./configure
# make
# make install</pre>
<br />
Note: before compiling FTL, make sure you have at least 256MB of swap available, as it is a memory-hungry compile.<br />
<br />
<pre class="bbcode">
# apt install libsqlite3-dev

# git clone <a href="https://github.com/pi-hole/FTL.git"  rel="nofollow">https://github.com/pi-hole/FTL.git</a>
# cd FTL
# make
# make install
# service pihole-FTL restart</pre>
<br />
<br />
NOTE : If it still runs out of RAM during the make ( e.g. gcc dies unexpectedly after 10 min with something like <br />
   <pre class="bbcode">
cc: fatal error: Killed signal terminated program cc1
   compilation terminated.
   make: *** [Makefile:146: build/database/sqlite3.o] Error 1</pre>
<br />
then one way to reduce RAM usage during compile is to reduce the amount of optimisation gcc does by editing the Makefile and changing -O3 to -O1 or even -O0 :<br />
<br />
<pre class="bbcode">
HARDENING_FLAGS=-fstack-protector-strong -Wp,-D_FORTIFY_SOURCE=2 -O1 -Wl,-z,relro,-z,now  .......</pre>
<br />
-O1 worked for me on a Dockstar with 128MB of RAM and 192MB of swap. <br />
<br />
You should now see pihole-FTL process running, listening on port 53 , and can configure your laptop etc to use it as a DNS resolver.<br />
<br />
You can use pi-hole&#039;s handy web-admin interface (URL shown above)  to view what it&#039;s doing, update the blacklists and to whitelist domains/sites if required.<br />
<br />
Cheers<br />
Rob<br />
<br />
edit : added swap space info]]></description>
            <dc:creator>rsinklair</dc:creator>
            <category>Debian</category>
            <pubDate>Thu, 28 May 2020 16:37:59 -0500</pubDate>
        </item>
    </channel>
</rss>
