From 34105077c777b0d2c5c69f39921f376b84ce1443 Mon Sep 17 00:00:00 2001 From: Philip J Freeman Date: Sat, 31 May 2025 12:34:14 -0700 Subject: Deploying a demo amd64 debian-based OS via ostree This is a prototype outline for building and deploying a debian based OS with ostree. For purposes of demonstration, the OS runs from a bootable USB device on a UEFI capable amd64 machine. Once a USB device is created and booted, the OS can be updated using a simple shell script. --- commit-os | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 commit-os (limited to 'commit-os') diff --git a/commit-os b/commit-os new file mode 100755 index 0000000..5e16a06 --- /dev/null +++ b/commit-os @@ -0,0 +1,18 @@ +#!/bin/bash -xe +set -o pipefail + +. config + +version="$(find "$roots" -mindepth 1 -maxdepth 1 -type d | cut -d/ -f2 | sort -rn | head -1)" +root="$roots"/"$version" + +if [ ! -d "$root" ]; then + echo "Error: root dir not found: $root" >&2 + exit 1 +fi + +[ -d "$build_repo" ] && rm -rf "$build_repo" + +ostree --repo="$build_repo" init --mode=archive + +ostree --repo="$build_repo" commit -b "$branch" --tree=dir="$root" -- cgit v1.2.3