Skip to content

Instantly share code, notes, and snippets.

@robwilkerson
robwilkerson / asahi-reclaim-disk.sh
Last active September 25, 2026 15:49
Removes any existing Fedora Asahi Linux install from a Mac so that a fresh copy can be installed.
#!/usr/bin/env bash
# Phase 0 (Apple Silicon) — reclaim the disk. Removes a Fedora Asahi Remix
# install from an Apple Silicon Mac, run from macOS, so the Asahi installer can
# lay down a fresh one. Runs before Phase 1 (bin/bootstrap-bootc-asahi.sh) and is
# a no-op on a disk that carries no Asahi install.
#
# The Asahi installer has no uninstaller — its menu is resize / upgrade m1n1 /
# rebuild vendor firmware / quit — and "install into free space" only appears once
# free space exists. So removal is a manual `diskutil` job, documented in
# docs/first-install-runbook.md and in Asahi's partitioning cheatsheet. This
@robwilkerson
robwilkerson / bootstrap-bootc-asahi.sh
Last active September 30, 2026 15:38
bootc-fedora Apple Silicon bootstrap (Phase 1)
#!/usr/bin/env bash
# System bootstrap (Phase 1, Apple Silicon) — convert a booted Fedora Asahi
# Remix install into this bootc image.
#
# The aarch64 sibling of bin/bootstrap-bootc-fedora.sh. Same job — machine-local
# setup that cannot be baked into a generic public image — different mechanism,
# because the boot models differ:
#
# x86_64 live USB -> `bootc install to-disk --wipe` onto a bare disk.
# Apple Silicon no live USB exists. The Asahi installer, run from macOS, owns
@robwilkerson
robwilkerson / bootstrap-bootc-fedora.sh
Last active September 28, 2026 00:49
bootc-fedora x86_64/arm64 system bootstrap (Phase 1, live CD)
#!/usr/bin/env bash
# System bootstrap (Phase 1) — run from a Fedora live CD to stand up a bare box.
#
# The system-layer sibling of the in-image `bootstrap` (Phase 2, the USER layer,
# run after login). This runs in the LIVE environment, as root, and does the
# machine-local setup the installer ISO's baked-in config used to do at build
# time — everything that cannot be baked into a generic, public image:
# 1. bootc install to-disk (write the image-mode OS to the internal disk,
# onto an encrypted root by default — see
# BLOCK_SETUP below)