Using Pi-hole as an ad blocker

I’ve used various ad-blockers over the years, and while they have all largely worked, they have also started to slow my browser down (especially on older computers). I read about Pi-hole a few times, but didn’t get around to actually installing it until this week. Now I have installed it I’m wishing I hadn’t waited, because not only does it lead to a largely ad-free browsing experience, but it also makes my older and slower computers noticeably faster.

Pi-hole should work on any Debian or Red Hat derived Linux distribution, but I went for the obvious solution of putting it on one of my always-on Raspberry Pis (which also runs WordPress and a command-line IRC client). To install just type curl -sSL https://install.pi-hole.net | bash in a terminal, and then visit the /admin URL of the machine it’s installed on to view the admin console.

Configuring machines to use it is just a case of defining a custom DNS server (how to do that varies between each OS, but was trivial on Ubuntu and ChromeOS – I’ve not tried anything else yet). Just add the IP address of the Pi as a DNS server, and it will block anything on the block list, and then forward everything else on to be dealt with as normal. If you want to do this for everything on your network then there are various options detailed here that range from configuring one machine to routing everything through Pi-hole.

Pi-hole admin page

The admin page will tell you how much blocking is going on. With me it was about 1% of all traffic, and it will even tell you which domains it is blocking so you can whitelist anything you actually want to see (not all ads are bad). I don’t really notice a performance increase on my main computer, but older and slower computers definitely seem snappier, and can maintain about twice as many open tabs before they start to slow down, which is a bonus feature that I wasn’t really expecting.

2018 stock take

Last year I wrote down a list of things I wanted to achieve and then evaluated how well I had done. This year I wrote a similar list but failed to publish it. 8 months later I’ve just found the list, and I’m amused to find that I’ve done fairly well, and even exceeded my own expectations in at least one area (I said I’d start cycling, but didn’t predict that it would become such a large part of my life).

It turns out that travelling less, spending more time exploring Birmingham, trying new places to eat, and swapping time spent in front of a computer for outdoor activities were all (at least subconsciously) planned. Now I just need to go to more concerts and spend more time with my non-Birmingham friends and then the list is largely complete.

Installing Ubuntu on a Chromebook

I’ve been experimenting with Chromebooks for a few weeks now to try and come up with a low-power low-cost no-maintenance setup. There are a lot of very good blog posts covering the basics already, but I thought it was at least worth documenting how I got Ubuntu installed on my older Chromebook (which is a bit of a frankenstein that goes against the general ethos of not upgrading or otherwise tinkering with the hardware). This is probably best not attempted on anything with less than 32Gb of storage, and 4Gb of RAM is probably a good idea as well.

Enable developer mode

To enable developer mode, press escape and refresh and hold down the power key. When the scary message appears then press Ctrl+d and wait for the (fairly long) process to complete. This will unlock the full bash shell, and give you enough control over the Chromebook to set up a chroot.

Install Crouton

Crouton is the script that is used to install Ubuntu in a chroot. Download it from here and ensure it’s in your downloads folder. Then press Ctrl+Alt+t to open the chrosh terminal, and type shell at the command prompt. This will get you full shell access to the Chromebook.

To install Ubuntu (at time of writing 16.04) then issue the following command:

sudo sh ~/Downloads/crouton -e -t xfce

This will take a while, but when it’s done then issue the following command to start Ubuntu:

sudo startxfce4

To toggle between ChromeOS and Ubuntu use Ctrl+Alt+Shift+Back and Ctrl+Alt+Shift+Forward. Performance is actually not bad, and productivity is only an apt install firefox away.

Other useful commands

The following commands could be useful (all issued within the ChromeOS shell):

See a list of possible distributions to install:

sh ~/Downloads/crouton -r list

Back up a chroot:

sudo edit-chroot -b name

Restore it:

sudo edit-chroot -r name

Delete a chroot:

sudo delete-chroot name

500 miles and beyond

I’ve just cycled 500 miles to raise money for Good Hope hospital in Birmingham. I did it over a few weeks, interspersed with all the other things I usually do, which made it a lot more feasible than trying to do it over a weekend (which I also think would have killed me). 500 miles might not seem like a lot, but I had only been cycling for just over a month when I started (after 10+ years without a bike), and I knew that I would likely have to do most of that distance as part of commutes, hospital visits, shopping trips, and other scenarios that would require me to carry a lot of luggage.

The first few days were very hard. I did a lot of road cycling and quickly remembered why I had stopped cycling in the first place. I then talked to other people who cycled in Birmingham and found a couple of canal routes I wasn’t aware of. I also explored the bit of north Birmingham between Good Hope hospital and my house and found a few miles of parks that meant I could avoid the nightmare that is Sutton town centre during rush hour. This made things easier, and I did the first bit of my challenge in and around Sutton and other parts of north Birmingham, with the occasional canal adventure in the south.

I also started cycling home from work some days. It’s a 9 mile ride (8 miles of which is canal towpaths), and I initially thought it might be too far to do every day. Towards the end I did do it every day, and also cycled to work the same way a couple of days a week. Most of my last 200 miles was done this way, and I’ve found it a much more pleasant experience than cycling on the roads.

I did manage a few trips where I got to cycle for pleasure, rather than to move between two places I had to be. I’ve been to Sandwell Valley Country Park, done some of the Rea Valley route, and done a 25 mile exploration of the Grand Union Canal in blistering sunshine. I certainly plan on doing more of that sort of cycling in the near future.

When I started cycling I was carrying everything in a rucksack (largely because the first bike I used didn’t have any other storage). I’ve since switched to panniers for most trips, which reduces the strain on my back significantly, although does add width that can be a problem in some tunnels. It means I can carry a lot now though, and a weekly shop is now very much a possibility (including wine, jars of curry sauce, and other heavy/bulky things). I’m also still refining what I carry with me on a daily basis, although I have found a use for most of the tools in my bag (especially puncture repair tools), and there is probably not much I would want to discard at this point.

I’ve completed 500 miles, but I’m not stopping there. The challenge continues until September, so I’m going to keep on cycling and see how far I get (I’m hoping for at least 700 miles). I’ll be tracking my progress on the website, and am still very much interested in further sponsorship.