AsahiLocker logo: a faceted pink and silver polyhedron bearing the Fedora mark and the Asahi Linux 'A', on a dark platform lit with magenta and blue neon

Fedora Asahi Remix · Apple Silicon · LUKS2 · updated 29 November 2026

Encrypt Fedora Asahi Remix with LUKS2, in place: no reinstall, on any M1, M2 or M3 Mac

The Fedora Asahi Remix installer has no disk encryption option. AsahiLocker adds it afterwards, in one command. It converts the btrfs root of a system you have already installed into a LUKS2 container holding that same filesystem, rewrites every piece of boot configuration that has to change, and refuses to let you reboot until a 12-point verification gate passes. No reinstall. No USB stick needed. macOS is never touched.

It is the complete job, with the strongest key derivation cryptsetup can write, tested with 187 checks on every push, run on real Macs by people other than the author, and audited in full three times.

Why Asahi Linux needs this

Every mainstream Fedora installer offers to encrypt the disk. The Asahi installer does not: it installs Fedora Asahi Remix alongside macOS with a plain btrfs root, and adding LUKS has meant doing it yourself afterwards, by hand. On a laptop that is the gap that matters. A lost or stolen MacBook running Asahi gives anyone your home directory, your browser profiles and your SSH keys, with no passphrase in the way.

macOS on the same disk is protected by FileVault. Linux on that disk can be protected too. The difference is that Linux cannot use the Secure Enclave, so the protection has to come from a strong key-derivation function and a good passphrase. AsahiLocker is built around that.

Your options in 2026

There are three practical ways to get an encrypted Asahi system today:

  1. Do it by hand. David Alger's 2023 guide is the original walkthrough, and Christian Horn's 2026 update covers what has changed since. Both are good reading if you want to understand every command. You boot a Fedora Asahi live USB, encrypt the root partition, then edit the boot configuration and rebuild the initramfs yourself.
  2. Run a tool that does the same steps for you, with checks. That is what AsahiLocker is. It automates the hand-editing, verifies the result before you reboot, resumes by itself if it is interrupted, and is the only one of the three that does not need a USB stick. The rest of this page covers it.
  3. Wait for the installer. Encryption at install time has been requested of the Asahi installer for years. Until it ships, encrypting means doing it after install, by hand or with a tool.

What AsahiLocker does

Asahi-specific boot guards

Two ways an Apple Silicon Mac running Fedora Asahi Remix loses its boot are particular to this platform, and neither Fedora nor the Asahi installer guards against either. boot-guards/install.sh adds both; running it again upgrades guards from any earlier release.

The GRUB stub on the EFI partition. /boot/efi/EFI/fedora/grub.cfg is a three- or four-line stub that finds /boot. Overwrite it with a full config, as grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg does, and an encrypted Mac stops at a GRUB prompt. Fedora's own check for that looks under EFI/$ID/, and on Asahi ID is fedora-asahi-remix, so it never fires. The guard puts the stub back as soon as the write is closed:

Measured live on a MacBook Pro 14" (M2 Max), Fedora Asahi Remix 45, kernel 7.3.4, SELinux enforcing:

What overwrote the stubStub back after the write closed
A real sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg: 281 lines over the 4-line stub, Fedora's check silent19.4 ms
A rewrite the way grub2-mkconfig writes it, two runs17 ms and 26 ms

SELinux does not let systemd watch a file on the EFI partition, so a guard pointed at grub.cfg itself installs, reports itself active and never fires; this one watches the directory.

Stale boot entries. U-Boot keeps its EFI boot entries in ubootefi.var on the EFI partition, so efibootmgr -B deletes come back at the next boot. The cleaner edits that file in U-Boot's own format; on the M2 Max above, U-Boot booted the rewritten file.

What it protects, and what it does not

The evidence: tests, machines, audits

A tool that rewrites your root partition should not be taken on trust, so here is what stands behind this one.

How the encrypted boot works on Apple Silicon

U-Boot provides the UEFI environment, and GRUB loads the kernel and initramfs from an unencrypted ext4 /boot. The initramfs reads rd.luks.uuid from the kernel command line, asks for your passphrase, runs argon2id, opens the LUKS2 container and mounts root. GRUB never has to unlock anything, which matters because GRUB 2.12 (current in Fedora 44) has no argon2 support at all.

nvme0n1
  p1  APFS    iBootSystemContainer
  p2  APFS    macOS            ← untouched
  p3  APFS
  p4  vfat    EFI   /boot/efi  ← stays plain
  p5  ext4    BOOT  /boot      ← stays plain
  p6  btrfs   fedora  / /home  ← becomes LUKS2(btrfs)
  p7  APFS    RecoveryOS

Partition numbers are detected at run time; that is just the common Asahi shape.

Before you start

Step by step

No USB stick, or one your Mac will not boot? Skip steps 1 and 2. On the installed system, run sudo ./AsahiLocker/bin/ram-rescue.sh build --arm, reboot, and type asahilocker at the rescue prompt. The RAM rescue guide has the details.

  1. Get the kit and build a live USB

    On your installed system, clone AsahiLocker and build a Fedora Asahi live USB with leifliddy/asahi-fedora-usb. build.sh erases the target device, so identify the stick carefully.

    git clone https://github.com/doug445/AsahiLocker.git
    
    sudo dnf install arch-install-scripts bubblewrap dosfstools e2fsprogs \
                     gdisk mkosi openssl pandoc rsync systemd-container
    git clone https://github.com/leifliddy/asahi-fedora-usb.git
    cd asahi-fedora-usb
    lsblk -o NAME,SIZE,TYPE,MODEL,VENDOR    # find your USB stick, NOT nvme0n1
    sudo su -                               # build.sh refuses to run under sudo
    ./build.sh -d /dev/sdX                  # ← your USB device

    Then copy the AsahiLocker folder onto the stick (./build.sh mount, copy into mnt_usb/root/, ./build.sh umount), so the script is not sitting on the filesystem it is about to encrypt. The live USB's root password is fedora.

  2. Boot the live USB

    Easiest: with the stick plugged in, run this on the installed system, reboot, and pick the new GRUB entry.

    sudo grub2-mkconfig -o /boot/grub2/grub.cfg

    That exact path, never the ESP one. On Asahi, /boot/efi/EFI/fedora/grub.cfg must stay a small chainload stub. Overwriting it drops an encrypted system into a GRUB rescue prompt.

    Or interrupt U-Boot ("Hit any key to stop autoboot") and boot it from the => prompt. If the stick does not show up, run usb start first. An unenumerated port is the usual reason a Mac looks like it "cannot boot USB".

    => usb start
    => bootflow scan -l
    => bootflow select <N>     # the usb0 entry, not nvme0
    => bootflow boot
  3. Dry-run it, then encrypt

    From the live environment. The dry run shows everything it detected and the exact command it would run, and changes nothing:

    sudo /root/AsahiLocker/bin/luks-deploy.sh --list
    sudo /root/AsahiLocker/bin/luks-deploy.sh /dev/nvme0n1p6 --dry-run
    sudo /root/AsahiLocker/bin/luks-deploy.sh /dev/nvme0n1p6 --defaults

    --list shows every install on the Mac and its state. Naming the root partition takes its /boot and EFI from that install's own fstab, and --defaults takes the recommended answer to every question that has one: the btrfs check, the default KDF (aggressive; moderate on a Mac with 8 GB), a recovery key. Leave both off and it asks instead.

    The script auto-detects root, /boot and EFI, cross-checks them against the target's own fstab, offers a read-only btrfs check, benchmarks your Mac, and asks you to pick a KDF profile. It then shows a pre-flight summary. Read it, and type encrypt to begin. Every word it asks you to type is lower case, and Caps Lock is checked for you: an inverted passphrase verifies fine twice and only fails at the boot prompt. Mistype the passphrase and it asks again; you do not start over.

    Encryption takes 15–60 minutes. Then come eight configuration steps and the 12-point gate. If any check fails it says so and refuses to declare success. Do not reboot until it passes.

  4. First encrypted boot

    Reboot and remove the USB. The passphrase prompt often scrolls behind boot text. If the screen looks frozen just after GRUB, it is waiting for you: type the passphrase and press Enter. Unlock takes about 2–10 seconds depending on the profile.

  5. Finish on the encrypted system

    sudo ./AsahiLocker/bin/post-encryption-setup.sh
    sudo ./AsahiLocker/boot-guards/install.sh

    This saves a recovery bundle, creates snapper subvolumes on the encrypted volume, restores the boot splash, and installs the two boot guards. Then copy the recovery bundle off the machine. On the drive it protects, it is no use to you.

  6. Verify

    lsblk -f | grep crypt
    sudo cryptsetup luksDump /dev/nvme0n1p6   # PBKDF: argon2id, AF hash: sha512
    grep rd.luks /boot/loader/entries/*.conf
    systemctl --failed

Something went wrong? Nothing is lost yet. The recovery guide starts with a table: what you see, what state that means, and what to do. It covers an interrupted encryption, a box that will not boot, SELinux denials, a damaged header and a grub rescue> prompt.

Choosing an argon2id profile

The key-derivation function runs once at every boot, and once per guess for anyone attacking a copy of your disk. argon2id is memory-hard: every guess needs gigabytes of RAM, and that memory requirement limits how many guesses a GPU or ASIC can run at once. The installer benchmarks your machine and shows an estimate for each profile:

ProfileMemoryIterationsUnlock, M2 MaxWork vs cryptsetup default
aggressive (default*)4 GiB109.5 s (measured)5×
moderate2 GiB8~4.2 s2×
fast1 GiB9~2.7 s1.125×
The luks-deploy.sh KDF profile prompt, listing aggressive, moderate and fast argon2id profiles with unlock times benchmarked on the running Mac
The profile prompt, with estimates measured on the machine running it.

* On any Mac with 8 GB, whatever the chip, the default is moderate: the memory must be free in the initramfs at every boot, and 4 GiB is half of that machine. All three use 4 threads, AES-256-XTS and sha512. You can re-cost a keyslot later without re-encrypting anything, using bin/luks-tune.sh. The full reasoning is in the argon2id guide, including how this compares with FileVault's KDF on the same disk.

Manual encryption vs AsahiLocker

By handAsahiLocker
Partition selectionYou identify root, boot and EFI yourselfAuto-detected, type-checked, cross-checked against the target's fstab
KDF parameterscryptsetup auto-benchmarks: machine-dependent, sha256Pinned argon2id + sha512, chosen from a menu benchmarked on your Mac
Boot configEdit crypttab, fstab, cmdline, GRUB defaults and every BLS entry by handAll rewritten, including every BLS entry and every initramfs
Did it work?You find out at reboot12-point gate refuses the reboot until it passes
Interrupted runYou debug the header stateDetected and resumed; cryptsetup repair handled
Mistyped passphrasecryptsetup exits; you start againProves nothing was written, then asks again
Needs a USB stickYes, or a second installNo: built-in RAM rescue
TestedOn your disk, by you187 checks on every push; real Macs; three full audits
SELinuxRelabel yourself, or boot into AVC denialsRelabelled and verified
RecoveryWhatever you thought to saveHeader backups + a labelled bundle of every changed file
Asahi footgunsgrub2-mkconfig clobbering the ESP stub; stale U-Boot entriesBoot guards undo both

Which Macs

Every M-series Mac that Fedora Asahi Remix boots, laptop or desktop: MacBook Air and Pro, Mac mini, Mac Studio, iMac and the 2023 Mac Pro, across M1, M2 and M3. Nothing in the tooling is model-specific; partitions, sector size and initramfs contents are all read at run time.

Desktop owners should read the compatibility notes first: a Bluetooth keyboard cannot type the passphrase at boot.

Risks: read these

Frequently asked questions

Can I encrypt Fedora Asahi Remix after installing it?

Yes, that is exactly what this is for. The Asahi installer has no encryption option, so without a tool, encrypting means doing it by hand. AsahiLocker converts the existing btrfs root in place, and your installed system, subvolumes, snapshots and btrfs UUID all survive.

Does it touch or wipe macOS?

No. macOS lives on separate APFS partitions that AsahiLocker never reads or writes. Only the btrfs Linux root partition is converted.

Why a passphrase at every boot? Can't it use the Secure Enclave?

There is no TPM on Apple Silicon, and Asahi has no interface to seal a key in the Secure Enclave, so there is nowhere safe to keep an auto-unlock key. That is why the KDF is argon2id and why the passphrase advice is not optional.

Why is /boot left unencrypted?

Because that is the normal LUKS arrangement: Fedora's, Ubuntu's and Debian's installers encrypt the root and leave /boot unencrypted, and where an installer does encrypt /boot, GRUB opens it with PBKDF2. On a Mac it would protect almost nothing: m1n1 stage 2, U-Boot and GRUB sit on the EFI partition, which nothing can encrypt. Measured on an M2 Max, GRUB's argon2id is also 8.5 times slower than the kernel's. The research is retired and kept as a record; the FAQ has the details.

What if the encryption is interrupted: power loss, a crash, a closed lid?

Nothing fatal. LUKS2 re-encryption is journaled. Boot the live USB or the RAM rescue, re-run luks-deploy.sh, and it detects the interrupted state and resumes, running cryptsetup repair first if needed. A hard kill mid-reencrypt is part of the loopback test suite that runs in CI on every push.

Will it work on a Mac with 8 GB of RAM?

Yes. On any Mac with 8 GB, M1, M2 or M3, the default profile is moderate (2 GiB x 8, twice the work per guess of cryptsetup's own default): the memory must be free in the initramfs at every boot, and 4 GiB is half of that machine. aggressive stays on the menu.

My Mac won't boot from USB. Am I stuck?

No, and you do not need USB at all. The built-in RAM rescue boots your own kernel from RAM and encrypts in place: sudo ./AsahiLocker/bin/ram-rescue.sh build --arm, reboot, type asahilocker. If you would rather use a stick, try usb start at the U-Boot prompt first; and a second minimal Asahi install on the internal disk is the third supported route.

Can I deploy it across several Macs unattended?

Yes. Environment variables pin the KDF, partitions and passphrase file so no menu appears. Read FLEET.md first: imaging several boxes from one source creates a real UUID-uniqueness problem.

How do I know it is safe to run?

Don't take it on trust. Run --dry-run and read what it would do; INTERNALS.md documents every file it changes and every gate check. 187 automated checks run on every push, among them the exact encrypt, hard-kill, repair and resume sequence against a throwaway loop device. It has been audited in full three times, every finding reproduced before it was fixed; the record is in the README, and the evidence is summarised above.

I'm not on Apple Silicon. Is there a version for my PC?

Yes: LinuxLocker applies the same in-place LUKS2 approach to other distros and filesystems, handles systemd-boot as well as GRUB, and re-signs Unified Kernel Images for Secure Boot.

Guides

The repository documentation, published as pages of their own:

Credits and further reading