mkdir -p tmp/brokenroot
fakeroot fakechroot -- debootstrap trusty tmp/brokenroot http://archive.ubuntu.com/ubuntu
wget https://github.com/proot-me/proot-static-build/blob/master/static/proot-x86_64?raw=true -O proot
chmod +x proot
./proot -b /dev -b /sys -b /proc -b /etc/resolv.conf -b tmp/brokenroot/:/ -w / -0 /bin/bash
VERSION=trusty
cat <<EOF > etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ $VERSION main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ $VERSION main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ $VERSION-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ $VERSION-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://archive.ubuntu.com/ubuntu/ $VERSION universe
# deb-src http://archive.ubuntu.com/ubuntu/ $VERSION universe
deb http://archive.ubuntu.com/ubuntu/ $VERSION-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ $VERSION-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ $VERSION multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ $VERSION multiverse
deb http://archive.ubuntu.com/ubuntu/ $VERSION-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ $VERSION-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ $VERSION-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ $VERSION-backports main restricted universe multiverse
EOF
/var/lib/dpkg/info/dash.preinst
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true
export LC_ALL=C
export LANGUAGE=C
export LANG=C
apt-get update
apt-get dist-upgrade -y