{"id":559,"date":"2018-11-25T17:51:27","date_gmt":"2018-11-26T01:51:27","guid":{"rendered":"https:\/\/www.andersknelson.com\/blog\/?p=559"},"modified":"2023-11-01T00:25:21","modified_gmt":"2023-11-01T04:25:21","slug":"pi-hole-on-the-beaglebone","status":"publish","type":"post","link":"https:\/\/www.andersknelson.com\/blog\/?p=559","title":{"rendered":"Pi-Hole on the Beaglebone"},"content":{"rendered":"\n<p><a href=\"https:\/\/pi-hole.net\/\">Pi-Hole<\/a> 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 <em>huge<\/em> amount of support they&nbsp;offered me.<\/p>\n\n\n\n<p>I already had a <a href=\"https:\/\/amzn.to\/2KYbRhi\">Beaglebone<\/a>, so I started with the latest image for the BBB at <a href=\"https:\/\/beagleboard.org\/latest-images\">https:\/\/beagleboard.org\/latest-images<\/a>:<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a href=\"http:\/\/debian.beagleboard.org\/images\/bone-debian-9.5-lxqt-armhf-2018-10-07-4gb.img.xz\">Debian&nbsp;9.5&nbsp;2018-10-07&nbsp;4GB SD&nbsp;LXQT&nbsp;<\/a><\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>2020.01.29 UPDATE:<\/p>\n\n\n\n<p>I updated Pi-Hole and everything broke again. As <a href=\"https:\/\/groups.google.com\/forum\/#!topic\/beagleboard\/H1rFzlj6rV0\">this Google Groups post <\/a>shows, \/etc\/dnsmasq.d\/SoftAp0 was being regenerated by the pre-installed boot script \/opt\/scripts\/boot\/am335x_evm.sh<\/p>\n\n\n\n<p>First I deleted \/etc\/dnsmasq.d\/SoftAp0.<\/p>\n\n\n\n<p>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:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">TI_AM335x_BeagleBone_Black)\n has_wifi=\"disable\"\n cleanup_extra_docs\n #dnsmasq_usb0_usb1=\"enable\"\n dnsmasq_usb0_usb1=\"disable\"\n ;;<\/pre>\n\n\n\n<p>Now I can reboot\/update my BBB without hosing Pi-Hole, yay! After that detour, I decided to have another go at disabling the &#8220;heartbeat&#8221; LED that lights up my hallway like a scene from <em>Aliens <\/em>at night. The AskUbuntu link below showed me I had to make an executable <em>rc.local<\/em> script, place it in \/etc\/init.d\/ and add a symlink in \/etc\/rc5.d\/ as <em>S99rc.local<\/em>. Pretty convoluted but it works!<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">Resources<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/discourse.pi-hole.net\/t\/beaglebone-ads-not-being-blocked-i-searched-the-forums\/14659\">https:\/\/discourse.pi-hole.net\/t\/beaglebone-ads-not-being-blocked-i-searched-the-forums\/14659<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/johnantoni\/beaglebone-black\/blob\/master\/other\/open-port-80-aka-remove-bonescript.md\">https:\/\/github.com\/johnantoni\/beaglebone-black\/blob\/master\/other\/open-port-80-aka-remove-bonescript.md<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/appliedcaffeine.org\/pi-hole-on-beagleboard.html\">https:\/\/appliedcaffeine.org\/pi-hole-on-beagleboard.html<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/zeldor.biz\/2012\/11\/beaglebone-optimize-power-consumption\/\">https:\/\/zeldor.biz\/2012\/11\/beaglebone-optimize-power-consumption\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/askubuntu.com\/questions\/410860\/how-to-permanently-set-cpu-power-management-to-the-powersave-governor\">https:\/\/askubuntu.com\/questions\/410860\/how-to-permanently-set-cpu-power-management-to-the-powersave-governor<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/askubuntu.com\/questions\/814\/how-to-run-scripts-on-start-up\">https:\/\/askubuntu.com\/questions\/814\/how-to-run-scripts-on-start-up<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/discourse.pi-hole.net\/t\/beaglebone-dns-will-not-start-after-update\/27562\">https:\/\/discourse.pi-hole.net\/t\/beaglebone-dns-will-not-start-after-update\/27562<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/groups.google.com\/forum\/#!topic\/beagleboard\/H1rFzlj6rV0\">https:\/\/groups.google.com\/forum\/#!topic\/beagleboard\/H1rFzlj6rV0<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/RobertCNelson\/boot-scripts\/blob\/master\/boot\/am335x_evm.sh#L765\"> https:\/\/github.com\/RobertCNelson\/boot-scripts\/blob\/master\/boot\/am335x_evm.sh#L765<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/askubuntu.com\/questions\/299792\/why-is-the-command-in-etc-rc-local-not-executed-during-startup\">https:\/\/askubuntu.com\/questions\/299792\/why-is-the-command-in-etc-rc-local-not-executed-during-startup<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.scivision.dev\/disable-beaglebone-black-flashing-heartbeat-led\/\">https:\/\/www.scivision.dev\/disable-beaglebone-black-flashing-heartbeat-led\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/groups.google.com\/forum\/#!topic\/beagleboard\/El1i9h7UzjQ\">https:\/\/groups.google.com\/forum\/#!topic\/beagleboard\/El1i9h7UzjQ<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.shellhacks.com\/symlink-create-symbolic-link-linux\/\">https:\/\/www.shellhacks.com\/symlink-create-symbolic-link-linux\/<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pi-Hole is a great way to block website ads in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":561,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[10,40,16,39],"class_list":["post-559","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","tag-beaglebone","tag-blocker","tag-linux","tag-pi-hole"],"_links":{"self":[{"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=559"}],"version-history":[{"count":16,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/559\/revisions"}],"predecessor-version":[{"id":1108,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/559\/revisions\/1108"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/561"}],"wp:attachment":[{"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}