[HOW-TO] chrooting into ARM enviorment.

Guides written by the community, for the community, and only guides!

[HOW-TO] chrooting into ARM enviorment.

Postby lyoko » Sun Sep 13, 2015 3:07 pm

Chrooting into ARM filesystem can be really useful in order to quickly compile stuff, installing packages, repairing Boot.
But in order to get that to work you need two tools:
Code: Select all
qemu-user-static - enables you to execute binaries that were compiled to other architectures
Proot - chrooting tool with various features, including qemu static execution

You can get these for Arch Linux from AUR
Code: Select all
packer -S proot qemu-user-static

once you installed both you can mount you arm filesystem by

Code: Select all
mkdir mnt
mount /dev/sdb1 mnt
cd mnt
cp /usr/bin/qemu-arm-static usr/bin # qemu-arm-static is for armv7, you can use also qemu-aarch64-static and qemu-armeb-static
#it will copy the right qemu executable required to emulate these binaries to the local usr/bin
proot -R . -q qemu-arm-static # will enter the chroot environment
uname -m # will help you determine if you entered chroot environment successfully.

once you are inside you are free to do as you please, you can access the host filesystem in /host-rootfs .

and you should edit /etc/resolv.conf and enter a DNS address or you won't be able to resolve DNS addresses at all.
Posts: 11
Joined: Thu Aug 13, 2015 8:25 pm

Return to Community Guides

Who is online

Users browsing this forum: No registered users and 1 guest