Last active
January 2, 2022 03:16
-
-
Save ptrcnull/266bce84835710bf8cff59c9654ebb12 to your computer and use it in GitHub Desktop.
quick armv7 rootless "chroot" on alpine
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
sudo apk add qemu-arm qemu-openrc | |
sudo service qemu-binfmt restart | |
aria2c https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/armv7/alpine-minirootfs-3.15.0-armv7.tar.gz | |
dtrx alpine-minirootfs-3.15.0-armv7.tar.gz | |
rm alpine-minirootfs-3.15.0-armv7.tar.gz | |
mv alpine-minirootfs-3.15.0-armv7 chroot-arm | |
echo "nameserver 1.1.1.1" > chroot-arm/etc/resolv.conf | |
unshare -r -m -R chroot-arm /bin/ash -l | |
# binding a directory outside chroot | |
unshare -r -m sh -c "mount --bind test chroot-arm/mnt && chroot chroot-arm /bin/ash -l" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment