TIL: macOS Serial Console Login

When using Virtualization.framework to virtualize macOS VMs, I occasionally have no use for the GUI, and even get frustrated at the slowness (especially when scrolling in Terminal.app). Since Virtualization.framework supports adding a VirtIO serial device, I decided to try doing that, but when I booted the VM, nothing showed up. After some searching, I found that I needed to modify /etc/gettytab and add a file to LaunchDaemons to start a getty on the serial console from this answer....

TIL: Programmatic Sparse Copying for APFS

If you’ve been using and/or developing on macOS for some time, it’s possible that you’ve heard that macOS uses the Apple File System (APFS). You’ve possibly also heard of its numerous benefits over traditional filesystems, such as copy on write, cloning (where unchanged blocks can be shared between multiple files), and, the topic of this post, sparse files. Sparse files are files with blank sections, and are used for virtual machines with Apple’s Virtualization....

TIL: SSH Remote Port Forwarding for Virtual Machines

When using virt-manager to create virtual machines, by default it uses a NAT network which can’t be accessed from outside the host machine. It is possible to use bridge interfaces for that, but it seems that bridging is not supported on wlan0 on my Thinkpad. I decided to try and use SSH Port Forwarding to make a server running on the VM be accessible from the host’s IP address. At first, I tried local port forwarding from the host, but that only allowed the server to be accessible from the host’s localhost....

Switching from Irssi to Weechat

A few months ago, when I started using IRC, I decided to use the Irssi client. I found Irssi to be adequate for my usecase in all but one way: it doesn’t have an unread marker/indicator. I recently decided to switch to Weechat, initially expecting that having an unread indicator would be the only useful addition. As it turns out, my expectations were wrong. Weechat is amazing! It has support for logging, built in mouse support and a really powerful interactive settings manager (fset)....

Installing Arch Linux ARM into a UTM Virtual Machine

UTM is a Virtual Machine manager and host (similar to VirtualBox), which can be used on M1/x86_64 Macs as well as iOS devices. Arch Linux ARM is a port of Arch Linux that runs on ARM devices. This guide aims to help you install Arch Linux ARM into a UTM Virtual Machine. As Arch Linux ARM does not have ISO releases, this is slightly more complicated than installing standard Arch Linux onto an x86_64 system....

Hello World

Hello! I am ktprograms, a programmer and Rubiks cube speed solver. I’m interested in Virtual Machines, Vim, Linux and much more. You can expect all kinds of programming and OS related posts on this blog, as well as some other random stuff. Stuff I’ve made: Ohms Now! is an Android app that helps you decode resistor colour bands. walkmapper is a Python package for plotting and animating .gpx files. I’ve taken over development of it from the original project....