then echo "Please run as root"
exit
fi
-# Setup fstab mount points
-cat <<'EOF' >> /etc/fstab
-/dev /opt/chroot/coriolis/dev none bind 0 0
-/dev/pts /opt/chroot/coriolis/dev/pts none bind 0 0
-/proc /opt/chroot/coriolis/proc none bind 0 0
-/sys /opt/chroot/coriolis/sys none bind 0 0
-/tmp /opt/chroot/coriolis/tmp none bind 0 0
-EOF
# Create coriolis chroot dir in /opt
mkdir -p /opt/chroot/coriolis
# Install debootstrap and schroot via apt
# Install debian/buster chroot using debootstrap
/usr/sbin/debootstrap buster /opt/chroot/coriolis \
http://ftp.uk.debian.org/debian
-# Mount all chroot mount points from fstab
-mount /opt/chroot/coriolis/dev
-mount /opt/chroot/coriolis/dev/pts
-mount /opt/chroot/coriolis/proc
-mount /opt/chroot/coriolis/sys
-mount /opt/chroot/coriolis/tmp
echo "coriolis2" > /opt/chroot/coriolis/etc/debian_chroot
# Install apt dependencies in the chroot
chroot /opt/chroot/coriolis /bin/bash << EOF
description=Debian Buster for Coriolis
directory=/opt/chroot/coriolis
groups=sbuild-security,$SUDO_USER,users
+type=directory
EOF
echo "Adding the following coriolis section to /etc/schroot/schroot.conf:
description=Debian Buster for Coriolis
directory=/opt/chroot/coriolis
groups=sbuild-security,$SUDO_USER,users
+type=directory
This enables you to chroot into coriolis as an unprivileged user by running
'schroot -c coriolis /bin/bash'
fi
chrootdir="$1"
echo "creating chroot '$chrootdir'"
-# Setup fstab mount points
-cat <<EOF >> /etc/fstab
-/dev /opt/chroot/$chrootdir/dev none bind 0 0
-/dev/pts /opt/chroot/$chrootdir/dev/pts none bind 0 0
-/proc /opt/chroot/$chrootdir/proc none bind 0 0
-/sys /opt/chroot/$chrootdir/sys none bind 0 0
-/tmp /opt/chroot/$chrootdir/tmp none bind 0 0
-EOF
# Create coriolis chroot dir in /opt
mkdir -p /opt/chroot/$chrootdir
# Install debian/buster chroot using debootstrap
/usr/sbin/debootstrap buster /opt/chroot/$chrootdir \
http://ftp.uk.debian.org/debian
-# Mount all chroot mount points from fstab
-mount /opt/chroot/$chrootdir/dev
-mount /opt/chroot/$chrootdir/dev/pts
-mount /opt/chroot/$chrootdir/proc
-mount /opt/chroot/$chrootdir/sys
-mount /opt/chroot/$chrootdir/tmp
echo "$chrootdir" > /opt/chroot/$chrootdir/etc/debian_chroot
# Install apt dependencies in the chroot
description=Debian Buster for $chrootdir
directory=/opt/chroot/$chrootdir
groups=sbuild-security,$SUDO_USER,users
+type=directory
EOF
echo "Adding the following $chrootdir section to /etc/schroot/schroot.conf:
description=Debian Buster for $chrootdir
directory=/opt/chroot/$chrootdir
groups=sbuild-security,$SUDO_USER,users
+type=directory
This enables you to chroot into $chrootdir as an unprivileged user by running
'schroot -c $chrootdir /bin/bash'