Formatting disks and clearing RAID config on Power systems with iprutils

I recently put some spare disks into a Power S814 server, and when I tried installing an OS, be it VIOS or Debian, it would say that there were no disks available to install onto.

It turns out that the RAID configuration on the controller and the disks didn’t match. This is par for the course with any RAID controller, even in the x86 world. It also didn’t help that some of the disks were formatted for IBM i, which uses non-512-byte block disks. We need to use the vendor utility to clear out the RAID config, and format the disks to be usable by commodity operating systems.

The two utilities IBM provides for this are either the diagnostics on the AIX Standalone Diagnostics disc, or using the iprutils set of software. Since netbooting Linux was easier as I don’t have a NIM server, I’m choosing to do the latter here.

Continue reading

Netbooting Alpine Linux on a PowerVM system

I had a need to run a utility that requires Linux (specifically, iprutils to configure a RAID card) onto a Power S814 that I had installed at a datacentre, and no remote hands to boot a CD with. However, there’s not much information documented on how to boot Linux on these systems from a network. This article aims to synthesize what I’ve found online, since information about IBM Power systems tends to be scant outside of IBM documentation..

Continue reading

Sleeping through a decade of Cocoa: Retrospective from modernizing an old Mac app

A few years ago since I started using Macs more often, one annoying thing I dealt with was using my local music library. My usual solution was to just drag files from the file manager to a music player, but this wasn’t as nice on macOS (due to i.e. SMB latency). However, I did have a Subsonic server, which provides a nice music streaming server, complete with an API for clients to use for things like phones. Why not use this on my laptop too?

Of course, if I bought a Mac, I’m not going to put up with bad cross-platform solutions that suck everywhere, when I can instead run bad native software that sucks uniquely for my platform of choice. However, there weren’t too many clients available on Mac. Mostly all of them were unmaintained and had been abandoned in the Snow Leopard era. One of them was Submariner, and it was open-source after the developer (Rafaël Warnault) had stopped working on it. Writing my own seemed a bit daunting with no background, but what if I used the Submariner codebase, and started from there?

Now I’ve been maintaining Submariner for almost two years at this point (it even has a minimal website), adding features and mostly just focusing on modernizing the codebase. It’s been an interesting experience as my first Objective-C/Mac project. A lot of the lessons of modernizing legacy code are universally applicable, but I’ve learned a lot about the specifics of Apple platforms and how they compare. This article aims to be both a retrospective on what I had to learn, what I had to do, and the lessons I took from it, including a comparison of what the development culture is like between platforms.

Continue reading

Fixing Returnal hanging at a black screen

I’ve been enjoying Returnal recently, but I’ve had a ton of technical issues with it. Half the time when starting the game, or performing certain actions, it would just hang at a black screen. Sometimes, the game would be still running and updating the system resource monitoring, but be completely unresponsive.

Turns out if you’re running Windows 10 LTSC, you lack the VP9 codec, which the cutscenes are in. The black screen is because it can’t play the cutscene properly. (Any bits about DX11/DX12 seem to be red herrings.) The VP9 codec is on the Windows Store, but since you don’t have that in LTSC, you can install it via other means. For example, this dump in the Internet Archive contains the codecs you’re looking for; install them, and after a reboot, things should work again.

Installing Photoshop CS2 on Windows 11

I was trying to install Photoshop CS2 on an ARM Windows 11 VM (this may affect x86 Windows 11 too), but was blocked by an error that went something like “Error 1926: Could not set file security for file C:\Windows\, Error 0”.

This is because the Windows installation directory has immutable permissions on Windows 11, but the Photoshop installer tried to reset file permissions on it anyways. (It’s quite possible other software might also be suffering from this too.) To fix it, we need to modify the MSI.

Continue reading

Restoring images without the futility of Disk Utility

I was trying to put a Mac OS X 10.6 image onto a USB stick to install on another system. To do this, I attempted to do it from a Mac running 13.6 and failed with a message like this when restoring the image to the partition:

Could not validate source - Invalid argument
The operation couldn't be completed. (OSStatus error 22.)

It turns out that Disk Utility is pretty broken at this. What you’re better off doing is using asr. This utility is what Disk Utility does under the covers anyways.

Continue reading

Why Macs don’t have games, or: Why Vulkan or the Game Porting Toolkit isn’t going to save you

Recently, one of Apple’s focuses at the latest WWDC keynote has been gaming. Two important pillars for this are an HLSL to Metal shader compiler, and the Game Porting Toolkit. Both are important, since HLSL is dominant for shaders in the industry, but the GPTK has become popular outside its intended target audience, with many videos with end-users instead of developers using it to try the latest AAA games. This has led to a lot of speculation online about what obstacles exist for game developers looking to port their games to Mac. What challenges actually matter?

(This is a bit of a rougher post, more addressing common points I see from Mac gamers on why they don’t have games. I’m not a game developer or expert in 3D graphics APIs, but I do keep up with the space. There is also some Kremlinology on Apple, but that’s inevitable considering the secrecy.)

Continue reading

Opening System Settings/Preferences to a specific app’s notification settings

If you need to open System Settings (formerly System Preferences) to a specific preference pane, there’s a URL scheme for that. However, some panes seem to take options for opening specific things. In my case, I wanted open the notifications pane to a specific app. The system Maps application can already do this, so I popped it open in a disassembler and learned the secret – ?id=(app bundle ID). For example, opening the following URL will open the notifications settings for Firefox:

x-apple.systempreferences:com.apple.preference.notifications?id=org.mozilla.firefox

Debugging an x86 application in Rosetta for Linux

Rosetta on Linux has been great for me, as someone who switched to an ARM Mac and sometimes develops in a VM. This is because my dayjob often involves debugging a proprietary database driver that only has x86 and PowerPC versions available for Linux, not 64-bit ARM. However, while Rosetta can make it easy to run x86 binaries, it’s not as obvious how to debug them. If you naively try running GDB on your x86 program, you get errors like:

warning: `/lib64/ld-linux-x86-64.so.2': Shared library architecture unknown is not compatible with target architecture aarch64.
warning: `/lib64/ld-linux-x86-64.so.2': Shared library architecture unknown is not compatible with target architecture aarch64.
Warning:
Cannot insert breakpoint -1.
Cannot access memory at address 0x66ec48

This is because you’re attaching to the Rosetta binary, which causes all sorts of confusion for GDB. Turns out, Rosetta does actually have a way to handle this.

Continue reading

Building a static GraphViz for macOS

Note: This is a very old post from 2020 I had sitting in my drafts. I figured I would publish it in case it was useful for someone else. Notably, this predates Apple Silicon, so yo would want to build another version that’s ARM and use lipo to make a universal binary. This is left as an exercise to the reader.

I recently had the need for building GraphViz without any external dependencies other than what comes with macOS, as part of an application calling into it. While on Windows, I used their provided binaries, I was on my own for macOS since I wasn’t willing to ship half of Homebrew with my application. Instead, I took a simpler way.

Continue reading