RSSAmplifier

Blog

netprint

blog of James MacMahon

operand.caRSS feed ↗55 posts

Latest posts

How to stop Chromium continuously logging out from Google

I had a problem where every morning I would sit down at my workstation to start the day and I would have to re-sign in to all my Google accounts because at some point after I left that workstation the previous day all those authenticated sessions would be invalidated for some reason. It wasn’t like this would happen some time in the night either: I also saw it during the day, though less often.…

If you don't physically own it, it's not yours

It all started with Mythbusters. Last May, we signed up for Discovery Plus and were watching each episode from the beginning. I was happy, damnit: Mythbusters holds a special place in my heart. There’s no way to buy a giant box set of all the episodes and we haven’t had any cable subscription for more than 10 years so I haven’t been able to watch it for a while. I love the show, and even wanted to…

How I bricked then recovered my reMarkable 2

Let me start by saying that the reMarkable 2 is a great device. I’ve wanted something like this for a long time: a relatively open device that runs Linux with an eInk screen and the ability to write on that screen with a pen. The reMarkable 2 delivers: I can ssh into it, and there’s a whole bunch of people writing code for it . I find I’m using it a lot. Unfortunately, the fact that I can ssh into…

Digging into a MongoDB 3.6.20 concurrency bug

Spinning up tempfile

yet again, time for a change capablanca has been my primary file system for the better part of 7 years. I bought the parts in 2013 and it’s been serving files faithfully ever since. I had a bit of a scare with it when I almost lost its zpools , and back when it was using 2TB Western Digital Green drives there were two drive failures within the space of two weeks that would have destroyed my data…

How not to replace thermal paste on a PS4

Due to the “stay at home” directive that we’re all under, I’ve been tackling projects that have piled up over time. One of these is fixing the Playstation 4. Every time it runs something more than the menu it sounds like it’s taking off. The symptoms led me to suspect a cooling problem: either the fan was full of dust and not doing its job or the thermal paste wasn’t effective anymore. I chose the…

SMR drive detection and benchmarking with fio

I use a lot of disks in my fileserver(s). I try to buy different models and versions in an attempt to de-correlate failures. I’ve bought a few external drives and shucked them in order to capitalize on deals that unfortunately only seem to apply to external drives. One of the external drives I bought contained a Seagate Barracuda Compute drive. Searching around for information on this drive yields…

Was my choice to use the x200 rational?

I’ve used a liberated X200 since February 2018, and coming up on the first anniversary has started me thinking - was my choice to switch to the x200 a rational one? I’ve been very worried about potential exploits involving the Intel ME (IME) and that was the motivation to use this machine. Let’s argue the other side of this: that this choice was irrational. First, physical access to my workstation…

How many published opinions are no longer held?

Neil deGrasse Tyson recently gave his opinion on tattoos when he was on the Joe Rogan Experience podcast: There’s nothing I value in my mind, body, and soul so much in this moment, that I want to indelibly etch it on my skin. I want to leave room for me to have a possibly more enlightening thought later. I’ve always committed to making the things that I post here “write-only” in a sense - I won’t…

Why I am choosing the X200 as a workstation in 2018

I’m choosing the X200 that I installed coreboot on as my primary workstation and this post will detail why. why I’m switching to the X200 I’m switching to the X200 primarily in response to the vulnerabilities that have been discovered in the last year. Specifically, the ability to execute arbitrary code on the Intel ME . what is the Intel ME? Intel’s Management Engine (ME) is an always-on…

Liberating a X200

In this post, I’ll talk about taking an old X200 Thinkpad and replacing the proprietary BIOS with coreboot, removing the Intel ME. Table of contents: before flashing battery check EC update building the replacement BIOS flashing coreboot preparing a Raspberry Pi Zero W connect the RPi to the X200’s BIOS SPI chip a note on cargo cult thinking writing the replacement BIOS upgrading hardware before…

Using Go with a private Github and forks

Using git to track unlistened to podcasts

I use git annex as a podcatcher , and only recently thought of the following idea: have a separate git branch called ‘unlistened’ and git rm symlinks to podcasts that I’ve listened to. I run git annex importfeed nightly in a cron job to grab new podcasts. Periodically I run git annex sync on my workstation, and then I can see when podcasts that I’m listening to have new episodes. Previously I…

Flashing a LSI 9211-8I with the EFI shell

capablanca used to have two zpools: storage and archive. I recently combined both into one zpool with two mirror vdevs made out of 3 disks each (totalling 6 disks). But its Supermicro mainboard doesn’t have enough onboard SATA ports to support 1 OS disk and 6 ZFS disks. I started looking for SATA PCIe expansion cards, and was disappointed that most were 1x - 4x . That doesn’t give full bandwidth…

Create a bootable FreeDOS USB stick

I’ve done this several times with syslinux, and forget how each time. This time however I used a different method: have one FreeDOS partition, and another partition with your files on it. I found this much less error-prone than getting syslinux to correctly boot FreeDOS and see the files that you actually want to run (e.g. a BIOS update). Here’s how: Download FD12LITE . Extract the img from…

On minimizing

I’ve been sentimental about everything my whole life. I keep a lot of things, have a lot of lists, and have a few “collections”. In the last few years I’ve been trying to sell or give away things in order to minimize what I’m focusing on. This has included donating old computers , which was painful for someone sentimental like me. It also includes a few cases where I donated some books after I…

Moving to non-bare git-annex repos on my file server

I have more than 20 git-annex repos. Previously, all file content was stored in bare git repos on capablanca under the directory /archive/annex/ , like so: /archive/annex/documents.git/ /archive/annex/ripped_cds.git/ /archive/annex/ripped_movies.git/ /archive/annex/cameras.git/ ... This was problematic though because I recently installed Kodi on a Raspberry Pi 3 and hooked it up to my TV - I…

What's using all the disk space?

eVGA DisplayPort hub monitor flickering? Check xrandr!

Recently I bought an eVGA DisplayPort hub , meant to take advantage of the Multi-Stream Transport capabilities of the DisplayPort port on my main workstation magnus . Using debian stretch means that MST is supported - all I had to do was plug it in. The two monitors I plugged into were not the exact same model, but both were Dell and ran at 1080p. I saw problems right away - the right monitor…

GELI fail (or how I almost lost capablanca's zpools)

After the last post I decided to perform a FreeBSD upgrade on capablanca. This went smoothly and I performed the standard zpool export, geli detach, and reboot. When it came time to bring the zpools back, however, the shell script that brings up each zpool stopped at the first disk: + geli attach -k /root/geli_key_WD-WCC4M2773993 /dev/diskid/DISK-WD-WCC4M2773993 Enter passphrase: geli: Wrong key…

Shuffling zpool disks

capablanca’s three zpools were a mixture of WD green and red disks: archive had one Green, one Red disk public_storage had one Green, one Red disk storage had one Red disk. Yes, capablanca has all Western Digital disks - everyone has their favourite disk brand and mine for the longest time was WD. I’m inclined towards picking HGST or Toshiba these days due to Backblaze’s data but the current array…

A more responsive operand.ca

Finally had some time to make this site more responsive - it has always looked bad on mobile browsers, despite being just text and a few images. Mostly the process involved correctly using CSS: diff --git a/_includes/style.css b/_includes/style.css index bf6e064..cf8f76f 100644 --- a/_includes/style.css +++ b/_includes/style.css @@ -1,12 +1,15 @@ -img.center { +@media only screen and (min-width:…

Resolving DNS through OpenVPN

I have OpenVPN on my home’s OpenWRT router configured so all traffic is sent through the tunnel, and this includes DNS requests. But, any DNS query using just a machine’s hostname did not work: jwm@magnus:~ [] $ ping capablanca ping: unknown host capablanca This works when the machine is a part of the LAN, why doesn’t it work when the machine is asking from the VPN? netcat showed an interesting…

Successful reset of Mica's BIOS

I previously tried resetting Mica’s BIOS by both using the reset jumper and pulling the CMOS battery for a long time (hours). This morning I successfully reset it using the jumper method, but the difference is that I used another (unused) mainboard’s jumper instead of scavenging the one used for JPCOM1 on from Mica’s mainboard: Link to manual PDF All settings have reset to default now - my best…

Pre-RIP all my discrete devices

Recently, my MP3 player suddenly refused to play any file. I would click on the file, and it would get stuck on “Loading…”, like so: I eventually fixed it by re-installing Rockbox . I started reading more about the current Rockbox news and stumbled upon Daniel Stenberg’s post about how he was leaving the Rockbox project . In particular, he closed with: mp3 players are now already a thing of the…

Back to OpenWRT

Frustrations with my OpenBSD router ’s wireless performance have caused me to switch to a TP-Link Archer running OpenWRT. The wireless AP performance has always been just OK. Better antennas really did make a difference in terms of signal strength, but not with the bandwidth. The maximum transfer speed that I saw was 300 KB/s but I would mostly see less than that. With the Archer, I’m seeing MB/s…

Deploying OSSEC at scale

Just needed better antennas

Mica, my OpenBSD router , had spotty wireless performance, prompting me to use the TP-LINK WA901ND as a wireless access point . This hasn’t been working as well as I’d hoped (or initially saw). Wireless performance was still spotty. As well, UPnP packets would not route through the wireless interface and hit miniupnpd on mica. I tried lots of things and nothing would work. Inspired by the blog…

Moving from liferea to newsbeuter

newsbeuter is a mutt-like reader for RSS feeds. I’ve been using liferea for a while now but just found out about newsbeuter. I immediately wanted to switch - I enjoy using mutt a lot, and wanted an equivalently good solution for reading RSS feeds. I had a lot of cached RSS content in liferea though, and wanted to move all of it from liferea’s db to newsbeuter’s db. First, I looked at liferea’s db.…

Generating weather forecast SMS messages using forecast.io and voip.ms

Gluing together the APIs of forecast.io and voip.ms with a bit of Python provides the ability to generate SMS messages containing the day’s weather forecast. Register for an API key from forecast.io. Then, get the forecast with a simple GET request (filling in information like the API key and the desired location): import json import requests url =…

OpenWRT on the TP-LINK WA901ND

BusyBox v1.24.1 (2016-01-16 22:11:28 EST) built-in shell (ash) _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ----------------------------------------------------- DESIGNATED DRIVER (Bleeding Edge, r48257) ----------------------------------------------------- * 2 oz.…

Why doesn't 'docker stop' work?

I’ve been playing around with docker on one of my VPS machines recently, moving applications from another VPS and containerizing as I go along. Today, I CTRL-C’ed a docker build run that I realized wouldn’t work, and after that I couldn’t do anything with that container. For hours… CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8b46f61ea788 2c32664e08a0 "/bin/sh -c 'apt-get " 2 hours ago Up…

Let's Encrypt all the things!

Let’s Encrypt entered public beta recently, offering a free and automated resource for getting signed certificates for your domain. I jumped at the chance to test this on the OpenBSD VPS that hosts this site and answers @operand.ca email. Here’s how I did it: I chose the awesome acme-tiny Let’s Encrypt client because it is a tiny (auditable) Python script that performs all the required steps for…

Using git-annex as a podcatcher

My podcast consumption loop is currently: use Liferea to follow each podcast RSS feed download the new audio files from those feeds to ~/podcasts/ rsync ~/podcasts/ to my mp3 player: a Sansa E200 series device running Rockbox delete the podcast when I’ve listened to it - rsync will propagate those changes onto the mp3 player. I follow about 10 podcasts so this manual process isn’t that bad. I’ve…

looking into git-annex

I care a lot about not losing files, enough to think about a checklist to follow to make sure that files are preserved. Recently I lost some files due to an errant dd . I missed adding make sure that your backup system is incremental and automatic to the checklist. My current method of manually rsyncing files and directories from content creators to content stores is not good enough. I’ve now lost…

Can't afford to be that cheap

The Acer C720 Chromebook that I have been using as a daily driver for the last 5 months has given me a bit of trouble the whole time. I would be the only one in a group of laptop users to experience wireless disassociations for example. It only has 32 GB of SSD, which is painfully small. Most concerning, I would regularly see dmesg errors: [ 8.531792] Adding 1310716k swap on…

Spinning up mica, my new OpenBSD router

Table of contents: time for change new hardware installing OpenBSD 5.7 post-installation configuration verdict decommissioning smyslov time for change smyslov , an old Sun Blade 100 running OpenBSD and acting as my home network’s router / firewall, has been running since November 2013 with no problems except occasional wireless timeouts. Here’s one of the first times booting OpenBSD on smyslov on…

Diskless booting Debian using Debian

I’m noting this here because I always forget how to netboot machines. Install the dnsmasq daemon: apt-get install dnsmasq The relevant /etc/dnsmasq.conf configuration lines are as follows: interface=eth0 dhcp-range=192.168.25.50,192.168.25.150,12h dhcp-boot=pxelinux.0 enable-tftp tftp-root=/var/ftpd Restart dnsmasq: service dnsmasq restart The following needs to be added to…

Spinning up aronian, the C720 x86 Chromebook

Using the Samsung ARM Chromebook as my daily driver since June 2014 has been great, but during the beginning of this month I started looking for something different. I had found myself recompiling the kernel too many times after forgetting something. The latest trouble was connecting to my new workplace’s VPN: xl2tpd + ipsec didn’t work, and neither did l2tp-ipsec-vpn-daemon (which autoconfigures…

Upgrading OpenBSD on the 256 MB Ramnode

Part of keeping OpenBSD secure is applying patches as they come out. OpenBSD 5.6 has had a few errata since the release so it was time to update operand.ca. Luckily following stable is simple: Following the section titled Using CVS to Get and Update your Source Tree , grab the CVS source for base: $ cd /usr $ rm -rf src/* $ cvs -qd anoncvs@openbsd.cs.toronto.edu:/cvs get -rOPENBSD_5_6 -P src Then…

patching file 'About me'

About me Inspired by the format found at The Setup , here is an update to the 2013 “About me” entry : Who are you, and what do you do? My name is James MacMahon. I graduated from the University of Waterloo’s Computer Engineering program in April 2010. I worked at IBM from October 2010 until March 2015 on Testarossa, an optimizing compiler. I now work at Primate Labs developing Geekbench and…

Analyzing my qmail logs (plus how I tried to prevent backscatter)

Table of contents: what does backscatter look like? log analysis what I did to try and prevent backscatter use rhost-check to validate reverse dns records using libspf2 to validate sender IPs validating RCPT TO With my Linode decommissioned and all the important files retrieved, it was time to search in /var/log/ for interesting things. As mentioned in the previous post , I noticed that my qmail…

Moving operand.ca from a linode to a ramnode

Post summary This post details the motivation and methods used to move operand.ca’s backing VPS from Linode to Ramnode. Table of contents: Post summary Step 0 - time for change Step 1 - configuring OpenBSD Step 2 - configuring httpd and varnish httpd varnish Step 3 - opensmtpd, spamd, and dovecot opensmtpd spamd dovecot Step 4 - throw the rocker switch Step 0 - time for change For a while before…

Working backlight brightness adjustment for the ARM Chromebook

Ever since I got Linux 3.15 booting on the Chromebook , the one thing that has bothered me the most was that the backlight brightness was always at 100%. This caused eye strain, especially at night. Little did I know that a working /sys/class/backlight/ entry was two simple kernel patches away… In menuconfig: [*] Backlight & LCD device support ---> <*> Lowlevel LCD controls <*> Platform LCD…

Thoughts on file system health

For every unique file, is that file stored on a file system that uses an integrated checksum to achieve data integrity? Integrated checksums will catch hardware errors, mainly hard drive errors that occur before the drive completely quits. Before moving my files to ZFS, I had a Linux file server with mdadm RAID5, and had silent data corruption that mdadm didn’t appear to notice. Some file systems…

Forwarding ports with an OpenBSD router

Rather than modifying pf.conf directly, relayd is the better (and preferred) way to simply forward ports: relayd is a daemon to relay and dynamically redirect incoming connections to a target host. Its main purposes are to run as a load-balancer, application layer gateway, or transparent proxy. The daemon is able to monitor groups of hosts for availability, which is determined by checking for a…

The hunt for ECC support with a mini itx mainboard

It all started with a post from brycv.com, titled The Quest for a Mini-ITX Motherboard with ECC . The post mentions that Intel makes (made) a Mini-ITX mainboard (now discontinued) which has the title of Intel Server Board S1200KP ( newegg link ), and details setting up a compact file server with the board. In the comments section of this post, “Johnr” left the following: A quick google search lead…

computers--; // donated karpov

I donated karpov to the Lab in Toronto: Our home in Toronto is called The Lab - a 7000 square foot digital literacy hub. It’s a place where anyone with an interest in technology can meet, learn and collaborate. It’s good, but with your help, it could be better. Donations from people and companies like yours support our non-profit members and they make an enormous difference. Your donations ensure…

Quieting Smyslov's fans with sewing machine oil

smyslov is the Sun Blade 100 that I have been running as an OpenBSD firewall / router since last November. Unfortunately, one of the bad things is that it’s loud. Inspired by methods such as this , I took apart smyslov and added sewing machine oil to the two primary fans in an attempt to quiet them. The process is fairly straight forward: Applying the sewing machine oil Take the case off: Locate…

On Taylorism and software development

Table of contents: Taylorism in software development Where the analogy falls apart Problem of out-of-band information Synchronizing mental models Code ‘ownership’ is bad Exploring the problem domain Conclusion Taylorism in software development One of the core themes of Taylorism as mentioned in the Wikipedia article is that it emphasizes the “knowledge transfer between workers and from workers…