Building Pi-hole v6.0 on Pogoplug V2

Subject line says it all... I run Pi-hole 5 on a Pogoplug V2 (armel, CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE)).

It would be great to be able to test Beta 6 on the armel platform.

Thanks for considering it.

Dave

I'm afraid this will not happen. The people from pi-hole changed their build infrastructure to alpine and alpine does not support this architecture. I have the exact same setup like you have and I build pihole-FTL myself. This works. This should get you going -> docs/docs/ftldns/compile.md at release/v6.0 · pi-hole/docs · GitHub
Also I've seen other people here that are also running pihole on pogo-plugs, so feel free to search this forum.
Please note ... pihole 6 requires a little more memory so you will need to have swap enabled + you have to change the swappiness because otherwise your pihole will be terrible slow. I will check the swappiness setting that works for me when I get home and let you know.
Good luck ... and thanks for keeping the plugs alive <3

2 Likes

Thanks for the response... and I'll give the build process a go.

I replied in the other thread before seeing this one. I use an SSD and as said, definitely use a swap file. It takes a little over 2 hours to compile each time. I've found that anything other than an SSD takes forever. I used a flash drive and a regular spinning hard drive and those took at least 8 or 10 hours if i remember correctly.

1 Like

Oops :flushed:
Luckily we have below for that :wink:

https://wiki.osdev.org/GCC_Cross-Compiler

1 Like

Using chroot and qemu-user-static, I compiled the deps and binary on my Intel 64bit workstation (amd64 as Debian calls it) in Bookworm. Whole build takes about 20 min IIRC.

Getting everything to happen consistently and reproducibly took a few tries, but got that bashed into submission.

Upgrading at first felt messy... but I changed my build process to include a version number and build-time-stamp on the binary's filename (pihole-FTL-v5.25.2-2341-g91ea8d49-2024-12-15-163830). So, I keep of copy of the v5.25.2 binary in /usr/bin also, and just use a symlink ln -s target-name name to point to it. That way if I accidently run pihole -up, recovery is easy.

Also made sure to do a pihole checkout for the development branch of core, web and ftl. When ftl development checkout was done, I just went in and created the symlink to point to my newly-compiled armel binary and all was good after a pihole restartdns. (I'm thinking that it also complained about setupVars.conf, which I copied from migration_backup_v6/ ... )

Afterthought: If upgrading to V6, don't forget to disable lighttpd...otherwise pihole might try serving http on :8080 ... I'm thinking that this may have happened to me once, and I had to fiddle with pihole-FTL --config [key] to nudge it back to :80.

Note that this is on a non-OXNAS pogoplug. In any case, this gives me some hope for ARMv5TE/armel boxes for at least through the end of support for Debian 13/Trixie. We may hit EOL at some point after that.

2 Likes

Are you still able to run above one?
Mine doesnt anymore after an upgrade yesterday.
Bash completion (double tab):

$ sudo pihole
allow          checkout       flush          regex          uninstall
allow-regex    debug          help           reloaddns      updateGravity
allow-wild     deny           logging        reloadlists    updatePihole
api            disable        query          status         version
arpflush       enable         reconfigure    tail           wildcard

And if I try anyway:

$ sudo pihole restartdns
Usage: pihole [options]
Example: 'pihole allow -h'
Add '-h' after specific commands for more information on usage

Domain Options:
  allow, allowlist    Allow domain(s)
  deny, denylist      Deny domain(s)
  --regex, regex      Regex deny domains(s)
  --allow-regex       Regex allow domains(s)
  --wild, wildcard    Wildcard deny domain(s)
  --allow-wild        Wildcard allow domain(s)
                        Add '-h' for more info on allow/deny usage

Debugging Options:
  -d, debug           Start a debugging session
                        Add '-c' or '--check-database' to include a Pi-hole database integrity check
                        Add '-a' to automatically upload the log to tricorder.pi-hole.net
  -f, flush           Flush the Pi-hole log
  -r, reconfigure     Reconfigure or Repair Pi-hole subsystems
  -t, tail [arg]      View the live output of the Pi-hole log.
                      Add an optional argument to filter the log
                      (regular expressions are supported)
  api <endpoint>      Query the Pi-hole API at <endpoint>


Options:
  setpassword [pwd]   Set the password for the web interface
                        Without optional argument, password is read interactively.
                        When specifying a password directly, enclose it in single quotes.
  -g, updateGravity   Update the list of ad-serving domains
  -h, --help, help    Show this help dialog
  -l, logging         Specify whether the Pi-hole log should be used
                        Add '-h' for more info on logging usage
  -q, query           Query the adlists for a specified domain
                        Add '-h' for more info on query usage
  -up, updatePihole   Update Pi-hole subsystems
                        Add '--check-only' to exit script before update is performed.
  -v, version         Show installed versions of Pi-hole, Web Interface & FTL
  uninstall           Uninstall Pi-hole from your system
  status              Display the running status of Pi-hole subsystems
  enable              Enable Pi-hole subsystems
  disable             Disable Pi-hole subsystems
                        Add '-h' for more info on disable usage
  reloaddns           Update the lists and flush the cache without restarting the DNS server
  reloadlists         Update the lists WITHOUT flushing the cache or restarting the DNS server
  checkout            Switch Pi-hole subsystems to a different GitHub branch
                        Add '-h' for more info on checkout usage
  arpflush            Flush information stored in Pi-hole's network tables

Below is mine:

$ pihole-FTL --config webserver.port
80,[::]:80,443s,[::]:443s

@deHakkelaar

Your config key for webserver port is correct, as long as lighttpd is not fighting for it also...

If you are using the V6 source for pihole-FTL and it built correctly, and it is running correctly... you shoud be able to browse the admin page at http://ip-of-pihole/admin/login . http://ip-of-pihole/admin will also work (either directly, or after redirecting for login).

The previous url had an admin.php in it… not there anymore - and the new web content is needed from git also.

By the way,

pihole-FTL -vv

Can give details about your binary's build.

I struggled a while when upgrading ... I over-wrote some files accidentally and ended up having to reinstall from scratch a few times. I also messed up permissions a few times... and lost track of setupVar.conf and some other things. Eventually, it did become a smooth upgrade process, but only after few mistakes.

If any of the following aren't right, it won't work...

  • lighttpd is still running
  • if the new web pages aren't installed correctly
  • permissions are borked
  • user structure isn't correct
  • probably some other stuff I miss saying...

Is that slowness in the web admin interface or in resolving DNS (or both?)

And because I have to "It's Kenny Kenny West Y'all"

You don't need lighttpd in v6. You can uninstall it.

Also, if lighttpd is installed and using port 80, Pi-hole v6 will work, but the installer will change the web server port to 8080. Try http://pihole_IP:8080/admin/.

Well, it won't work as expected... :wink: ... one can either disable it w/ systemctl and stop any running instances of it, or remove it.

Yes, I liked the embedded civetweb server ... made me think about civet coffee (...not really my cup of tea, but hey...)

Sorry, not a native English speaker here, might need to reformulate that to: "you might want to change the swappiness" :wink:

For me, as you can read here: Pihole v6 on low spec hardware having swap with "default" settings resulted in slow DNS responses (webinterface is also not lightning fast, but works). After some very helpful discussion, I ended up disabling swap and running everything from the limited amount of memory (128M).

This caused the pogoplug to go out of memory every now and then ... so, to mitigate that, I activated swap again and (after some reading) lowered the swappiness. This seems to work for now. Although I am not sure how much longer we will be able to keep these things alive.

If you have anything else running besides below ones (my minbase):

$ pstree -cps
systemd(1)─┬─agetty(372)
           ├─agetty(567176)
           ├─cron(321)
           ├─dbus-daemon(327)
           ├─pihole-FTL(1880538)─┬─{pihole-FTL}(1880553)
           │                     ├─{pihole-FTL}(1880554)
           │                     ├─{pihole-FTL}(1880555)
           │                     ├─{pihole-FTL}(1880556)
           │                     ├─{pihole-FTL}(1880557)
           │                     ├─{pihole-FTL}(1880558)
           │                     ├─{pihole-FTL}(1880559)
           │                     ├─{pihole-FTL}(1880650)
           │                     ├─{pihole-FTL}(1880651)
           │                     ├─{pihole-FTL}(1904395)
           │                     ├─{pihole-FTL}(1904396)
           │                     ├─{pihole-FTL}(1989860)
           │                     └─{pihole-FTL}(1989861)
           ├─sshd(385)───sshd(2024355)───sshd(2024361)───bash(2024362)───pstree(2024366)
           ├─systemd-journal(181)
           ├─systemd-logind(334)
           ├─systemd-timesyn(301)───{systemd-timesyn}(319)
           └─systemd-udevd(207)

You could try disabling them to free some memory.
I dont need anything else to run Pi-hole.
Also no "Network Mangler" bc that can be done with ifupdown --> /etc/network/interfaces.

$ man debootstrap
[..]
          minbase, which only includes required packages and apt

EDIT: x86_64 though but only 123MB used (total minus available):

$ free -h
               total        used        free      shared  buff/cache   available
Mem:           957Mi       123Mi        59Mi       3.3Mi       795Mi       834Mi
Swap:          2.0Gi       1.5Mi       2.0Gi

EDIT2: Oh when gravity runs on Sunday, it'll consume a little more oc :wink:

Come to think of it, you could also ditch above systemd-timesyncd.service.
Because:

$ pihole-FTL --config ntp.sync.active
true

EDIT:

$ free
               total        used        free      shared  buff/cache   available
Mem:          980000      130612       58540        3392      812156      849388
Swap:        2097148        1536     2095612
$ sudo systemctl disable --now systemd-timesyncd.service
Removed "/etc/systemd/system/dbus-org.freedesktop.timesync1.service".
Removed "/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service".
$ free
               total        used        free      shared  buff/cache   available
Mem:          980000      129704       59416        3388      812184      850296
Swap:        2097148        1536     2095612
$ pstree
systemd─┬─2*[agetty]
        ├─cron
        ├─dbus-daemon
        ├─pihole-FTL───13*[{pihole-FTL}]
        ├─sshd─┬─sshd───sshd───bash
        │      └─sshd───sshd───bash───pstree
        ├─systemd-journal
        ├─systemd-logind
        ├─systemd-udevd
        └─unbound

Thats almost one MB :wink:

This should be a minimal install, but I am also running cloudflared to facilitate dns over https. So this is how my pstree looks like:

root@pogo01:~# pstree
init-+-cloudflared---9*[{cloudflared}]
     |-cron
     |-dbus-daemon
     |-getty
     |-haveged
     |-klogd
     |-pihole-FTL---11*[{pihole-FTL}]
     |-smartd
     |-sshd---sshd---bash---pstree
     |-syslogd
     `-systemd-udevd

And this is how free looks like:

root@pogo01:~# free -h
               total        used        free      shared  buff/cache   available
Mem:           112Mi        77Mi       2.7Mi       4.6Mi        42Mi        35Mi
Swap:          1.5Gi        23Mi       1.5Gi
root@pogo01:~#

So its all very tight, but still "workable".
Thanks for the hints.

2 Likes

@kennywest , can I ask you two questions please?

  1. Are your binaries actually ARM, EABI5 version 1, ie.
root@PiHole1-B388:/# file /bin/echo
/bin/echo: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, BuildID[sha1]=da886736535b17f3a832ea22669663e9c82adbe8, for GNU/Linux 3.2.0, stripped

I was thinking that the OXNAS Pogo's aren't armel, but maybe it's just the kernel that's different... ?

  1. Does bohdi's OXNAS rootfs come w/ systemd enabled/turned on by default?

I ask the 2nd question because my failover pihole is also 128MB, like your Pogoplug Pro (but w/ the Kirkwood SoC, not Oxford).

Thanks in advance,

Dave

I did a fresh install of the second pogoplug I have, identical as the one currently running pihole v6. The re-installed one was running pihole v5 (rock solid, never seen it crash).
Here is the output of the commands on the fresh installed one (i.e. with rootfs from bohdi):

root@debian:~# ps 1
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:02 init [2]

root@debian:~# file /bin/echo
/bin/echo: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, BuildID[sha1]=2e2eca0f79466cc959c19b3d92ef0a5438cf9182, for GNU/Linux 3.2.0, stripped

root@debian:~# uname -a
Linux debian 5.15.158-oxnas-tld-2 #2 SMP PREEMPT Sun May 12 18:45:05 PDT 2024 armv6l GNU/Linux
root@debian:~#

Output of the first command means it is still booting via sys V init ... I guess :thinking:

That’s great - that, together with the OXNAS kernel tag says that its just the kernel that is different- I always thought the V3 and Pro required distinct binaries, but I guess they are compatible in that respect.

Thank you for that.

In one of your previous posts it looked like systemd was indeed running… on iPhone now but will peak at it again when home. …. Ahhh now i see it… I think it was de Hakkelaar that posted pstree -cps which showed systemd running…

Do you need above one?

$ apt-file search bin/haveged
haveged: /usr/sbin/haveged
$ apt-file list haveged
[..]
haveged: /etc/init.d/haveged
haveged: /lib/systemd/system/haveged.service
$ apt show haveged
[..]
Description: Linux entropy source using the HAVEGE algorithm
 haveged is a userspace entropy daemon which is not dependent upon the
 standard mechanisms for harvesting randomness for the system entropy
 pool. This is important in systems with high entropy needs or limited
 user interaction (e.g. headless servers).
 .
 haveged uses HAVEGE (HArdware Volatile Entropy Gathering and Expansion)
 to maintain a 1M pool of random bytes used to fill /dev/random
 whenever the supply of random bits in dev/random falls below the low
 water mark of the device.
 .
 More information about HAVEGE is available at
 http://www.irisa.fr/caps/projects/hipsor/
$ apt rdepends haveged
haveged
Reverse Depends:
  Suggests: overlayroot
  Suggests: shadowsocks-libev
  Depends: octavia-agent
  Recommends: freedombox
  Suggests: fbx-all

And above one sounds a bit redundant if syslogd is already active?

$ apt-file search bin/klogd
busybox-syslogd: /sbin/klogd
$ apt-file list busybox-syslogd
[..]
busybox-syslogd: /etc/init.d/busybox-klogd
busybox-syslogd: /etc/init.d/busybox-syslogd
$ apt show busybox-syslogd
[..]
Description: Provides syslogd and klogd using busybox
 The system log daemon is responsible for providing logging of
 messages received from programs and facilities on the local host as
 well as from remote hosts.
 .
 The kernel log daemon listens to kernel message sources and is
 responsible for prioritizing and processing operating system
 messages.
 .
 The busybox implementation of the syslogd is particular useful on
 embedded, diskless (netboot) or flash disk based systems because it
 can use a fixed size ring buffer for logging instead of saving logs
 to the disk or sending it to remote logging servers. The ring buffer
 can be read using the (also busybox based) command logread.
 .
 This package provides the glue to the busybox syslogd and klogd to be
 used in the system by providing the appropriate symbolic links and
 scripts.

Do those Pogo's boot from an SD card?
If so, you cant read out SMART from an SD card so above one is redundant too:

$ apt-file search bin/smartd
smartdns: /usr/sbin/smartdns
smartmontools: /usr/sbin/smartd
$ apt-file list smartmontools
[..]
smartmontools: /etc/init.d/smartmontools
smartmontools: /lib/systemd/system/smartmontools.service
$ apt show smartmontools
[..]
Description: control and monitor storage systems using S.M.A.R.T.
 The smartmontools package contains two utility programs (smartctl and smartd)
 to control and monitor storage systems using the Self-Monitoring, Analysis and
 Reporting Technology System (S.M.A.R.T.) built into most modern ATA and SCSI
 hard disks. It is derived from the smartsuite package, and includes support
 for ATA/ATAPI-5 disks. It should run on any modern Linux system.

Your init is not systemd it seems:

what do below ones show?

readlink -f /sbin/init

/sbin/init --version

apt policy systemd

dpkg -S bin/init

Oh I realised later that above syslogd could be part of that busybox-syslogd package.
Then klogd cant be removed/disabled ... I think.
You can list its content with below:

dpkg -L busybox-syslogd

Or search to which package it belongs:

dpkg -S bin/syslogd

Am not that familiar yet with busybox :wink:
Only one that I know of is my router:

$ busybox
BusyBox v1.17.4 (2020-06-09 09:41:02 CST) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as.

Currently defined functions:
        [, [[, arp, ash, awk, basename, blkid, cat, chmod, chown, chpasswd,
        clear, cmp, cp, crond, cut, date, dd, devmem, df, dirname, dmesg, du,
        e2fsck, echo, egrep, env, ether-wake, expr, fdisk, fgrep, find, flock,
        free, fsck, fsck.ext2, fsck.ext3, fsck.minix, fsync, grep, gunzip,
        gzip, head, ifconfig, insmod, ionice, kill, killall, klogd, less, ln,
        logger, login, ls, lsmod, lsusb, md5sum, mdev, mkdir, mke2fs,
        mkfs.ext2, mkfs.ext3, mknod, mkswap, modprobe, more, mount, mv,
        netstat, nice, nohup, nslookup, pidof, ping, ping6, printf, ps, pwd,
        readlink, renice, rm, rmdir, rmmod, route, sed, setconsole, sh, sleep,
        sort, strings, swapoff, swapon, sync, syslogd, tail, tar, telnetd,
        test, top, touch, tr, traceroute, traceroute6, true, tune2fs, udhcpc,
        umount, uname, unzip, uptime, usleep, vconfig, vi, watch, wc, which,
        zcat, zcip
$ echo $SHELL
/bin/sh
$ readlink -f /bin/sh
/bin/busybox