#!/usr/bin/env bash set -euo pipefail ROOTFS=/config/proot/ubuntu TARBALL=/tmp/ubuntu-base.tar.gz URL="https://cdimage.ubuntu.com/ubuntu-base/releases/noble/release/ubuntu-base-24.04.4-base-amd64.tar.gz" if [ ! -x "$ROOTFS/bin/bash" ]; then mkdir -p "$ROOTFS" wget -O "$TARBALL" "$URL" tar -xzf "$TARBALL" -C "$ROOTFS" rm -f "$TARBALL" cp /etc/resolv.conf "$ROOTFS/etc/resolv.conf" || true mkdir -p "$ROOTFS/root" cat > "$ROOTFS/root/.bashrc" <<'EOF' export TERM=xterm-256color export LANG=C.UTF-8 cd /root EOF fi