Kernel Modules missing on Rasberry Pi

This, almost certainly, was a mess of my own making, but as I didn't find any answers with web searches I thought it was worth documenting for anyone else who sets a similar time bomb for themselves.

I've got some Raspberry Pi's which use NFS for their root partition. They used to be PXE booted, but at some point starting failing to boot so some time back I put a SD card back in for the /boot partition.

This, I suspect, was probably my undoing.

The Pi's have been working fine since, but I wanted to install Docker onto one of them. Although it installed, Docker failed to start, logging the following

Oct 09 22:45:43 redim-4-search-pi dockerd[3534]: failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to
Oct 09 22:45:43 redim-4-search-pi dockerd[3534]: modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.19.75-v8+
Oct 09 22:45:43 redim-4-search-pi dockerd[3534]: iptables v1.6.0: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Oct 09 22:45:43 redim-4-search-pi dockerd[3534]: Perhaps iptables or your kernel needs to be upgraded.
Oct 09 22:45:43 redim-4-search-pi dockerd[3534]:  (exit status 3)
Oct 09 22:45:43 redim-4-search-pi systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE

On examination, there is no modules directory for the kernel version I'm currently running

root@redim-4-search-pi:~# uname -r
4.19.75-v8+
root@redim-4-search-pi:~# ls /lib/modules/
4.19.66+  4.19.66-v7+

This post details the steps I took to resolve this issue

 

Read more…

OpenWRT opens multiple OpenVPN client connections

This is a slightly obscure one, but when I was initially hit by it, didn't find much searching on the net.

After setting up a new OpenVPN client config (i.e. the OpenWRT box is VPN'ing into somewhere, rather than acting as a VPN server itself) on an OpenWRT box, you might find that OpenWRT eventually crashes.

This documentation details the cause, at least in so far as it affected me

Read more…

Making a Polished Concrete Table

I've never really played around with creating things using concrete, but you see some awesome polished concrete creations.

We wanted a small coffee table for our decking, it'd need to survive whatever our British weather could throw at it so something concrete seemed ideal.

Although I had a specific use for it in mind, I still considered it experimental - odds are that you'll screw up the first one, so it's worth trying a few things.

This blog post details the process I followed, presented as a "How to".

 

Read more…

Triggering HomeAssistant Automations with Kapacitor

In an earlier post, I described how I've set up monitoring our home electricity usage using InfluxDB.

However, I thought it'd be good to be able to have this interact with our existing Home Automation stuff - we use HomeAssistant (previously Hass.io) for that.

In my earlier post, I described using Kapacitor to generate alert emails when the tumble dryer was finished, so in many ways it made sense to make this an extension of that. TICK scripts support calling arbitrary HTTP endpoints via the HTTPPost node, and HomeAssistant allows you to control sensors via HTTP API, so it's reasonably straightforward to implement.

Read more…

Monitoring our electricity usage with InfluxDB

The are various solutions on the market for monitoring power usage, ranging from smart meters with in-home displays (IHDs), to clamp meters linked to similar displays.

What the majority have in common, though, is a lack in granularity.

They'll commonly show you how much you've used so far today and how much you used (all day) yesterday (and maybe this week).

But, they often lack the ability to drill down further than that. This denies the user the ability to dentify why usage is high (does it jump at a certain time of day, or does it grow almost linearly through the day?).

 

Smart Meters

The widely touted claim that smart meters enable us to reduce consumption is itself questionable:

  • the supposed benefits don't come from the meter, but from the IHD. You can have a working IHD without the need for a Smart Meter
  • However you monitor your usage, there really is a limit to how much you can reduce it

But, even ignoring this, the real issue is that they don't expose the data in a way that allows you to best act upon it. Instead you're left turning stuff on and seeing how much the IHD's reading jumps.

 

Cloud Solutions

There are a variety of Cloud based solutions to choose from, but after reading around, I decided to order a cloud-linked clamp meter from the Owl Intuition-e series:

Owl Intuition sales picture

The key selling point to me was that it can be told to also send usage updates to a specific local IP - so even if the cloud service proved not to be up to scratch, I figured I could probably implement something.

Despite the (relative) triviality of making a good interrogable system, the Owl Intuition cloud interface turned out to be pretty limited - it does let you drill down over the last week, but beyond that you can only view per-day stats.

Owl Daily trend
Owl last month

This is better than your average IHD, but still really limits your ability to investigate usage (if you get a large bill, you probably want to be able to dig into at least the last month with reasonable granularity).

There is an Android app... but it's horrifically limited, you can view current usage and that's it (so no pretty graphs). Barely worth the effort of installing really.

The service also lacks the ability to do things like monitor specific plug outlets (as far as I've been able to find, OWL don't sell any smart plugs that interact with Intuition) and/or generate alerts based on usage.

So, it very clearly was time to build my own.

Read more…

Making a double sided shelf

Whilst I was making the shelf shown in "distressing wood to make a shelf", littlun asked if I could make them one too.

Obviously, there's a bit of a difference in tone/feel between my office & littlun's room, so I didn't use the same approach.

I also decided to hedge my bets a little - decorating the shelf differently on each side, so that if one side wasn't right, the other might have a chance. One side goes for a distressed wood effect, whilst the other goes for a mottled mix of red and black (the balrog effect...), similar to the look I achieved making a back for my desk

Desk privacy guard

This post details the process I went through to create the shelf.

Read more…

Distressing Wood to make a shelf

On reflection, this probably isn't the best example to lead with - the effect doesn't photograph quite as well as something using paint/stain (I wanted to keep the wood's colour), but the techniques used are the same.

I decided that I wanted another shelf up in my office - I've some nice Victorian train style shelf brackets, and plenty of scrap wood to call upon.

By luck, I found a length of pressure treated 2x4 that was already the perfect length.

But, it did look quite a lot like I'd taken a piece of scrap timber and bolted it to the wall (funny that...)

Timber screwed to a wall

Functionally, it's a shelf, but it really is quite rough. What I quite like, though, is the mix of colours - along with the wood's natural mix of colours, parts of it have a slightly green hue (because it's pressure treated).

So, I decided I'd have a go at distressing it - making it look like it was actually a shelf, but had seen some life.

 

Read more…

Vauxhall Corsa D balljoint and Lower Control Arm Replacement

Lower suspension ball-joints periodically reach the end of their useful life and need replacing.

They're rarely fun to do, but are (normally) quite simple. On the Corsa, replacing the Lower Control Arm as well is usually just two additional bolts, and may or may not be necessary (depending on your car)

This documentation details the  process of removing and replacing your lower control arm and balljoint on a Vauxhall Corsa D

I screwed up the dismantling pictures, so the pictures below were mostly taken during re-assembly (which is why things look nice and shiny).

Read more…

Saab 9-3 Front Wheel Bearing Replacement

Wheel bearings don't last forever, and inevitably need replacing.

Saab 93's have a combined bearing and hub assembly, so replacement is - in principle - fairly straight forward, no bearing press required. The ABS sensor is also built into the assembly, so the procedure described here can also be used for replacing ABS sensors.

Although the procedure is quite straight-forward, if you're unlucky it can also be a bit of a pig. Although a hub puller shouldn't be required, it's advisable to have on one hand - unfortunately the driveshaft splines have a habit of rusting into the bearing, making it extremely difficult to remove the axle when required.

This documentation details signs of a failing front wheel bearing, as well as the process for replacing it on a >2003 Saab 93.

Read more…

CentOS 8: Requiring a Yubikey OTP Press for SSH logins

Some 7 years back, I wrote a guide to requiring a Yubikey OTP for SSH logins on CentOS. In the time that's passed, the process has changed (a little), so this documentation provides an updated reference.

Although this is written (and tested) for CentOS 8, it should work equally well on CentOS 7 (and presumably also Rocky Linux) too.

The (increased compared to my previous post) flexibility of Yubikeys, along with their relative ubiquity makes them a fantastic candidate for two-factor authentication tokens. Modern Yubikeys can do U2F as well as using their proprietary mechanism, allowing them to be used with a wide range of software.

By the end of this documentation, we'll have configured a CentOS 8 server to require that a user provides a Yubikey press along with

  • Username AND
  • Account password, OR
  • Authorised SSH key

For brevities sake, the majority of this documentation assumes you want root to manage user's yubikeys - something Yubico call Administrative level managment - switching between the two is relatively straight forward, so details on how to switch "User Level" will be given at the end of the document.

 

Read more…