Good observation :) it's the raspbian arm build -- you are chroot-ing into the exact SD card that you put into the Pi.
I don't know how exactly this sorcery works either. But I think chroot just "knows" that it needs to invoke qemu when it sees the binfmt of /bin/bash being arm.
If you read the script, it copies the relevant qemu binary on line 52 to the chroot's /usr/bin/.
What's happening here is binfmt-support on the host has a path registered for arm binaries as the file you just copied to /usr/bin - whenever the chroot tries to run anything, the host directs it to this bianry which is your arm emulator :).
jimmies|8 years ago
I don't know how exactly this sorcery works either. But I think chroot just "knows" that it needs to invoke qemu when it sees the binfmt of /bin/bash being arm.
hibby|8 years ago
What's happening here is binfmt-support on the host has a path registered for arm binaries as the file you just copied to /usr/bin - whenever the chroot tries to run anything, the host directs it to this bianry which is your arm emulator :).