Skip to content

Building from source

See CONTRIBUTING.md for contribution guidelines.

AstrOS is built with mkosi.

system:

Terminal window
git clone --recurse-submodules https://code.astros-linux.org/AstrOS/AstrOS.git
cd AstrOS/system
mkosi genkey # You'll need your own keys, or AstrOS will fail to build.
chmod 0600 mkosi.key mkosi.crt
mkosi -f -B # This builds to `mkosi.output/`

installer:

Terminal window
git clone --recurse-submodules https://code.astros-linux.org/AstrOS/AstrOS.git && cd AstrOS
# cp ./system/mkosi.output/AstrOS*_x86-64.raw.zst ./installer/mkosi.extra/images/AstrOS.raw.zst
# cd ./installer/mkosi.extra/images/ && sha256sum AstrOS.raw.zst > AstrOS.raw.zst.sha256 && cd -
cd installer
mkosi -f -B # This builds to `mkosi.output/`

Tip: add the following wrapper to your .bashrc file to run mkosi via mkosi-podman inside a container:

Terminal window
mkosi-podman() {
mkdir -p ~/.cache/mkosi-podman
podman run --rm -it \
-v "$PWD":/work:z \
-v "$HOME/.cache/mkosi-podman":/var/tmp:z \
-w /work docker.io/archlinux:latest \
bash -c 'pacman -Syu --noconfirm --needed mkosi && mkosi "$@"' _ "$@"
}