2023-11-09

porkbun + ddclient = ???

I wanted to use ddclient to update the A record for my domain registered via Porkbun.

I kept getting a weird error: "{"status":"ERROR","message":"Invalid domain."}"

In the end, I was able to resolve this by adding "on-root-domain=yes" to the beginning of the line containing my domain name in "ddclient.conf". I guess I needed it because my domain doesn't include a subdomain? Gosh.

In the end, my config looked like this:

use=cmd, cmd='curl https://ipecho.net/plain'
protocol=porkbun
apikey=pk1_abcdef
secretapikey=sk1_abcdef
on-root-domain=yes example.com

Blaaaah

2023-03-13

It's 2023! Get a grip!!

    What's up gamers. The year is 2023, in case you couldn't tell, and this year I'm finally going to fulfill my New Year's Resolution.
    That's right. I'm going to write a blog post.

    ...Success! Bye

2022-03-07

Compiling OVMF on Debian

How to compile OvmfPkg of TianoCore's EDK II on Debian:

  1. sudo apt install build-essential gcc git iasl nasm uuid-dev
  2. mkdir ~/src; cd ~/src
  3. git clone https://github.com/tianocore/edk2; cd edk2 (compilation issues concerning brotli have been fixed with pull #2514)
  4. git submodule update --init
  5. make -C BaseTools
  6. . edksetup.sh
  7. Edit ./Conf/target.txt:
    ACTIVE_PLATFORM = OvmfPkg/OvmfPkgX64.dsc
    TARGET = RELEASE
    TARGET_ARCH = X64
    TOOL_CHAIN_TAG = GCC5
  8. build (to compile with Secure Boot enabled, append -D SECURE_BOOT_ENABLE - though it doesn't seem to work without manually adding keys to OVMF_VARS.fd)
  9. FD located in ./Build/OvmfPkg/RELEASE_GCC5/FV
(This is more of a reference for myself than anything else.)

2021-10-16

ZMV ON WINDOWS!?? [NOT CLICKBAIT]

    Hello netizens. I use Windows now, which means I have to use PowerShell. It's actually pretty neat once you get past the bizarre Verb-Noun command format.

    But, this means I can't use such great features as zmv, which I wrote about in a previous blog post. (I spent five minutes thinking of funny ways to ridicule the fact that I'm not linking to that blog post here but couldn't think of anything worthwhile.)

    Or can I? Well, duh, of course I can. zmv is just a funky little function. I can make my own damn functions on Windows.

    Let's use my previous example of renaming "Artist name - Album title - Track # Track name.flac" to "Artist/Album/# Track.flac" — SHIT, I mean "Artist\Album\# Track.flac". Sorry Gates.

    BEHOLD: zmv for Windows.

Get-ChildItem . | Rename-Item -NewName { $_.Name -replace '^(.*) - (.*) - (.*)','$1\$2\$3' }

    It's a bit more complicated, sure, but it works. Thanks, StackOverflow!

    (Really this series of blog posts is just me learning regex but that doesn't mean I can't look cool while doing it.)



    P.S. While figuring out how to pick PowerShell's background color, I learned that Microsoft PowerToys has a tool for doing regex renames with a fancy GUI, called PowerRename. Freakin awesome!!


    Only problem is that it's not integrated with Windows 11's new context menu (yet?)

2021-07-08

Curse of the Apple Thunderbolt Display

Hey all. This is a bit of an update to my previous post, detailing my attempts to get an Apple Thunderbolt Display working with my GIGABYTE Z390 DESIGNARE motherboard. (By the way, it's pronounced with a hard "g" and "a" - not like "designer.") I ordered some replacement PCIe 6-pin to 8-pin adapters, so now I'm able to use the GPU with the required DisplayPort port.

After having flashed the modified Thunderbolt firmware, I expected the Thunderbolt Display to power on and work just fine, at least after reaching the Linux desktop environment (my hopes weren't too high for the preboot environment, i.e. the BIOS menu). Unfortunately, there was still no video output to the display.

However! Using `boltctl`, I was able to see that the Thunderbolt Display was, indeed, detected by Linux! This is an improvement over before, where `boltctl monitor` was able to detect something being (un)plugged, but nothing more. I am now able to connect USB drives to the back of the display, and have them recognized natively in Linux. How wonderful... though obviously not ideal.

I did some more searching, and just a few days ago, the thread containing the custom Thunderbolt firmware was updated with details on an experiment to get Thunderbolt displays to work "during BIOS and OpenCore." In layman's terms, this means the folks over at tonymacx86.com are working on getting the Apple Thunderbolt Display working in the preboot environment of the Z390 DESIGNARE! (and its cousins)

Perhaps this was the key to getting my Thunderbolt Display working with my own Linux setup?

I made a reply to the post, showing my interest in this development, and telling them I was a Linux user who owns the same motherboard and wishes to get their own Apple Thunderbolt Display working with it. I asked if there was anything I could do to help.

In response, they removed my post, stating it was "offtopic" and to "best find a linux thread."

What a bunch of... knuckleheads.

Regardless, this is an exciting development! Hopefully something good comes out of it. Otherwise I might have to sell my Apple Thunderbolt Display and buy a better, more compatible, and probably cheaper display. Oh woe.

2021-07-06

Z390 DESIGNARE Thunderbolt ROM Flashing

Hey all. I bought an Apple Thunderbolt Display to go with my non-Apple desktop computer because I am stupid.

It didn't work, obviously. Who would have guessed the Apple display wouldn't work with non-Apple hardware! (I say, having created multiple hackintoshes.)

So I did some reading. Turns out this has been an issue for years. After quite a bit of searching, I read that one person had success after flashing a custom Thunderbolt firmware.

After some "trial and error," including breaking a SOIC8 clip, I finally managed to get this "custom firmware" flashed to my Z390 DESIGNARE.

(EDIT: Oh yeah, I should mention. `flashrom` wasn't able to detect the ROM with just the SOIC8 clip attached, nor with Ethernet attached as well. I had to plug the ATX power cable in, and turn the PSU on (though not the PC). I also kept the Ethernet cables plugged in. Then I was able to read the chip and successfully flash the custom firmware.)

But, you see, the Z390 requires a DisplayPort input from a dedicated GPU to use a display over Thunderbolt - or an iGPU, which I do not have.

The GPU I was using with the DisplayPort port required for that recently became no longer viable, as the PCIe 6-pin to 8-pin adapter I was using burned itself up.

Go figure.

2020-08-26

Install Mac OS X from a USB drive on a PowerPC-based Mac

When nothing else worked when trying to install Mac OS X Leopard onto my PowerBook G4 1.67GHz without the original installation DVD, here's what eventually did.

What you'll need

  • PowerPC-based Mac you want to install OS X on by using a USB drive
  • ...USB drive (16GB or more in capacity; 8GB might work, but come on, it's 2020)
  • Second old Mac that already boots Mac OS X Leopard (other versions may work, but are untested. All I know is that my macOS Catalina hackintosh did NOT work)

Part 1: Preparing the disk image for restore

  1. Boot up your second old Mac running Mac OS X Leopard
  2. Download #31 (Leopard_10_5_4.dmg_.zip) from here and extract the DMG
  3. Scan the DMG for restore using Disk Utility ("Images" -> "Scan Image For Restore...")
  4. Lock the DMG (right-click -> "Get Info" -> check "Locked")

Part 2: Restoring the disk image to the USB

  1. Format your USB as "Mac OS Extended (Journaled)" using the "Apple Partition Map" using Disk Utility
  2. Restore the DMG to your USB using Disk Utility, making sure you check "Erase destination" (open the Restore tab, drag and drop the DMG to the "Source" field, drop and drop the partition you formatted in Part2Step1 to the "Destination" field)
  3. Eject your USB drive and plug it into the PowerPC-based Mac you want to install OS X on

Part 3: Installing Mac OS X (okay kids, this is where it gets complicated - mostly copy/pasted from here; follow that if this doesn't work for some reason)

  1.  Boot your PowerPC-based Mac into OpenFirmware (power it down and hold Command + Option + O + F while powering it back up)
  2. Run dev / ls and look for the entry with "/disk@1" at the end of it (in my case "usb@1b,1")
  3. Run devalias and look for the entry with the text you found in Part3Step2 at the end of it (in my case "usb0")
  4. Run dir text_from_Part3Step3/disk@1:3,\System\Library\CoreServices (a.k.a. dir usb0/disk@1:3...) and make sure the entry that contains "BootX" also contains "tbxi" (if it doesn't, panic!)
  5. Run boot text_from_Part3Step3/disk@1:3,\System\Library\CoreServices\BootX (a.k.a. boot usb0/disk@1:3...)
  6. You should see a little spinner, then some white-on-grey text, and finally the Apple logo. Congratulations, you've successfully booted your accursed PowerPC Mac from a USB drive! The installation process is the same from here on out as if you were booting from an official Mac OS X Install DVD.