#!/usr/bin/env bash : ${IFACE="enp2s0"} : ${DSK="/dev/sdc"} : ${MNT_ROOT="/mnt/debroot"} : ${NET_IP="185.130.44.233"} : ${NET_GW="185.130.44.225"} : ${NET_NM="255.255.255.240"} : ${NET_IP6="2a07:e00:bb::f:f"} : ${NET_GW6="fe80::1"} : ${NET_NM6="64"} : ${HOSTNAME="proxmox"} wget -O prox_usb.sh https://cdn.privex.io/extras/prox_usb.sh chmod +x prox_usb.sh ./prox_usb.sh mkdir -p "$MNT_ROOT" mkdir -p "${MNT_ROOT}/"{usr,root,home,var} mkdir -p "${MNT_ROOT}/var/log" mount -v /dev/vg0/root "${MNT_ROOT}" mount -v /dev/vg0/roothome "${MNT_ROOT}/root" mount -v /dev/vg0/home "${MNT_ROOT}/home" mount -v /dev/vg0/usr "${MNT_ROOT}/usr" mount -v /dev/vg0/logs "${MNT_ROOT}/var/log" echo "proc $MNT_ROOT/proc proc defaults 0 0" >> /etc/fstab mount -v proc $MNT_ROOT/proc -t proc echo "sysfs $MNT_ROOT/sys sysfs defaults 0 0" >> /etc/fstab mount -v sysfs $MNT_ROOT/sys -t sysfs cp /etc/hosts $MNT_ROOT/etc/hosts echo "nameserver 185.130.44.20" >> "${MNT_ROOT}/etc/resolv.conf" cp /proc/mounts $MNT_ROOT/etc/mtab mkdir "$MNT_ROOT/etc/network" debootstrap --arch amd64 buster $MY_CHROOT http://deb.debian.org/debian/ echo "$HOSTNAME" > "${MNT_ROOT}/etc/hostname" cat > "$MNT_ROOT/etc/network/interfaces" <