-
-
Save RoboticDinosaur/37c533246c38e4646d39b1a58e298e80 to your computer and use it in GitHub Desktop.
Debian chroot inside Arch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pacman -S wget # needed for debootstrap | |
curl -o /tmp/db.deb http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.60~bpo70+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 wheezy /opt/debian/ http://ftp.uk.debian.org/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/ wheezy main non-free contrib | |
deb-src http://ftp.uk.debian.org/debian/ wheezy main non-free contrib | |
deb http://security.debian.org/ wheezy/updates main non-free contrib | |
deb-src http://security.debian.org/ wheezy/updates main non-free contrib | |
deb http://ftp.uk.debian.org/debian/ wheezy-updates main non-free contrib | |
deb-src http://ftp.uk.debian.org/debian/ wheezy-updates main non-free contrib | |
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 $USER | |
passwd $USER | |
cat > /etc/sudoers << 'EOF' | |
root ALL=(ALL) ALL | |
%sudo ALL=(ALL) ALL | |
EOF | |
sudo -iu chris | |
apt-get install git | |
mkdir ~/git | |
git clone git://github.com/cdown/dotfiles.git ~/git/dotfiles | |
(cd ~/git/dotfiles && ./setup) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment