#!/bin/sh # # git.mdcc.cx git/ad1810-stuff/scripts # # 2023, Joost van Baal-Ilić # # This file is in the public domain # # # a1-debootstrap - set up a sid chroot, using debootstrap # FIXME TODO BUG : better use sbuild ... # set -ex # root@dazbog:/opt/debian# cd /opt/debian debootstrap sid sid http://deb.debian.org/debian cp /etc/hosts sid/etc/hosts mkdir -p sid/home/joostvb grep joostvb /etc/passwd >> sid/etc/passwd grep \^joostvb /etc/group >> sid/etc/group echo 'joostvb:*:18828:0:99999:7:::' >> sid/etc/shadow echo sid > sid/etc/debian_chroot cat <> /etc/fstab # /proc /opt/debian/sid/proc bind bind,noauto 0 0 /sys /opt/debian/sid/sys bind bind,noauto 0 0 /dev /opt/debian/sid/dev bind bind,noauto 0 0 /dev/pts /opt/debian/sid/dev/pts bind bind,noauto 0 0 /home/joostvb /opt/debian/sid/home/joostvb bind bind,noauto 0 0 EOT # mount -a : does not work when 'noauto' is in fstab for f in proc sys dev dev/pts home/joostvb; do mount /opt/debian/sid/$f; done chroot /opt/debian/sid apt update && apt -V install zsh locales-all less devscripts