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.
- Get yourself an ArchLinux iso
- You need quite a lot of storage for this, I usually set 60-80gb (not sure what is the minimum)
- 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
- Setup basic networking
- Run
/usr/bin/archinstall - Select a filesystem that supports fs-verity (BTRFS with default settings is good enough)
- Make your separte boot partition /efi and not /boot
- Make sure your selected bootloader is
systemd-boot - Select NetworkManager in "Network configuration"
- In "Addition Packages", add
podman - For simplicity, I chose the Cinnamon profile and created a user, but you only need a TTY and root acces
- Finish the config then install
Note
You can use most bootc images, in this walkthrough, it will be ghcr.io/projectbluefin/egg:latest. See tested images at the bottom
- (Make sure you are root
sudo su) - Pull the image
podman pull ghcr.io/projectbluefin/egg:latest - 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
- Unmount /boot
umount -l /boot - Install the image to your root (again, replace
ghcr.io/projectbluefin/egg:latestfor 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- Reboot to your new OS!
- Remount /efi to the booted os (with fstab/gnome-disks)
- Remove all systemd-boot entries except for the booted one
- Run
bootc upgrade
List of tested images:
- Arch (works)
- Ubuntu (works)
- Debian (Kinda works, but doesn't boot)
- Zirconium-Hawaii: Works
- Egg : Works
- Bluefin : Works
- BluefinLTS : Works