Pi-Hole is a great way to block website ads in your house because it works at the routing level, denying DNS requests to common advertisement domains. It works flawlessly on the Raspberry Pi, but to run it on a Beaglebone you have to trim some fat to get it to work. Thanks to the Pi-Holers for the huge amount of support they offered me.
I already had a Beaglebone, so I started with the latest image for the BBB at https://beagleboard.org/latest-images:
Debian 9.5 2018-10-07 4GB SD LXQT
Basically go through the resource links below, in order, to get Pi-Hole running. Then, if you want to save power (all my BBB is doing is processing DNS requests, no reason to run at 1GHz all the time!), look at the last few links.
2020.01.29 UPDATE:
I updated Pi-Hole and everything broke again. As this Google Groups post shows, /etc/dnsmasq.d/SoftAp0 was being regenerated by the pre-installed boot script /opt/scripts/boot/am335x_evm.sh
First I deleted /etc/dnsmasq.d/SoftAp0.
Then I commented out line 125 in am335x_evm.sh and added a modified copy of it within the large switch statement that set a variable used to generate the SoftAp0 file at a later stage:
TI_AM335x_BeagleBone_Black) has_wifi="disable" cleanup_extra_docs #dnsmasq_usb0_usb1="enable" dnsmasq_usb0_usb1="disable" ;;
Now I can reboot/update my BBB without hosing Pi-Hole, yay! After that detour, I decided to have another go at disabling the “heartbeat” LED that lights up my hallway like a scene from Aliens at night. The AskUbuntu link below showed me I had to make an executable rc.local script, place it in /etc/init.d/ and add a symlink in /etc/rc5.d/ as S99rc.local. Pretty convoluted but it works!
Resources
- https://discourse.pi-hole.net/t/beaglebone-ads-not-being-blocked-i-searched-the-forums/14659
- https://github.com/johnantoni/beaglebone-black/blob/master/other/open-port-80-aka-remove-bonescript.md
- https://appliedcaffeine.org/pi-hole-on-beagleboard.html
- https://zeldor.biz/2012/11/beaglebone-optimize-power-consumption/
- https://askubuntu.com/questions/410860/how-to-permanently-set-cpu-power-management-to-the-powersave-governor
- https://askubuntu.com/questions/814/how-to-run-scripts-on-start-up
- https://discourse.pi-hole.net/t/beaglebone-dns-will-not-start-after-update/27562
- https://groups.google.com/forum/#!topic/beagleboard/H1rFzlj6rV0
- https://github.com/RobertCNelson/boot-scripts/blob/master/boot/am335x_evm.sh#L765
- https://askubuntu.com/questions/299792/why-is-the-command-in-etc-rc-local-not-executed-during-startup
- https://www.scivision.dev/disable-beaglebone-black-flashing-heartbeat-led/
- https://groups.google.com/forum/#!topic/beagleboard/El1i9h7UzjQ
- https://www.shellhacks.com/symlink-create-symbolic-link-linux/
Thank you for posting! The post on the first thread about moving the SoftAp0 to ~ got my system running on a BBB.