[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:
$this->bbcode_second_pass_code('', '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
$this->bbcode_second_pass_code('', 'packer -S proot qemu-user-static')

once you installed both you can mount you arm filesystem by

$this->bbcode_second_pass_code('', '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.
lyoko
 
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 4 guests