Skip to content

Instantly share code, notes, and snippets.

@davidvfx07
Last active March 10, 2026 01:07
Show Gist options
  • Select an option

  • Save davidvfx07/fec3d92f6075ece27f7dd875b5dc459b to your computer and use it in GitHub Desktop.

Select an option

Save davidvfx07/fec3d92f6075ece27f7dd875b5dc459b to your computer and use it in GitHub Desktop.
Asahi Linux - OSTree Install Guide
# ___ _ _ ___ _ _
# / _ \| | (_) / _ \ | | (_)
# / /_\ \ |_ ___ _ __ ___ _ ___ / /_\ \___ __ _| |__ _
# | _ | __/ _ \| '_ ` _ \| |/ __| | _ / __|/ _` | '_ \| |
# | | | | || (_) | | | | | | | (__ | | | \__ \ (_| | | | | |
# \_| |_/\__\___/|_| |_| |_|_|\___| \_| |_/___/\__,_|_| |_|_|
# _____ _ _ _ _____ _ _
# |_ _| | | | | | | __ \ (_) | |
# | | _ __ ___| |_ __ _| | | | | \/_ _ _ __| | ___
# | || '_ \/ __| __/ _` | | | | | __| | | | |/ _` |/ _ \
# _| || | | \__ \ || (_| | | | | |_\ \ |_| | | (_| | __/
# \___/_| |_|___/\__\__,_|_|_| \____/\__,_|_|\__,_|\___|
# Unofficial guide to install Atomic Fedora / OSTree / Bootc on Apple Silicon.
# Compiled with inspiration from:
# - https://github.com/fedora-asahi-remix-atomic-desktops/images/issues/1
# - https://github.com/bshephar/fedora-bootc/tree/main/asahi
# ** THIS IS NOT A SCRIPT, DO NOT TRY TO RUN IN BASH OR SIMILAR. **
# ** PLEASE READ ALL OF THE COMMENTS THROUGHOUT THIS COMMAND GUIDE AND DO NOT SKIP. **
# ** PREREQUISITE CHECKLIST **
# 1. Please reset Asahi from scratch as lingering standard install data will bloat. By the
# same logic, install Asahi Minimal when you do reset, as to not bloat your install with
# lingering packages and applications that won't be accessible once Atomic is set up anyway.
# To reset Asahi means to delete its partitions on MacOS and reinstall from scratch.
# Check out the oficial "Partitioning Cheatsheet" for more info.
# - https://asahilinux.org/docs/sw/partitioning-cheatsheet
# 2. Asahi Minimal installs do not provide a graphical setup interface for setting up user,
# timezone, etc, but they do provide a CLI to do this config that auto-launches on first
# boot. Follow the prompts like usual, creating a user etc, until you land in the
# terminal.
# 3. Ensure you're system is up-to-date. A fresh install of Asahi does not mean
# your packages are up-to-date.
# ** GUIDE STARTS HERE. DO NOT COPY AND PASTE BLINDLY, AND READ ALL COMMENTS.
# Reboot and login to the tty console. Run the following commands.
sudo -i # This sets your entire terminal as root, so be very careful what you run.
dnf install -y rpm-ostree
mkdir -p /ostree/repo
ostree init --repo=/ostree/repo --mode=bare
ostree config --repo=/ostree/repo set sysroot.bootloader none
ostree config --repo=/ostree/repo set sysroot.readonly true
mv /boot/loader /boot/loader.0
ln -snf loader.0 /boot/loader
mkdir -p /ostree/deploy
ostree admin os-init fedora --sysroot /
ROOT_UUID=$(findmnt / -o UUID -n)
# We use the base-atomic image because its the smallest and simplest. It's more important
# to get everything working first than to use your desired final image and hope it
# works first try. Feel free to switch to another image if everything boots successfully,
# as is described at the end.
IMG_REF="ostree-unverified-image:registry:quay.io/fedora-asahi-remix-atomic-desktops/base-atomic:43"
# The following may take a few minutes with no progress report. Please be patient as
# it is downloading the image and doing other things, so depending on your situation
# and internet speed the run time will vary.
ostree container image deploy \
--imgref $IMG_REF \
--target-imgref $IMG_REF \
--stateroot fedora \
--sysroot / \
--karg root=UUID=$ROOT_UUID \
--karg rw \
--karg rootflags=subvol=root
# Be very careful to copy these next commands properly, as they are specific and may not
# warn you if there is a typo.
DEPLOY_PATH=$(ls -rdt /ostree/deploy/fedora/deploy/* | head -n1)
# We use /bin/cp to avoid any alias for 'cp' that would insert any override protection flags.
/bin/cp -f /etc/passwd /etc/shadow /etc/group /etc/gshadow /etc/fstab /etc/subuid /etc/subgid $DEPLOY_PATH/etc/
chcon --reference=/etc/passwd $DEPLOY_PATH/etc/passwd
chcon --reference=/etc/fstab $DEPLOY_PATH/etc/fstab
# This ensures update-m1n1 uses device tree provided by the Atomic image, not the (now static) device tree in /boot.
sed -i 's|^DTBS=.*|DTBS="/usr/lib/modules/$(uname -r)/dtb"|' /etc/sysconfig/update-m1n1
# The initial setup should now be done, but it is not complete. Reboot now and you should
# boot fine, with everything looking exactly as it had before. If you don't, ensure you went
# through all of the steps correctly, try again from scratch, and if it still fails, comment bellow.
reboot
# Once booted, login, and to test if everything worked, run the following. (It should show you
# that you are indeed booted onto an image.)
sudo bootc status
# Now you can finally switch to whichever image you want to use. It is extremely important
# that whatever image you choose is based off an Asahi image, otherwise it won't contain
# the Asahi packages and kernel and will fail to boot. If you build your own image, just
# switch it to base off of the asahi base-atomic image, which in my experience can be treated
# like a fedora-bootc / minimal image, essentially bare bones. Here I use Asahi Silverblue.
sudo bootc switch quay.io/fedora-asahi-remix-atomic-desktops/silverblue:43
reboot
# That's it for the actual installation. However, it is imperative that you understand the information bellow.
# Additionally, check out the "Tips and Tricks" section at the end of the document for some extra tips.
# ** IMPORTANT INFORMATION POST-INSTALL **
# 1. Sometimes, Asahi pushes new updates that change m1n1 (an essential component for booting). On standard
# Asahi installs, the new m1n1 is "applied" automatically as you update the system, but on Atomic, it is not. Therefore,
# it is generally recommended to manually "apply" m1n1 updates every time you update your image. The general procedure
# (as-commands) would look as follows:
sudo bootc upgrade # This downloads and applies the latest image; it is the same as updating the system in a settings app.
reboot # In order for the m1n1 updater to apply the updates, you must be booted onto the updated system, so reboot.
sudo update-m1n1 # This command will finally "apply" the updated m1n1.
reboot # Now that m1n1 is updated, reboot for its changes to take affect.
# 2. This is all still very unoficial and not "supported", so while it does work, things may change in the future. Please
# do not report bugs specific to Atmoic Fedora to the Asahi devs. Instead, post a comment here, on the Asahi subreddit,
# or wherever else makes sense to you. Hopefully this will all be officially supported in the near future.
# ** TIPS AND TRICKS **
# By default, Asahi configures the display to hide the notch by cropping out the entire top section of the display.
# If you would like to reclaim that vertical space, even though it would reveal the notch, run the following command:
sudo rpm-ostree kargs --append-if-missing appledrm.show_notch=true
# Then reboot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment