booting to gnome, with debootstrap.

This commit is contained in:
2025-12-08 08:21:43 -08:00
parent 221c49ccbb
commit 71833416e4
4 changed files with 47 additions and 7 deletions

View File

@@ -3,13 +3,28 @@ if [ "$(id -u)" -ne 0 ]; then
echo "switching from $(id -un) to root"
exec sudo "$0" "$@"
fi
set -e
cd "$(dirname "$0")"
DIR="$(dirname "$0")"
cd ..
echo $PWD
rm -rf ./outputs/root/
mkdir -p ./outputs/root/
debootstrap noble ./outputs/root http://archive.ubuntu.com/ubuntu
if [ ! -d "./outputs/root" ]; then
mkdir -p ./outputs/root/
debootstrap noble ./outputs/root http://archive.ubuntu.com/ubuntu
fi
rm -rf './outputs/chroot'
mkdir -p ./outputs/chroot/
rsync -av ./outputs/root/ ./outputs/chroot/
mkdir -p ./outputs/chroot/proc
mount --bind /proc ./outputs/chroot/proc
cp ./config/filesystem_chroot_install.sh ./outputs/chroot/filesystem_chroot_install.sh
chmod +x ./outputs/chroot/filesystem_chroot_install.sh
chroot ./outputs/chroot /bin/bash -c "/filesystem_chroot_install.sh"
cd $DIR
cd ..
if mountpoint -q "./outputs/chroot/proc/"; then
umount -lf "./outputs/chroot/proc/"
fi
echo 'root filesystem created.'