から出よchroot
うとします。ARM
x86_64
qemu
バイナリをchrootシステムにコピーしてstaticを使用できることがわかりました。
$ cp /usr/bin/qemu-arm archarm-chroot/usr/bin
しかし、それにもかかわらず、常に次のエラーが発生します。
chroot: failed to run command ‘/bin/bash’: Exec format error
私はこれがアーキテクチャが異なることを意味することを知っています。私は何が間違っていましたか?
ベストアンサー1
私は時々ARM chrootを使用します。私の電話はLinux Deployを実行していますが、画像は時々死にます。それから私のコンピュータにコピーし、次のようにchrootを使って状況を確認しました。
# This provides the qemu-arm-static binary
apt-get install qemu-user-static
# Mount my target filesystem on /mnt
mount -o loop fs.img /mnt
# Copy the static ARM binary that provides emulation
cp $(which qemu-arm-static) /mnt/usr/bin
# Or, more simply: cp /usr/bin/qemu-arm-static /mnt/usr/bin
# Finally chroot into /mnt, then run 'qemu-arm-static bash'
# This chroots; runs the emulator; and the emulator runs bash
chroot /mnt qemu-arm-static /bin/bash