Skip to content

Instantly share code, notes, and snippets.

@jumpyvi
Last active March 5, 2026 22:00
Show Gist options
  • Select an option

  • Save jumpyvi/1f573474261961cbb04a53472b6fb6a9 to your computer and use it in GitHub Desktop.

Select an option

Save jumpyvi/1f573474261961cbb04a53472b6fb6a9 to your computer and use it in GitHub Desktop.

About

This converts a "classic" distro to any image based OS with ComposeFS support!

Arch was chosen as the base as it's pretty easy to install and comes with systemd-boot pre-configured.

This is NOT what you might know as a "rebase". This is a full in-place re-install, you data and users will be lost.

This is mainly usefull for custom images that don't have ISOs, for exemple Bootcrew or FreeDesktop-based bootc images like ProjectBluefin's Egg.

Setup

Pre-install

  1. Get yourself an ArchLinux iso
  2. You need quite a lot of storage for this, I usually set 60-80gb (not sure what is the minimum)
  3. You need UEFI boot for this

Note

You could theoretically also use a easier distro to install that supports systemd-boot like PopOS or Endeavour.
This guide focus on a from-scratch arch install

Sacrifitial host installation (in the Arch live ISO)

  1. Setup basic networking
  2. Run /usr/bin/archinstall
  3. Select a filesystem that supports fs-verity (BTRFS with default settings is good enough)
  4. Make your separte boot partition /efi and not /boot
  5. Make sure your selected bootloader is systemd-boot
  6. Select NetworkManager in "Network configuration"
  7. In "Addition Packages", add podman
  8. For simplicity, I chose the Cinnamon profile and created a user, but you only need a TTY and root acces
  9. Finish the config then install

Installation

Note

You can use most bootc images, in this walkthrough, it will be ghcr.io/projectbluefin/egg:latest. See tested images at the bottom

  1. (Make sure you are root sudo su)
  2. Pull the image podman pull ghcr.io/projectbluefin/egg:latest
  3. Rechunk with the following command (change IMG= to your image) :

Rechunking is not always needed on some images and will take a long while. I could not get Egg to work at all without rechunking.

IMG="ghcr.io/projectbluefin/egg:latest"; podman tag $(podman run --rm --security-opt label=type:unconfined_t --mount=type=image,src="$IMG",dest=/chunkah -e "CHUNKAH_CONFIG_STR=$(podman inspect "$IMG")" quay.io/jlebon/chunkah:latest build | podman load | grep -oP '(?<=Loaded image: ).*|(?<=Loaded image\(s\): ).*') "$IMG"

Warning

This is the no-turning-back point! Your home and current boot should still be accessible after the following command, but might get corrupted/disapear

  1. Unmount /boot umount -l /boot
  2. Install the image to your root (again, replace ghcr.io/projectbluefin/egg:latest for your image name):
podman run --privileged --pid=host --user=root:root -v /var/lib/containers:/var/lib/containers -v /dev:/dev --security-opt label=type:unconfined_t ghcr.io/projectbluefin/egg:latest bootc install to-existing-root --acknowledge-destructive --composefs-backend --skip-fetch-check --cleanup
  1. Reboot to your new OS!
  2. Remount /efi to the booted os (with fstab/gnome-disks)
  3. Remove all systemd-boot entries except for the booted one
  4. Run bootc upgrade

Tested images

List of tested images:

Bootcrew

  • Arch (works)
  • Ubuntu (works)
  • Debian (Kinda works, but doesn't boot)

UBlue/Zirc

  • Zirconium-Hawaii: Works
  • Egg : Works
  • Bluefin : Works
  • BluefinLTS : Works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment