Running a Mainstream Linux Distro Natively on Apple Silicon: Fedora Asahi Remix First Impressions

+

It’s been a year and a half since the Asahi Linux project allowed us to run Arch Linux natively on our Apple Silicon computers. And while my overall experience has been excellent, the Asahi Linux project is switching their flagship Linux distribution (distro) from Arch to Fedora.

Why the switch from Arch to Fedora? You could argue that Fedora is a much more popular mainstream distribution compared to Arch, or that Linus Torvalds himself uses Fedora already on his Apple Silicon-based Macbook using the Asahi boot components and drivers. But the main reason is that there have been many issues surrounding the maintenance of ARM packages for Arch Linux, and that the Fedora team is both capable and willing to provide provide the support needed to provide a truly polished Linux experience on modern Macs (the main goal of the Asahi Linux project). By moving to Fedora, the Asahi team can focus on reverse engineering Apple hardware while the Fedora team can focus on maintaining the distribution itself on the Apple Silicon platform. This combination of Fedora with the Asahi boot components and drivers for Apple Silicon is called Fedora Asahi Remix.

I’ve been running Asahi based on Arch Linux since it was released, and my experience has been stellar overall. The Asahi project exposed me to Arch Linux for the first time, and it quickly turned into my second favourite Linux distribution of all time. Ironically, my favourite Linux distribution over the past few decades has been Fedora, and I have no problem saying Goodbye to my Arch setup for it as a result.

In this blog post, I’ll discuss how I migrated from the original Asahi based on Arch Linux to Fedora Asahi Remix, as well as my initial impressions. TLDR: It’s awesome… as shown in this screenshot of the sway desktop in Fedora Asahi Remix on my Mac Studio (right-click the image and choose to open it in a new browser tab if you want to zoom in on it easily):

Fedora Asahi Remix Sway Desktop

Part 1: Migration

Backing up Arch Linux files and configuration

There is no automated way to migrate from one Linux distribution to another. You just have to install the new distribution and migrate your files and configuration over. And while you can copy files across the network to another system, it’s generally easier just to copy them to some large capacity external drive, since you’ll be copying them back to the same machine shortly thereafter.

In my case, I have a 2TB SSD in a USB enclosure with a single exFAT partition that I mounted to the /mnt directory using sudo mount /dev/sda1 /mnt. Next, I copied over the dotfiles (hidden configuration files) within my home directory (cp -R ~/.* /mnt), as well as the entire contents of my home directory (cp -R ~/* /mnt). My home directory contains subdirectories with all of my documents, development files, container images, cloud configuration, music, and so on. The only files outside my home directory included those for my QEMU virtual machines and associated installation ISO images, which I easily copied over using cp -R /VMs /ISOs /mnt.

Removing existing Linux partitions

After backing up my files and configuration, I booted into macOS to remove the existing Linux partitions. You can use this cheatsheet to understand how to do this, but I’ll outline it briefly here.

If you open a Terminal app in macOS and run the sudo diskutil list command (as shown below for my system), you’ll notice a 2.5 GB partition that contains the Apple-specific stuff needed to boot Asahi Linux. This partition (e.g., disk0s3) is actually an Apple Filesystem (APFS) container that is synthesized into a separate disk (e.g., disk2). You’ll also notice an EFI system partition used to boot Linux and the associated Linux filesystem partition (e.g., disk0s4 and disk0s5). Together, these three partitions (outlined in red) comprise Asahi Linux.

AsahiPartitions

The other partitions comprise macOS and include the Apple ISC boot partition (e.g., disk0s1), the Apple recovery partition (e.g., disk0s6), and the APFS container partition that is synthesized to the disk that stores the macOS filesystem (e.g., disk0s2).

To remove the three Asahi partitions on my system, and resize the APFS container that stores macOS to use the freed space afterwards, I ran the following commands. You can skip the last command if you just want to use the same amount of space for Fedora Asahi Remix, since the beginning of the installation script will allow you to select this free space instead of shrinking the APFS container that stores macOS.

sudo diskutil erasevolume free free disk0s5
sudo diskutil erasevolume free free disk0s4
sudo diskutil apfs deleteContainer disk0s3
sudo diskutil apfs resizeContainer disk0s2 0

Following this, I ran a sudo diskutil list again to verify they were indeed gone, and that the APFS container that stores the macOS filesystem was assigned the free space:

AsahiPartitionsRemoved

Installing Fedora Asahi Remix

The installation process for Fedora Asahi Remix is nearly identical to the original Asahi installation process. Within macOS, you run the installation script from the Fedora Asahi Remix website (curl https://fedora-asahi-remix.org/install | sh) within a macOS Terminal app and follow the instructions provided.

After a brief welcome, you’ll be prompted to shrink the APFS container that stores macOS to leave some free space for Asahi:

Installation1

Following this, you’ll choose to install Fedora into this free space (which will create the same three Asahi-specific partitions noted earlier). There are several builds of Fedora+KDE, Fedora+GNOME, Fedora Server, and Fedora Minimal to choose from as shown in the truncated list below:

Installation2

Fedora+KDE is the default for Fedora Asahi Remix because KDE Plasma Workspaces has superb ARM support compared to GNOME (which has traditionally been the default desktop on Fedora).

Next, you’ll choose how much of the free space to use for the three Asahi-specific partitions (there’s no reason to choose anything less than ‘max’ unless you want to install multiple distributions), as well as the volume name that is displayed on the Mac startup options screen:

Installation3

Following this, the installation script will download and extact the necessary files, instruct you to reboot to disable System Integrity Protection (SIP) for Fedora Asahi Remix, and then complete the installation using the Fedora installer (time/zone, networking, user accounts).

Performing post installation tasks

Like the original Asahi, Fedora Asahi Remix with KDE Plasma Workspaces was refreshingly fast and stable. However, before restoring my files, I decided to add some software packages I needed. More specifically, I installed the package groups for development (which includes several important development tools, including Git), the GNOME desktop, and sway window manager:

sudo dnf groupinstall "Development Tools"
sudo dnf groupinstall "GNOME"
sudo dnf groupinstall "Sway Desktop" 

While the Sway Desktop package group included the waybar and grim packages I use in sway, it didn’t include the rofi app launcher, or the fonts and alacritty terminal I use. So, I installed those packages next using sudo dnf install rofi fontawesome-fonts terminus-fonts terminus-fonts-console alacritty.

Following this, I installed the three apps I regularly use: VLC media player, Chromium, and Visual Studio Code. VLC media player and Chromium could be installed using dnf install vlc chromium (VLC first requires you add the rpmfusion repository). However, to obtain Visual Studio Code, I had to download the RPM from Microsoft (https://update.code.visualstudio.com/1.81.0/linux-rpm-arm64/stable/) and install it afterwards using sudo rpm -ivh code*aarch64.rpm.

At this point, I had the tools, desktops, and apps I needed, but I needed to restore my sway, waybar, and rofi dotfiles from my backup to get back my sway desktop configuration:

sudo mount /dev/sda1 /mnt
cp -R /mnt/.config/sway ~/.config/
cp -R /mnt/.config/waybar ~/.config/
cp -R /mnt/.config/rofi ~/.config/

Next, I configured my containers, Kubernetes cluster, and virtual machines. I prefer podman to docker, but still like using docker commands, which are nicely provided by the docker command included within the podman-docker package. So I ran dnf install podman-docker (which also installs podman and QEMU as dependences) and restored my containers from backup (including my Nextcloud instance). Kubernetes (I use K3s) also installed without any issues using the script from the K3s website. My configuration here took longer to restore, but that’s only because it’s mostly additional Kubernetes containers, extras, and configuration manifests from a private Git repository. Finally, I restored my QEMU virtual machine files and ISOs from backup using cp -R /mnt/VMs /mnt/ISOs /.

Part 2: First Impressions

In the original Fedora Asahi Remix annoucement, it was noted that there are still some loose ends that needed to be tied up and that Fedora Asahi Remix would be ready by the end of August as a result. At the end of this same announcement, it was noted that Adventurous users can try out the Fedora Asahi Remix today, but please expect rough spots (or even complete breakage) and that they ask that reporters and bloggers wait for the official release before evaluating our work.

Of course, I’m disobeying this last statement, but only because I have zero negative things to say about Fedora Asahi Remix in its current state. Otherwise, I would have gladly waited until the release at the end of this month out of respect for the Asahi and Fedora teams.

I expected a few hiccups during the migration process, such as apps I needed that weren’t supported, odd hardware issues, devices that didn’t work, or even general configuration issues. There were none of these whatsoever. Instead, I got a polished distribution that was far easier to configure compared to the original based on Arch Linux.

My entire sway/waybar/rofi configuration migrated perfectly. The only setting I had to change in my sway configuration was the shortcut to open Visual Studio Code (on the original Asahi, I had it installed as a Flatpak package instead of an RPM). I actually don’t have any Flatpak packages installed on Fedora Asahi Remix at all because all the software I needed was available in RPM format. There was no searching high and low for QEMU packages missing from the software repository like I had to do on Arch Linux. Instead, everything I needed was already there from when I installed the podman-docker package that included QEMU as a dependency. I just restored my VM files, and the scripts I use to start the VMs worked without any modification. Ditto for my containers and Kubernetes configuration.

All the hardware works, my peripheral devices work, and the whole migration process was seamless. I’m up and running with my system and all of its software in the same state less than 3 hours after installing Fedora Asahi Remix. And it’s a better system. Kudos to the Asahi and Fedora teams!