Skip to content

Instantly share code, notes, and snippets.

View dariaphoebe's full-sized avatar

Daria Phoebe Brashear dariaphoebe

View GitHub Profile
@dariaphoebe
dariaphoebe / CustomBootObjects.md
Created September 7, 2026 17:26 — forked from steven-michaud/CustomBootObjects.md
Custom Boot Objects in Virtualization Framework macOS Guest VMs

Custom Boot Objects in Virtualization Framework macOS Guest VMs

By default, "custom boot objects" (created using kmutil create) can't be used in macOS Virtualization framework guest VMs. Here I show how to get around this Apple design flaw. Note that Virtualization framework macOS guests can only be created on Apple Silicon Macs.

To proceed, you'll need to work through my Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs. Many

@dariaphoebe
dariaphoebe / RelocatePartition.go
Created September 4, 2026 20:22 — forked from yunyang088/RelocatePartition.go
Relocate Apple Silicon APFS recovery partition to the end of a macOS disk image for safe APFS container expansion.
// RelocatePartition is a standalone utility for relocating the outer
// Apple_APFS_Recovery GPT partition (RecoveryOSContainer) to the end of an
// Apple Silicon macOS disk image so that the main Apple_APFS container can be
// expanded into the freed space.
//
// Origin:
// - Based on Cirrus Labs' recovery relocation logic from:
// https://github.com/cirruslabs/packer-plugin-tart/blob/main/builder/tart/recoverypartition/relocate.go
//
// What this fork adds:
@dariaphoebe
dariaphoebe / 91smoser-schroot-setup
Created August 30, 2026 19:44 — forked from smoser/91smoser-schroot-setup
custom sbuild / schroot setup.
#!/bin/sh
# https://gist.github.com/smoser/14df5f0cd621e10d2282d7c90345e322
# This is /etc/schroot/setup.d/91smoser
# I use it to apply local updates to schroots.
# make sure it is executable (chmod +x).
# Things it does:
# a.) sets proxy inside. If apt proxy is configured outside, it will
# apply that inside.
# b.) uses a portion of 'apt-go-fast'
# https://gist.github.com/smoser/5823699/
@dariaphoebe
dariaphoebe / apt-go-fast
Created August 30, 2026 19:44 — forked from smoser/apt-go-fast
apt-go-fast: streamline apt-get by removing things you don't want or need and using eatmydata
#!/bin/sh
# https://gist.github.com/smoser/5823699
set -e
[ "$(id -u)" = "0" ] && sudo="" || sudo="sudo"
[ -e "/usr/bin/apt-get.distrib" ] ||
$sudo dpkg-divert --local --rename --add /usr/bin/apt-get
$sudo tee /usr/bin/apt-get >/dev/null <<"EOF"
#!/bin/sh

Here are Apple-provided sources you can point at that show FSKit file system extensions are entitlement-gated and live in the "extension / system extension" world (not "just load a plugin"):

  • FSKit overview (Apple docs) --- explicitly says you deliver an FSKit module as an app extension that runs in user space. 

  • FSKit Module entitlement (Apple docs) --- com.apple.developer.fskit.fsmodule is the entitlement that indicates an extension provides an FSKit filesystem (i.e., without it you're not "an FSKit filesystem extension" in the eyes of the OS).

  • System Extension install entitlement (Apple docs) --- com.apple.developer.system-extension.install is the entitlement that allows a host app to activate/deactivate system extensions (the general mechanism used to get these kinds of extensions loaded/managed on macOS). 

  • WWDC statement about extension sandboxing --- Apple describes extension code being isolated into its own daemon process that's sandboxed (this

@dariaphoebe
dariaphoebe / podman-qemu-user-static.md
Created September 11, 2025 21:56 — forked from tnk4on/podman-qemu-user-static.md
Podman on RHEL with multiarch/qemu-user-static
@dariaphoebe
dariaphoebe / KVM_in_WSL2.md
Created March 31, 2025 00:14 — forked from startergo/KVM_in_WSL2.md
KVM on WSL2 Windows 11
  • In WSL2 run:
sudo apt update
sudo apt install qemu qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils cpu-checker \
network-manager iptables-persistent linux-headers-generic \
qemu uml-utilities virt-manager git \
wget libguestfs-tools p7zip-full make dmg2img tesseract-ocr \
tesseract-ocr-eng genisoimage vim net-tools screen firewalld libncurses-dev -y
sudo apt install virt-manager
sudo addgroup kvm
@dariaphoebe
dariaphoebe / main.c
Created March 3, 2025 00:13 — forked from andrew-d/main.c
Example of how to get current binary's path using Apple's Code Signing Services
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <Security/Security.h>
// Compile with:
// gcc -o ourpath -framework CoreFoundation -framework Security main.c
@dariaphoebe
dariaphoebe / README.md
Created February 28, 2025 04:04 — forked from Vogtinator/README.md
Run Win11 on ARM in QEMU

Guide updated to use the official installation .iso from Microsoft, which finally became available in Dec. 2024! For the VHDX disk image based guide check an earlier version of this gist.

When following this guide on a host not capable of aarch64 virtualization, replace -cpu host -accel kvm with -cpu max.

  1. Download the installation .iso from https://www.microsoft.com/en-us/software-download/windows11arm64. Win11_24H2_EnglishInternational_Arm64.iso is known to work.
  2. Download the the latest virtio-win.iso from https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/.
  3. Create a disk image for the Windows installation: qemu-img create -f qcow2 win11.qcow2 25G
  4. Start the installation with generic (ramfb for display, usb-storage for .isos) as well as virtio (virtio-gpu-pci, virtio-block) devices: `qemu-system-aarch64 -M virt -cpu host -accel kvm -m 4G -smp 4 -device ramfb -device virtio-gpu-pci -bios /usr/share/qemu/qemu-uefi-aarch64.bin -device qemu-xhci -device usb-kbd -dev
@dariaphoebe
dariaphoebe / virtualapple-utm-link
Created April 24, 2024 18:34 — forked from akemin-dayo/virtualapple-utm-link
A cleaned up version of an internal script that I've been using while working on TotalFinder to create VirtualApple virtual machine instances that are hardlinked to a UTM virtual machine instance. It's particularly useful for entering One True recoveryOS (1TR) as well as using the other features found only in VirtualApple.