Setting up mfsBSD for receiving ZFS snapshots on systems with low memory

I recently had a need to boot into a fresh server (a VirtualBox VM, actually) with FreeBSD in order to partition the disk and make it ready to restore another machine onto it. Of course I turned to mfsBSD. I downloaded the ISO, started the zfs recv, and found sometime later I found my VM had lost its disk and there were messages that looked like the VM had run out of memory. Read On →

Restore FreeBSD from a ZFS Snapshot

This was a beautiful sight this morning. The image above is a VirtualBox console showing a booted FreeBSD system. That system has been restored from a ZFS snapshot taken last November. So, how did we do it? Creating the Snapshot First, let’s take a look at actually creating the snapshot: root@manaha:~ # zfs snapshot -r zroot@2018-11-06 root@manaha:~ # zfs send -Rv zroot@2018-11-06 | gzip | ssh backup@home "cat > /data/backup/manaha/2018-11-06. Read On →

acme.sh revisited: ECC & Wildcards

A while ago I wrote about using acme.sh to automate my HTTPS certificates. In the post I used a domain (bnix.club) along with a number of specific subdomains (“logs.bnix.club”, “f.bnix.club”, “www.bnix.club”). Today I wanted to add a subdomain to an existing domain: manaha.co.uk. This has a number of subdomains, so rather than adding a new one I decided to create a wildcard certificate. While browsing the documentation for acme.sh, I came across ECC certificates, and thought that if I was recreating a certificate that I could use this too. Read On →

FreeBSD Ports unable to use multiple Github repos with the same name

I maintain the hugo (www/gohugo) FreeBSD Port. In a recent release (0.51) a situation arose where the dependency “mitchellh/mapstructure” required a fix. The Github repository for the dependency was forked to “bep/mapstructure” and a Pull Request to the original repository made. The Pull Request wasn’t pulled into the original repo in time for the 0.51 release (and still haven’t at time of writing), so the developers have instead specified both the original and forked repos as dependencies. Read On →

Ansible ad-hoc command on multiple hosts

Quite often I want to run an ad-hoc command against a number of hosts, usually this is a subset of an existing group (and often new nodes added to a group). Let’s say we had an inventory that looks like this: [webhosts] web1 web2 web5 [jenjins] j1 j2 j3 mac-j2 mac-j3 wj1 We’ve just added mac-j2 and mac-j3, run some Playbook against them, but realised we wanted to reboot them after the Playbook for some reason. Read On →

VNC over SSH via a Raspberry Pi

Often when I’m away from home I leave my iMac on in case I need to grab anything from it remotely, plus it’s ready to go when I get home. Usually I access it using SSH, via a Raspberry Pi: +-----------+ +---------------+ | Internet +--------------> Raspberry Pi | +-----------+ +--+------------+ | | +--v----+ | iMac | +-------+ This is fine for SSH, but when I want to use other things (for example, VNC) it can be a challenge. Read On →

acme.sh, plus Linode, plus DNS, plus FreeBSD

I’ve been meaning to use Let’s Encrypt for some time now, I don’t really have a good excuse as to why it’s taken so long, other than I wanted to use DNS to verify I owned the relevant domains, and I hadn’t found an easy enough tool to use. My lame excuse faltered when Dan Langille ported the acme.sh client to FreeBSD. It’s taken me a while to figure out exactly how I aught to use it, as I wasn’t 100% about what I was doing. Read On →

freebsd-upgrade In A Boot Environment

Yesterday FreeBSD 11.1 was released. Once I got into work I started upgrading the VM I use for day to day activities. After creating a Boot Environment (BE) using beadm(1), and running the upgrade and install parts of freebsd-update(8), I rebooted into a newly activated BE only to find I had an 11.1 kernel, but a 11.0 userland… I had no idea what I’d done wrong. After some questions on the FreeBSD Forums, I figured it out. Read On →

BSD Desktop Week

Last week on Twitter I was promoting BSD on the desktop. I'm promoting #BSDdesktopWeek, spent part of the weekend building a #FreeBSD desktop running #xfce Go give it a try! pic.twitter.com/eDhfTzst8r — Ben Lavery-Griffiths (@forquare) February 1, 2016 I got a small flurry of “likes” and “retweets” regarding a number of posts, and one (I think) real person even posted to #BSDdesktopWeek! Haven't used a @freebsd system as a desktop lately? Read On →

Raspberry Pi USB-GPIO OS X and FreeBSD

I play with my Raspberry Pi so rarely that I forget how to use my CP2102 serial converter to connect from my iMac or FreeBSD laptop to the Raspberry Pi, so I thought I’d write a blog post and then I’d have an easy place to go back to remember how… Connecting the cables Raspberry Pi Model B connected to USB—UART Adaptor. Click for bigger image. On a Mac Acquire a CP2102 serial converter Download the driver (direct link to zip file) Reboot Attach Raspberry Pi using a USB 2. Read On →