Debian chroot inside Arch

pacman -S wget # needed for debootstrap

curl -o /tmp/db.deb http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.140~bpo12+1_all.deb

mkdir /opt/debootstrap

cd /opt/debootstrap

ar x /tmp/db.deb

tar xf data.tar.gz

mkdir /opt/debian

DEBOOTSTRAP_DIR=/opt/debootstrap/usr/share/debootstrap /opt/debootstrap/usr/sbin/debootstrap --arch amd64 stable /opt/debian/ Index of /debian/

mount -t proc proc /opt/debian/proc/

mount -t sysfs sys /opt/debian/sys/

mount -o bind /dev /opt/debian/dev/

mount -o bind /dev/pts /opt/debian/dev/pts/

cat > /opt/debian/etc/apt/sources.list << ‘EOF’

deb http://ftp.uk.debian.org/debian/ stable main non-free contrib non-free-firmware

deb-src http://ftp.uk.debian.org/debian/ stable main non-free contrib non-free-firmware

deb http://security.debian.org/ stable/updates main non-free contrib non-free-firmware

deb-src http://security.debian.org/ stable/updates main non-free contrib non-free-firmware

deb http://ftp.uk.debian.org/debian/ stable-updates main non-free contrib non-free-firmware

deb-src http://ftp.uk.debian.org/debian/ stable-updates main non-free contrib non-free-firmware

EOF

chroot /opt/debian /bin/bash

inside chroot

apt-get update && apt-get dist-upgrade

apt-get install locales

dpkg-reconfigure locales

add name to /etc/hosts

optional

apt-get install curl sudo ncurses-term

groupadd sudo

useradd -m -G sudo -s /bin/bash gnoppix

passwd gnoppix

cat > /etc/sudoers << ‘EOF’

root ALL=(ALL) ALL

%sudo ALL=(ALL) ALL

EOF

sudo -iu gnoppix

apt-get install git

mkdir ~/git

git clone git://github.com/gnoppix/dotfiles.git ~/git/dotfiles

(cd ~/git/dotfiles && ./setup)