by thatcherc · 1y ago · 0 comments
This sounds very interesting! What's the scenario where you'd do this? Would you be, for example, emulating an ARM processor with qemu on an x86 computer and chrooting into Android on an eMMC?
~# sudo apt install qemu-user-static debootstrap
~# mkdir /tmp/arm
~# debootstrap --foreign --arch=armhf buster /tmp/arm http://deb.debian.org/debian
~# cp /usr/bin/qemu-arm-static /tmp/arm/usr/bin/
~# chroot /tmp/arm # from that point, you're running ARM!
~# /debootstrap/debootstrap --second-stageProbably even faster on Asahi Linux, but having both macOS and a fast Debian at the same time is soo neat :)
systemd-nspawn is a great tool for this.
It's also useful for reverse-engineering router/IoT firmware.