FTL on XBian Pi

root@pi ~ # uname -m
armv6l

root@pi ~ # ldd /bin/ls | grep -E '^\s*/lib' | awk '{ print $1 }'
/lib/libarmmem.so
/lib/ld-linux-armhf.so.3

Ps.this is an "upstart" init system.

I think the detection algorithm failed because it found

/lib/libarmmem.so
/lib/ld-linux-armhf.so.3

whereas it expects only one line. Anyhow ... glad that you found a way to get it working. I and @DanSchaper will think about how to incorporate this in a future version of our installer.

Maybe bc of upstart, FTL was not setup to start at boot:

update-rc.d pihole-FTL defaults

And the web GUI is not displaying stats yet except for "104,740 Domains Being BLocked".
But have to look into this later as my eyes are becoming square.
At least its resolving and displaying blank ad page after install on XBian.
EDIT: On a Pi B+
:slight_smile:

Aha, "log-queries" was hashed from "/etc/dnsmasq.d/01-pihole.conf".
Unhashed it, restarted dnsmasq and now have full stats.

And I was sleeping.
Yes it was, I should have posted with it not running but doesnt make a difference for this issue.

I have the same problem on a fresh installation of pihole on a Raspberry Pi 2 with xbian. Debug log vgms91pny2
pihole-FTL doesn't want to be found and started, neither as a service nor as a program/script. pihole -r, reinstalling and changing permissions on /usr/bin/pihole-FTL didn't work. Do you have another suggestion about how I can get it to work, or does xbian miss some crucial parts which prevent FTL to start? Pihole does seem to start, but I'm not sure it's working correctly since the webinterface isn't telling me anything but "connection to api lost"

xbian appears to use a different init system than we are designed for. This is what is preventing FTL from starting, and preventing the debugger from collecting crucial information about the installation. It appears that dnsmasq is not using the Pi-hole configuration as well.

When we have the other issues with FTL resolved, we can take a look at the xbian platform, but you may want to open a feature request post with the request to support this platform.

Excellent, this works! Now I'll try the other hints below to get it started after a restart of the Raspberry Pi (sometimes needed when Kodi crashes or locks up)

I believe I have a working XBian setup running Pi-Hole now but waiting for the cron jobs and other issues to popup.
And cant test "pihole -up" yet as I already run latest.
But now it is reboot persistent, resolves ads to the blank page, shows graphs/stats/status and above all, its got FTL.
I believe below is what it needs:

  1. Make sure everything is configured properly with:

sudo xbian-config

  1. I had to manually set static IP in "/etc/network/interfaces" as XBian doesnt have "/etc/dhcpcd.conf".

  2. Apply network changes:

sudo ifdown eth0 && sudo ifup eth0

  1. Install curl:

sudo apt-get install curl

  1. Install Pi-Hole:

curl -sSL https://install.pi-hole.net | bash

  1. I had to run below to have the "/etc/pihole/local.list" file etc created as was missing:

pihole -g

  1. I also set the IP in "/etc/pihole/setupVars.conf" but not sure if necessary.

  2. Binary "/usr/bin/pihole-FTL" gave troubles because depending on missing "/lib/ld-linux.so.3" so had to do:

sudo ln -s /lib/arm-linux-gnueabihf/ld-linux.so.3 /lib/ld-linux.so.3

  1. Not sure if helped but did a:

cd /etc/.pihole
sudo git stash --all
sudo git clean --force -d
sudo git pull

  1. Un-hashed the "log-queries" line in "/etc/dnsmasq.d/01-pihole.conf" and:

service dnsmasq restart

  1. Start FTL at boot as it wasnt:

sudo update-rc.d pihole-FTL defaults

12) And as this Pi is a new install and intended for some other household lacking a proper cabling system, I had to kill WiFi power saver for the r8188eu driver:

echo 'options r8188eu rtw_power_mgnt=0 rtw_enusbss=0' | sudo tee /etc/modprobe.d/r8188eu.conf

I believe that covers it at least for now.

I did the first part the same. I already had a static IP set up before installing pihole because that was/is convenient for remote controlling Kodi, so I skipped that step in pihole setup and just left it the same.
I also had to install curl, then use that to install pihole.
I didn't do steps 6 and 7, but step 8 helped to get FTL running. I didn't do steps 9 and 10, but did step 11.

I installed a fresh copy of XBian, the Debian Stretch test version, and it seems only these steps are needed to get Pi-Hole running ontop of XBian.
At first I tried running it on a Pi B but noticed it OOMing allot.
Now I am trying it out on a Pi B+ with only one client, my own main PC.
The old B switched place and is now doing dedicated Pi-Holing for my network.
I tried browsing to the admin page with the "Web Viewer" Kodi add on but was missing lots of details probably because of missing javascript :neutral_face:

$ cat /etc/debian_version
9.0

$ uname -r -m
4.9.20+ armv6l

  1. Stop Kodi(former XBMC):
    sudo stop xbmc

  2. Configure a static IP address using below one because XBian is not using "/etc/dhcpcd.conf":
    *Might need a reboot so after, stop Kodi again(step 1) to continue.
    sudo xbian-config

  3. Create missing symlink needed by the pihole-FTL daemon:
    sudo ln -s /lib/arm-linux-gnueabihf/ld-linux.so.3 /lib/ld-linux.so.3

  4. Install curl:
    sudo apt install curl

  5. Run the Pi-Hole installer:
    curl -sSL https://install.pi-hole.net | bash

  6. Have the "pihole-FTL" daemon start at boot as XBian uses "Upstart" as init:
    sudo update-rc.d pihole-FTL defaults

  7. Reboot:
    sudo reboot

To make matters worse, I now have it piggybacking an old HP monitor using only Wifi.
So far so good playing media and blocking ads at same time.
If only there was a way of getting the admin page to display properly in Kodi :slight_smile:

Running command #5 gives me a lot of

"The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs."

errors

Those messages are harmless.
Just check to make sure FTL is running after a reboot:

service pihole-FTL status

ps -e | grep 'PID\|pihole-FTL'

sudo netstat -nltp | grep 'Prot\|pihole-FTL'

It was not started after boot. I added a cron job like @reboot sudo service pihole-FTL start to fix it.

Running service pihole-FTP status I get:

● pihole-FTL.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

but I can see the service running when I visit the pihole admin interface

Not sure whats happening.
Running update-rc.d , which is intended for the sysv init system, used to be enough when I tested this.
I had a bunch of those messages but they were related to a missing proper upstart job so upstart conditions the sysv init.d script to be used for the upstart init system.
I moved my Pi-hole to a dedicated Pi1 with regular Raspbian in the mean time so its a bit hard to test for me currently.

Without the cron job, what were the outputs for the other two (ps -e & netstat) ?
And try 'sudo status pihole-FTL' ?
And did the update-rc.d command create the necessary old style sysv symlinks in below folder ?

ls -al /etc/rc2.d/

Ohw and upstart creates logs in the folder '/var/log/upstart/'.
you can check if pihole-FTL logs are created in that folder and you can view them with the 'zcat' command.

So, I removed the entry from my crontab where I started the service on boot and rebooted my xbian to check the output of the commands you asking for.
The good news are that now when I visit the admin panel of pihole it works and the status is Active.
The strange thing is the output of the above commands:

  • $ ps -e | grep 'PID|pihole-FTL'
    PID TTY TIME CMD
    2525 ? 00:00:04 pihole-FTL

  • $ sudo netstat -nltp | grep 'Prot|pihole-FTL'
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

  • $ sudo service pihole-FTL status
    status: Unknown job: pihole-FTL

  • $ sudo update-rc.d pihole-FTL defaults
    initctl: Unknown job: K01nfs-commonThe script you are attempting to invoke h - Pastebin.com

  • $ ls -al /etc/rc2.d/
    -rw-r--r-- 1 root root 677 Feb 12 2017 README
    lrwxrwxrwx 1 root root 26 Oct 20 16:01 S01console-setup.sh -> ../init.d/console-setup.sh
    lrwxrwxrwx 1 root root 13 Oct 20 16:02 S02atd -> ../init.d/atd
    lrwxrwxrwx 1 root root 19 Oct 20 16:10 S02bluetooth -> ../init.d/bluetooth
    lrwxrwxrwx 1 root root 19 Oct 20 16:01 S02cgmanager -> ../init.d/cgmanager
    lrwxrwxrwx 1 root root 14 Oct 20 16:01 S02dbus -> ../init.d/dbus
    lrwxrwxrwx 1 root root 16 Feb 21 13:12 S02dhcpcd -> ../init.d/dhcpcd
    lrwxrwxrwx 1 root root 17 Feb 21 14:01 S02dnsmasq -> ../init.d/dnsmasq
    lrwxrwxrwx 1 root root 18 Feb 21 14:00 S02lighttpd -> ../init.d/lighttpd
    lrwxrwxrwx 1 root root 14 Oct 20 16:01 S02nmbd -> ../init.d/nmbd
    lrwxrwxrwx 1 root root 20 Feb 21 15:20 S02pihole-FTL -> ../init.d/pihole-FTL
    lrwxrwxrwx 1 root root 21 Oct 20 16:01 S02samba-ad-dc -> ../init.d/samba-ad-dc
    lrwxrwxrwx 1 root root 29 Oct 25 19:33 S02transmission-daemon -> ../init.d/transmission-daemon
    lrwxrwxrwx 1 root root 29 Oct 20 16:02 S02unattended-upgrades -> ../init.d/unattended-upgrades
    lrwxrwxrwx 1 root root 17 Oct 20 16:01 S03cgproxy -> ../init.d/cgproxy
    lrwxrwxrwx 1 root root 14 Oct 20 16:01 S03smbd -> ../init.d/smbd
    lrwxrwxrwx 1 root root 18 Oct 20 16:01 S04rc.local -> ../init.d/rc.local

Oh, and there is no logfile for pihole in folder /var/log/upstart/

Thats indeed strange if admin page and ps -e says its running.
You could check without the grep ?

sudo netstat -nltp

The service command is just a wrapper for upstarts initctl command:

man service

man initctl

Try upstarts own tool (is symlink to initctl) :

sudo status pihole-FTL

Those messages are all warnings and I dont see any errors.

Symlink looks good.

Yeah maybe only true upstart jobs get logged ... not sure.
At least you got FTL running now without the extra CRON dependency.

1 Like

It gives me
status: Unknown job: pihole-FTL

Gives me the below, which is good cause piholeFTL is indeed running

tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 4526/pihole-FTL

1 Like