I'm trying to chroot into ARM architecture environment. I have qemu-arm-static placed at <arm_chroot>/usr/bin and correct binfmt entries for ARM architecture on both openvz container and hardware node. On hardware node
chroot /var/lib/vz/private/<num>/<arm_chroot>
works well, but at container I have an error:
mmap: Operation not permitted
I've tried to strace both hardware node and container chroot commands, and here is the difference: on hw node I have
mmap2(0x8000, 774144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x8000
but container returns
mmap2(0x8000, 774144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = -1 EPERM (Operation not permitted)
I've tried to compare
It returns 65536 on both hw-node and container. Error looks like filesystem mounted with noexec option, but this is somehow different on hw-node and container.
I have Debian 6.0.6 on both hardware node and container, Linux debian 2.6.32-5-openvz-686 #1 SMP Sun Sep 23 11:40:07 UTC 2012 i686 GNU/Linux kernel, vzctl v. 3.0.24-12.