I started putting my memories of a dream I had last night in a Mastodon post, but as I typed I realised there was a lot more weirdness to my dream than my initial memories of it as I woke and it needed much more characters!
I remember the dream starting as I dug up my Amstrad CPC464 (which in reality is long gone), which had morphed into a CPC6128 but with an integrated dot matrix printer rather than its 3” disk drive! Then I opened it up and found my old ZX81 (which I never actually owned but borrowed from school) inside it.
Then I found myself inside an electronic shop from my hometown (that I’m not sure ever existed) and found a ZX Spectrum magazine for sale with a new “circuit board” that plugged into the ZX Spectrum (shades of RPi hats here) taped to the cover as a free gift. This gave the ZX Spectrum modern GPU power with a HDMI output.
Cue playing Sorcery+ on a 4k monitor powered from the supercharged ZX Spectrum…! Note: Sorcery was an Amstrad game and never made it to the Spectrum!
The dream went even deeper into the rabbit hole from that point as that “plugin board” led me to a whole new secret group of makers that add modern hardware to the first round of personal computers to supercharge them. So lots of boxes of various plugin boards from the BBC Model B and more..!
Just what had I been eating/drinking/smoking before I went to bed?
Then this morning I see a new book documenting the era of shareware games on Daring Fireball.
I think the dream had started as I was playing Fallout 4 on my Steam Deck just before going to sleep. Ever since I got back into gaming after a 20 year break it’s still very rare that I would play games just before going to bed. But recently I’ve lost control of the Steam Deck to my daughter who has found games! She’s still a few years younger than when I had my Amstrad, but she’s loves games as I much as I did then. So my time to play is quite limited.
A years old Wifi issue finally sorted! Yeah!
I’ve always wondered why I had wifi issues in my garden office on my phone and more generally everywhere else in my garden. It’s only 10m away from an access point with good quality external aerials. Which should give decent coverage over the entire garden and offices.
I have a central Draytek 2820n router connected to a Netgear GS724t switch (then another in my garden office). There are two Draytek Access points connected to the switch. AP-800 and AP-900. Both legacy products now, but OK.
Wifi reception in the house is generally decent. But in the garden and our garden offices it is rubbish. There are multiple Smart switches that are always disconnecting (in fact I threw one away a few years ago and replaced it with a new one). A pair of Sonos speakers that are always disconnecting (though they should be using SonosNet and not general wifi) and a Raspberry Pi on the boat that I can rarely reliably SSH to.
Our garden has some overhead power cables above it. These are 11kv with three phases and power the entire village.
Yesterday morning I just noticed that I was getting a very decent wifi signal on my phone (20Mbps down). Then it dawned on me that the cables are turned off today for tree work and the village is being powered by a diesel generator for the day. The naive “jumping at straws because this dammed wifi problem is never going away” person in me immediately assumed that interference from the cables was the issue
Then more knowledgeable people than me told me that a 50hz electricity cable will not interfere with a 2.4/5Ghz wifi signal. The frequencies are too different. Still something is awry. I also noticed that the three smart plugs in my garden that are generally problematic are connected without issue. Same goes for two Sonos speakers. I could even connect to the RPi with a decent connection. Enough to update Raspbian without having to use Tmux.
However, then the connection fails again and the power has yet to be restored to the cables. So what is the problem?
The Draytek router has AP central management and I configure the two Draytek access points using that tool. I’ve rarely looked at the config pages of the actual APs.
But now I looked at one. Turns out that it was using two wifi networks with the same SSID.
The AP in the house had both SSIDs connected to LAN-A, but the AP in the garden had one of these “pseudo” networks connected to LAN-B. The LAN-B is not connected to anything!
So when the power went off the APs rebooted. Then the devices get a decent connection. But as the phone roamed it switched to the SSID with no network connection and so the iPhone goes crazy with no internet connection and switches to 4G. I have no idea why the Smart switches disconnected though.
I just turned this off on both APs and everything now connects flawlessly with a strong signal. I have had this problem for years…! Sheesh…!
UPDATE March 18, 2023
So the wifi failed again. I went back to check and the multi SSID option had been re-enabled. Turns out the AP Management tool on the router has a profile that enables it, and it kept cloning it to the access points. Now that’s fixed. Fingers crossed.
UPDATE April 18, 2023
So the problem was not fully solved. The issues above were real, but the heart of the problem was hardware. In these days of reliable hardware how odd to have an issue that is not PSU related. I swapped out the AP, but the only spare AP I had did not have a built in Ethernet switch, and there’s an IP camera attached to the existing AP. So I disabled wifi on the faulty AP point (Draytel AP-900), used that as a switch and plugged in the Ethernet portless AP (Draytek AP-710). For a week before our holiday and the few days we returned it has proved to be faultless. I do need to remove that faulty unit completely. The AP in the house is plugged into an adjacent switch and so only needs a single Ethernet port. I’ll swap the two over soon.
migrated blog to new hosting provider
So after moving my old hosting provider to a monthly renewal 12 months ago in preparation for moving it. I finally found a day to migrate it all over to a new provider on Saturday. I chose Mythic Beasts. A Cambridge based company that I have a few other domains hosted on and have been impressed by their plain talking sales, sensible pricing and proper technical support.
Their support pages suggests a “no downtime” workflow that involves copying their DNS entries for your new site to your existing hosting provider’s DNS record. So even though you do not know when the changes propagate through DNS servers both your existing provider and the new one’s all point to the same new server on your new provider’s site. Very straightforward.
I also discovered a cool WordPress plugin (Updraft Plus), that I’ve been using for backups for some time, has a very restore function that you can easily and quickly restore a backup to a new site. If I’d have known how easy and reliable this perhaps I would not have bothered exporting my site, and importing to a backup server. Just In Case.
Migrating My Root Drive Raid1 Array to a Pair of NVME Drives.
I’ve always tried to keep upgrading my own Linux boxes. I enjoy it and as I found out a few years ago if I do not regularly keep updating hardware then I completely lose knowledge of doing so.
My latest project is to move all the services from my workstation to a separate box. I’ve got a few RPis around the house running a few services, but I’ve always used my workstation as a games machine/server/development/everything else. In fact for a number of years I stopped using Linux as a workstation at all and this machine was a headless server.
Because of this cycle of continuous upgrades this computer has existed for probably twenty years. Always running some form of Linux (mainly Gentoo).
Currently it’s using some space heater of a server motherboard with a pair of E5 2967v2 on a Supermicro X9dri-LN4 motherboard with 128Gb of ECC DDR3 RAM (very cheap!). That’s fine over winter (my office has no heating) but I do need to fully transfer all the services to the low power Debian box under my desk instead!
Anyway this computer boots from pair of SATA SSD drives in a RAID1 array, with a six disk RAID10 array for data. That array needs to be replaced by a single large drive when I’ve finished moving services to a new machine….!
The motherboard is too old to EFI boot from NVME drives. However, whilst browsing Reddit I came across some people talking about using an adaptor card to add in four NVME drives and using bifurcation toggle each drive proper access to the four PCIe channels that NVME devices need. So x4,x4,x4,x4 instead of x16.
This was not supported on this board, but turns out Supermicro did release a new BIOS that does support bifurcation.
So I bought the card they suggest and a pair of 1TB NVMe drives. The drives are only PCIev3 as that’s all the motherboard supports. PCIe is backwards/forwards compatible. but PCIev4 drives are considerably more expensive than PCIeV3 ones. I may as well get a pair of these, then when I upgrade to a PCIeV4 motherboard the available drives will likely be larger and cheaper!
– Asus M.2. X16 Gen 4
– 2 x WD Blue SN570 NVMe SSD 1TB
The adaptor and cards came. The adapter has got a lovely heatsink that sandwiches the drives in with a small low noise fan.
The adaptor took ten minutes to install. When booted up the BIOS setup disk was a little tricky to enable bifurcation as the slots are numbered from the bottom. This one was CPU1/slot 1.
I had to recompile the kernel to add NVME support, but once booted the pair of drives were there.
After many, many years of using /dev/sdX to refer to storage devices (I was using SCSI hardware before SATA), it does seem a little strange to be running parted on /dev/nvme1n1 then getting partition devices like /dev/nvme1n1p2
I know I should likely move to ZFS, but I’m knowledgeable enough about mdadm not to completely mess up things! ..and replacing a pair of RAID1 devices is just so easy with mdadm.
Workflow is:
– partition drive.
– add to raid array as spare
– fail drive to be removed and then remove it.
– Wait until raid1 array is synced again.
– repeat with second drive
– resize array, then resize the filesystem
procedure
fdisk /dev/nvme0n1
We can use fdisk again as fdisk is GPT aware. Previously we’d always used parted. But I prefer fdisk as I know it!
– partition
– Label the drive as GPT
– Make 256mb partition and mark as EFI boot.
– Make 2nd partition for the rest of the drive and mark that as type Linux raid.
Now add that drive to our raid1 array. For some reason it was not added to a spare, but was instead immediately synced to make a 3 drive raid1 array. I think this is because I previously created this array as a three drive array (for reasons I forget). I guess that’s stored in the metadata of the array.
mdadm /dev/md127 --add /dev/nvme0n1p2
We can watch the progress:
watch cat /proc/mdstat
Once completed we can fail and then remove the drive
mdadm --manage /dev/md127 --fail /dev/sdh3
mdadm /dev/md127 --remove /dev/sdh3
Then let’s update our mdadm.conf file
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
Then remove the oldlines:
vi /etc/mdadm/mdadm.conf
Finally let’s wipe that old drive of RAID data so the array does not try to reassemble it to the array.
wipefs -a /dev/sdh3
A reboot is a good idea now to ensure the array is correctly assembled (and new PAT reread).
Now let#s copy the partition table (PAT) to the second new drive.
sgdisk /dev/nvme0n1 -R /dev/nvme1n1
Then randomise the UIDs
sgdisk -G /dev/nvme1n1
Check all is OK
Now repeat adding the second new drive:
mdadm /dev/md127 --add /dev/nvme1n1p2
mdadm --manage /dev/md127 --fail /dev/sdg3
mdadm /dev/md127 --remove /dev/sdg3
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
wipefs -a /dev/sdg3
resize after adding new devices
mdadm –grow –size max /dev/md127
df -h
Then resize the filesystem
resize2fs -p /dev/md127
benchmarks
dd if=/dev/zero of=/home/chris/TESTSDD bs=1G count=2 oflag=dsync
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 4.7162 s, 455 MB/s
dd if=/dev/zero of=/mnt/storage/TESTSDD bs=1G count=2 oflag=dsync
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 10.0978 s, 213 MB/s
dd if=/home/chris/TESTSDD of=/dev/null bs=8k !10032
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 0.666261 s, 3.2 GB/s
dd if=/mnt/storage/TESTSDD of=/dev/null bs=8k !10034
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 0.573111 s, 3.7 GB/s
I did think that the write speed would be faster. But I guess dd is not the most accurate of benchmark tools.
A review of 2022
So a quick review of 2022. Not done one for at least a decade.
I started writing this during Christmas, then a few updates. I wanted to add links and photos. But hey, it’s now February and I have not. I should learn from this. I either blog lightly, or not at all!
So I got more and more into regularly gaming. From starting again after not playing anything since Quake (the first), during the pandemic, to this year regularly playing games, and even treating myself to a Steam Deck (which is wonderful). Witcher II, Fallout 4, Elite Dangerous, God of War, and of course Minecraft with my daughter. I’ve got her into gaming as well. Starting the year with games that she’d played on Apple Arcade, Sneaky Sasquatch, then moving onto Minecraft with me (and others), then onto the Steam Deck. She loves Alba, Sonic, Stray and Slime Rancher. Other games she’s tried but failed to get into are Planet Zoo (which her cousin plays),
Apart from a new GPU (see above for the reasons, AMD RX 6600XT) and Steam Deck (also see above), then I’ve not done hardly anything. no RPI’s Arduino’s or anything properly geeky. However, we did upgrade to Gigabit FTTP which is very, very cool. I also switched my office switch from a dumb Netgear 16 port GS116 to a Netgear GS724t. Old tech, but quite reliable (and at £20 on Facebook quite affordable!). This is linked with two aggregated links between the house switch. Same router but an earlier hardware version.
I did switch most “home services, TVHeadend, Minecraft server, Motion cameras and a few other trivial things to Docker. I also moved these from my Gentoo workstation to a new headless Debian box made from bits and pieces I had lying around (well I did upgrade RAM and CPU from eBay!). I guess on that topic I also finally switched from Mythtv to TVHeadend, when I added a second satellite dish as I found that all French TV services are broadcast unencrypted on multistream feeds from the 5W satellite. I also switched from a pair of TBS tuner cards to using a completely separate Digitbit R1. That broadcasts the four tuners as DVB>IP, which means TVHeadend can use those as tuners over the LAN. TvHeadend also acts as a recorder. TVHeadend just does not have the legacy baggage that Mythtv does. Much less functionality, but much simpler to configure (no need for a Mysql db to store settings and recordings, just a fairly simple HTTPS interface).
The Digitbit’s firmware is quite ancient. but it is trivial to boot for a new firmware via a USB stick (without having to flash the onboard storage) and there are a quite a few forks of that older firmware that support Multistream.
Clients are a number of RPI’s (running OSMC) and a dedicated client from OSMC called Vero 4k. Which is a lovely bit of kit
I also got a Quest Pro II. Facebook blah blah but it’s cheap and standalone. I’m not easily impressed but some of the apps are pretty wonderful. Downside is that our house is quote small and we have so few spaces to walk around in VR! I could use the garden, but then I would look a bit of a tool! Resident Evil 4 in VR is bloody scary, but I’ve yet to acquire my VR legs and can only play for 20 minutes before nausea takes over.
I carried on with the outdoor kitchen and added walls (using rural style corrugated sheets) plus completely weather proof kitchen cabinets (using treated wood and marine ply. All exposed cut edges were soaked in epoxy, and topped with quarry tiles. I need to do the other side. but perhaps when it’s warmer.
In sadder news our dog died. Zorro, our ten year old black lab, started wheezing and it turned out he had a mouth melanoma that was affecting his breathing. Treatment was possible but would have meant removing most of his jaw and chemo for months. Nothing you could put a dog through. Sadly he was put to sleep in the boot of a friend’s car and died in my arms.
I had a pretty bad year for growing stuff. Potatoes, cabbages (in poly tunnel), strawberries and tomatoes (grow bags on the balcony) were great. But everything else did badly I can only blame my laziness in watering during the heatwave. Even our courgettes failed! Better luck next year.
Finally managed to get camping, both for a fortnight in France (super warm), and also at Bluedot festival (brilliant music, shitty weather! Again see below).
I also upgraded our camp kitchen, with a brilliant foldaway kitchen, and a camping stove (Cadac) that has double burners, two griddles, and connects to a gas unit that uses three cheap, ubiquitously available, aerosols gas canisters. It provides a regulator for them too. I’ve always thought they are a little on the dangerous side. But with this bit of kit it makes them very usable and very safe.
We also had a good year for boating. The boat needs a LOT of work doing still. But we had a good few outings including one with the village.
Our own health is decent. LN had Covid over NY (which made that quieter). I’ve still not had it (that I am aware of).
The world continued to become a scarier place. Both nationally and internationally. What is happening in Ukraine is beyond horrendous. However, I decided that ranting at the news is pointless. Whereas I’ll never forgive any unrepentant Leave voters, I guess I’m used to it. Still I had a good day out on the Rejoin March back in August.
It was a good year for live music. Made the Bluedot festival, which had too many decent bands to list (although Yard Act are brilliant!). saw Billy Nomates, Fontaines DC, Scalpings and Working Mens club.
I properly made the move to Mastodon. Twitter was only ever a pleasant social media community in the early years. For some time it’s been both essential to keep up to date with local and national news, but also very unpleasant to be in. Mastodon is some time away from replacing that function, but by being a pleasant place to be in, it works for me. I think Elon Musk has done us all a favour. Back when I joined Twitter (2006) I thought it was a bad move to put all our communication eggs in one company’s basket, but in those early years it seemed to work and before long everybody and their rabbits had an account.
Finally I decided I need to stop doing as much “community stuff” as I have been doing. As well as the village newsletter which I have done for over ten years, I am also a school parent governor and part of a local campaign to prevent a sewage works being built on Greenbelt just outside the village. I find myself spending a hell of a lot of time, but both those latter two tasks have a lot of frustration. One for an incredible lack of communication and the other for manipulative people that are quite incompetent too. If either were paying jobs I’d have left both a while ago.
Zsh and Its Searchable History
So I guess this says a lot about me and the limited things I do on my Linux box as well as the power of ZSH’s searchable history, but I find myself rarely typing commands from scratch. Instead typing the first few letters of the command then using the up cursor arrow to search for the last time I ran that command. It is so, so useful. Rarely do I need to grep my way through my .history file. For commands such a checking a Duplicity backup to Backblaze’s B2 buckets, where I need long strings of my keys it is essential. But for even simple commands like updating my Gentoo setup it is just so useful.
Can you remember this every time?
Duplicity collection-status b2:// [22 character string]:[22 character string]@BucketName/folder
I should remember this one, but I never remember those parameters…
Emerge -uDNav @world —keep going
For bash that was:
– history | grep xxxx
– Then typing the line number.
– Hitting ctrl-c to kill that command
– up cursor key then editing the command before hitting return.
With ZSH I type the first few characters and then the cursor. Even when you search and use the line number it allows you to edit that command before running it.
By default this behaviour is not enabled. But edit your .zshrc/.zprofile files and bind the UP/DOWN cursor keys to these two options:
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
Oh and if you use zsh (it’s the default shell on macOS nowadays) then you really should use Oh My Zsh
Tapbots Tweetbot Memorial
Tapbots called it a day on their Twitter client Tweetbot. All quite sad really, but I guess inevitable. After I stopped using Tweetdeck, Tweetbot became my favourite Twitter client both on macOS and iOS. It was just so easy to swap between accounts and to tweet as a different accounts without switching accounts.
I got onto the beta of their new Mastodon client for iOS, Ivory, a week or so ago. I’ve just bought an annual subscription.
The Shit Show
Craig Hockenberry’s blog post about the last day of Twitteriffic working is acerbic and brilliant. It’s all because of Space Karen’s blocking of most popular third party Twitter clients from their API. I never used Twitteriffic. I used the web client, then Tweetdeck and finally settling on Tapbots set of iOS/macOS clients (which have also stopped working).
Since the buyout I’ve more or less stopped using my personal account. I’m reluctant to delete it as it’s been active since 2006, but it’s not been much fun over the past few years. I have kept three other accounts active. My work account, a campaign account and a village news account. I should let these die too really.
I opened a Mastodon account when Space Karen first hinted he wanted to buy Twitter (thanks Raj!) but never really used it. But since November I have. A much pleasanter place.
So far I’ve been using an iOS Mastodon app, Metatext, on iOS and macOS (Apple Silicon right!). Luckily Tapbots are working on an iOS Mastodon client, that I managed to get on the latest round of TestFlight beta apps yesterday.
Note: I’m posting this in an attempt to revive my blog. Instead of Marsedit (my usual blogging tool) I’m using Drafts with the WordPress Action.
Restoring C-A-backspace to Xorg server
Recent versions of Xorg have removed the old stalwart key combination of pressing CTRL-ALT-BKSPACE to kill the X server. I’m not sure why this was removed. I can only guess that such a drastic way of exiting your X session, without of course asking if you need to save any of your documents, was regarded as a non-desktop way of doing things. Although I like this key combo I can see this reasoning only too well.
If, like me, you like this behaviour to be restored then there are a few ways of doing so.
If you use .xinitrc
or .xsession
to manage your X session, then simply run this command from there:
setxkbmap -option terminate:ctrl_alt_bksp
On Gentoo (the distro I use) you’ll need to emerge the following package:
x11-apps/setxkbmap
If you use HAL to manage input devices, copy the following few lines into the fdi file from /etc/hal/fdi/policy/ which you use to control your keyboard.
Incidentally HAL was deprecated as of x.org 1.8 in favour of udev. So if your distro uses Xorg.18 or higher you’ll need to find a different way
<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>
(If you do not have any custom keyboard rules, you can copy and adapt rules from /usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi)
Finally you can edit xorg.conf with the following code to your keyboard’s InputDevice section :
Option "XkbOptions" "terminate:ctrl_alt_bksp".
?
Navigating to the $HOME/Library folder in Lion
In Lion the Library folder in your $HOME folder is now hidden. You can unhide it fairly easy, but a far easier way of navigating to it is holding down the [OPTION] key and using the FINDER GO menu.