summaryrefslogtreecommitdiff
path: root/make_rootfs.sh
diff options
context:
space:
mode:
authorPhilip J Freeman <elektron@halo.nu>2025-05-31 12:34:14 -0700
committerPhilip J Freeman <elektron@halo.nu>2025-05-31 15:47:31 -0700
commit34105077c777b0d2c5c69f39921f376b84ce1443 (patch)
tree606152d6f739a0ee7fd8e5127e79b595f3fe8c85 /make_rootfs.sh
parent5392080129b1093f36533e47c155f618c283ea57 (diff)
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. <https://ostreedev.github.io/ostree/> <https://www.nin.wiki/Halo_numbers>
Diffstat (limited to 'make_rootfs.sh')
-rwxr-xr-xmake_rootfs.sh57
1 files changed, 0 insertions, 57 deletions
diff --git a/make_rootfs.sh b/make_rootfs.sh
deleted file mode 100755
index 811c5cb..0000000
--- a/make_rootfs.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash -xe
-
-IMAGE_VERSION=$( date +%Y%m%d.%H%M%S )
-
-function unmount_pseudo_filesystems(){
- set +e
- for dir in dev sys proc; do umount -v "$root"/"$dir"; done
- set -e
-}
-
-function on_exit(){
- set +e
- unmount_pseudo_filesystems
- umount -v "$root"
-}
-trap on_exit EXIT
-
-root=rootfs/"$IMAGE_VERSION"
-
-mkdir -p "$root"
-
-# bootstrap the OS
-
-debootstrap noble "$root"
-
-for dir in /proc /sys /dev; do
- mount --bind "$dir" "$root"/"$dir"
-done
-
-export DEBIAN_FRONTEND=noninteractive
-
-chroot "$root" locale-gen en_US.UTF-8
-
-chroot "$root" apt-get update
-
-# Install a kernel and bootloader
-
-chroot "$root" apt-get -y --no-install-recommends install linux-generic-hwe-24.04 grub-efi
-
-if [ "$1" == "with-app" ]; then
- # Install an application
- chroot "$root" apt-get update
- chroot "$root" apt-get install -y software-properties-common
- chroot "$root" add-apt-repository -y universe
- chroot "$root" apt-get update
- chroot "$root" apt-get -y install nethack-console
-fi
-
-
-# Cleanup
-
-chroot "$root" apt-get clean
-
-unmount_pseudo_filesystems
-
-rm -rf "$root"/dev/*
-rm -rf "$root"/var/lib/apt/lists/*