Last active
October 30, 2024 15:12
-
-
Save cdown/5c5b53e1855d7812dfbc to your computer and use it in GitHub Desktop.
Debian chroot inside Arch
This file contains 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 chris | |
passwd chris | |
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) |
Hm. debootstrap exists as an arch package. Any reason not to use that?
probably because this paste is unmaintained and 6 years old ;-)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
useful gist, using it right now to bring a ubuntu 20.04lts into manjaro. :)