I was going to write up a blog post about setting up a self-hosted Zerotier server when I came to the realisation that there wasn’t really any good management tools for the CLI for ZeroTier.
The “Getting Started” guide from ZeroTier is pretty sparse on explanations on what things do, with some curl commands thrown into the mix to do things like create networks, authorise members, and things like that, but that is nowhere near convenient to use on a command line, though that is made pretty clear by the end of first page where they say
You’d likely build yourself something fancier around this API.
And they were right! I built something slightly fancier! Introducing Zerotier-Console!
I recently had to recover a dying USB stick that kept spitting out read errors. ddrescue‘s default parameters could only help so much as the flash controller would hang the instant it hit a bad read error, necessitating a unplug and replug of the USB stick before it could carry on.
I decided to hack up a little script so I could recover select areas of the USB stick first and control what blocks ddrescue was attempting. Using ddrescueview, I could see which blocks had and had not been attempted. Using the information from the Block Inspector, I could obtain a hex address of the block I wanted to start from.
Copying the text from the blocks into my hex-to-decimal script gave me a block to start from.
I bought a pair of cheap USB headphones yesterday so I could test out whether my sound issue on my computer was due to my sound card, or another issue.
The issue I after plugging them in however, was that I could not easily switch the sound output to the USB headphones.
I don’t run pulseaudio, so I was left with playing with configuration files to try and switch the audio over.
If I had been running pulseaudio, I’m sure this blog post would have been much shorter! Continue reading »
I wrote a little snippet to update my PXE server’s Debian netboot image so I can schedule this to run every month or so to ensure that my Netboot image is up to date.
The variables are to set the Debian mirror, architecture, and paths and filenames for the downloaded image file, and where the image file should be un-tarred to.
I have architecture in there because I had some old machines which require i386 kernels. If you don’t need i386, then you can replace all the arch variables and hardcode amd64 instead.
wget $debmirror/dists/stable/main/installer-$arch/current/images/netboot/netboot.tar.gz -O $tmppath
tar -C $tftppath -xzf $tmpfile ./debian-installer/amd64/initrd.gz ./debian-installer/amd64/linux --strip-components=3