• Copying a Linux Kernel From One System to Another

    There may be occasions where, for testing purposes, you want to copy a kernel from one machine to another.

    There are some fairly self-explanatory caveats:

    • The donor and target system must be running on the same architecture
    • The target machine shouldn't have any (important) hardware that's unsupported by your donor kernel

    Obviously, you'll ideally want to make sure that the hardware is as close to identical as possible (otherwise your testing may be invalid) so the above should be considered a minimum

  • Creating a virtual Network Interface in CentOS 6

    Sometimes you need to assign more than one IP to a server, even if it only has one NIC. To do so, you create a virtual interface, attached to the physical NIC.

    This documentation details how to do this in CentOS 6

  • Creating a Virtual Network Interface in Debian

    There are times when you might want to assign more than one IP to a system, even if it only has a single physical NIC. This documentation details how to create a virtual network interface (known as aliasing) under Debian (see here for how to alias in Centos 6).

  • Creating an IPv6 Tunnel on Linux

    RIPE, the European internet registry has started heavily rationing IPv4 addresses, meaning that the day of IPv6 only connections is fast approaching. BT don't yet support IPv6 on their connections, but I need to be able to use IPv6 to help ensure that servers are correctly set up to handle IPv6 only traffic.

    So, I need to create an IPv6 over IPv4 tunnel.

    This documentation details the steps to do this using Helium Electric's (free) tunnelbroker service

  • Gameboy Cartridge Battery Replacement

    Pokemon has been around for years, and it's awesome to see kids fall in love with something I played when I was younger (though I never developed quite the obsession with it that some did).

    For many, Pokemon on the Gameboy was the most memorable. Unfortunately, those cartridges have been doing the rounds for two decades now and are often in need of a little rescue.

    Within the cartridge is a CR2032 battery which maintains a charge to the SRAM so that things like save files are retained. There are sometimes some early signs of failure (like the clock going out of sync), but once the battery goes flat you'll generally find that save files will be lost whenever the cartridge is removed.

    Changing the battery is relatively straightforward, though you will need to make or obtain a special tool for it. This documentation details the process.

    I've used a Pokemon Red cartridge for this example, but have just been through the process for Red, Blue, Crystal, Green, Gold, Silver & Yellow. Once you've done one, the others follow on quite easily.

  • Gearbox Rebuild on Generic Chinese RC Car

    I bought some cheap(ish) remote control cars from Amazon, although they're pretty good fun (and have taken some abuse) longevity has been somewhat mixed so far. An early failure was caused by the pinion being improperly fastened to the motor's shank, leading me to strip down the car to repair it.

    These cars also suffer from another issue - common to almost anything remote control with a gearbox: when you give it to a kid, they have a tendency to sometimes crash into things and not subsequently release the throttle, leading to stripped teeth in the gearbox.

    That's exactly what happened with one of the cars, marketed on Amazon under the mouthful of a name "Remote Control Car RC Cars Karting Car Electric Remote Control Off Road 2WD 1:16 Scale 2.4Ghz High Speed Racing Buggy Off-road Fast Radio Controlled Electric Model Cars" (though the box says "Warrior"). Although it can happen to almost any RC Toy, in this case it wasn't helped by the manufacturer using a brass pinion but plastic gearing.

    This documentation details the process I followed in order to replace the damaged gear and rebuild the gearbox

  • Gearbox Repair on ZFLIN RC Car

    I bought a couple of (relatively) cheap Remote Control off-roaders on Amazon - primarily for having a bit of fun driving them about in the garden.

    Although ostensible different brands, models and sellers, the two cars are exactly the same except for the colour of the wheels and the cowling fitted.

    The cars are:

    Although they differ on Amazon, the boxes both show as "Top Racing Series". The ZFlin car carries a model name of the "Pillager" whilst the other is the "Warrior".

    They were fairly cheap when I bought them, and unsurprisingly, are made in China. They do nip around quite nicely

    However, I hit an issue that's alluded to in some of the reviews (on both) - after a few outings the gearbox appears to fail.

    Initially, you get a slipping clutch effect where the motor will rev up quite a bit before the car starts moving, eventually degrading to it sitting stock still and just making a whining noise (the difference in time between these two states, in my case, was about 10 minutes of driving time). The assumption most have made is that the motor is overrated for the gearbox and has destroyed the gears.

    Inevitably, this happens after you've thrown the packaging away. As helpful as Amazon are, I didn't want to deal with their returns system, so I decided to strip the car down instead to see if it could be repaired.

    Turns out the issue is much simpler than I'd assumed. This documentation details how to (quite easily) repair the car.

  • Generating a vanity .onion address

    Tor Hidden Services are accessed through a web address ending in .onion. Generally speaking these appear to be random strings of letters and numbers, though they're actually a representation of the public key generated when the operator created their hidden service.

    It is possible, however, to attempt to generate a keypair which will allow you to generate a desired vanity URL, though the process is essentially a brute-force of key combinations, so may take some time.

  • Honda Civic EGR Valve Replacement

    This documentation details how to remove and replace the EGR Valve on a 2004 Honda Civic 1.6 with a Petrol engine.

    You may need to do this if you're getting an engine management light (MIL) with diagnostic code P0401 (EGR Flow Insufficient). Some people prefer to start by cleaning the valve rather than replacing it - the process is exactly the same as detailed here, just that you'll put the old one back on after cleaning it (remember to order a new EGR gasket though).

    Honda used a variety of engines in different models of the civic though, so your EGR may be different. Before starting, pay close attention to the first picture in this document to check that your EGR location is the same (the EGR valve is the thing within the blue sticker on it in the photo).

  • Hosting TOR Hidden Services (.onions)

    The level of effort required to set up a TOR Hidden Service (known as a .onion) largely relates to the amount of paranoia you need to exercise regarding your anonymity.

    Whilst the ins and outs of Operational Security (Op-Sec) are a little too intricate for a single post, this documentation will take you through the steps required to configure a Debian server to host a .onion site with reasonable protections in place.

  • Howto tweet from BASH scripts using OAuth

     

    You may or may not be aware that Twitter have stopped third party applications from using Basic Authentication. For those who are not quite clear on the mechanics of authentication, when using Basic Authentication you (or your program) send a Username and Password with each request.

     

  • Howto use one instance of tcli for multiple Twitter accounts

    This documentation details how to allow one instance of tcli (OAuth) to be used for multiple user accounts,

  • Installing and Configuring KDump on Debian Jessie

    Having kdump enabled on a server provides a number of benefits, not least that in the event of a kernel panic you can collect a core-dump to help investigations into the root cause. It may simply be bad luck, but my experience with Debian Jessie has been that JournalD is absolutely hopeless in the event of a kernel panic.

    Pre SystemD we used to (sometimes) get a backtrace written out to a log, even a partial backtrace could help point investigations into a rough direction, but even with JournalD configured to pass through to rsyslogd those traces just don't seem to be appearing (which to be fair, might be because of the nature of the panic rather than the fault of journald).

    This documentation details the steps required to install and configure KDump on Debian Jessie

  • Installing iRedMail on Debian (Jessie) 8

    I've run my own mail server for quite some time, but it's started to reach the point where a refresh is probably in order.

    Normally, I'd prefer to build from scratch, but I thought, this time, I'd have a look at some of the "off-the-shelf" solutions that now exist. Mailinabox was quickly discounted because there's no real configurability, which doesn't sit well with me (it does simplify installation, but makes long-term management that much harder).

    iRedMail seems to have a reasonable following, and a scan of it's website and documentation suggested that it is, at least, reasonably sane.

    This documentation details the process I followed to install iRedMail on Debian 8 (Jessie). I used Jessie rather than Stretch (9) because that's what the VM I was repurposing was imaged with.

  • Installing Mailpile on CentOS 6

    I've been meaning to play around with Mailpile since the beta was released back in September. Thanks to a bout of insomnia I finally found time, though it turns out that getting it up and running on CentOS 6 is initially something of a pain.

    This documentation details the steps required to install and run Mailpile on CentOS 6

    DISCLAIMER: For reasons I'll discuss in a separate post, at time of writing I'd only recommend following these steps if you want to test/play with Mailpile - Personally I don't feel at all comfortable with the idea of using Mailpile in production in it's current state.

  • Integrating against the RequestRouter Alt-Svc Hints API

    Version 0.4 of RequestRouter introduces a new feature - an API designed to give edge devices (such as delivery appliances) hints to allow them to generate an RFC 7838 Alt-Svc header to further optimise routing for clients located behind a DNS server that does not support the EDNS Client Subnet (ECS) extension.

    This documentation provides a reference implementation, allowing an OpenResty based edge device to connect back to the Alt-Svc Hints API, whilst minimising the potential latency impact to some extent.

  • JoomShopping Plugin for ObRSS

    JoomShopping Plugin for ObRSS allows you to generate an RSS feed for your shop using the popular ObRSS component. It's intended as an alternative to the plugin sold by Foobla as that version may or may not work with later versions of ObRSS.

    This post is the documentation for the plugin.

  • Keeping Hitcounts accurate when using an NGinx Caching Proxy

    In previous documentation, we've configured sites to use NGinx as a Reverse Caching Proxy, leading to hugely improved response times on popular content. We've also implemented a custom configuration so that we can refresh the cache periodically, ensuring that dynamic content (such as Twitter modules) updates.

    One thing we haven't done as yet, though, is to address the issue of internal hitcounts. We've looked specifically at using NGinx with Joomla, and noted that a side effect would be inaccurate hitcounts displayed within Joomla (which remains true even when using the internal page caching).

    In this documentation, we'll be implementing a small script to ensure that hits served from the cache are still recorded within Joomla (or Wordpress, Drupal - whatever you happen to be using), albeit a little while after they happen.

  • Linking a Git Repo with Pivotal Tracker

    Everyone seems to use GitHub nowadays, but occasionally you want a private repo (without paying), so you set up a local Git repo instead. The problem being, you often lose the integration with the other tools that you use to manage projects. Git has the ability, but it is somewhat reliant on you having the relevant scripts available (such as post-receive).

    This documentation details how to configure your Git repo to link up with Pivotal Tracker.

  • ls -l Shows Question Marks instead of Permissions

    Occasionally, when running ls -l within a directory, you might find that the output shows question marks (?) instead of the usual permissions indicators:

    ben@Queeg:~$ ls -l ~/test
    ls: cannot access /var/www/html/Vx/Notes: Permission denied
    total 0
    d????????? ? ? ? ? ? Notes