qemu:未捕获的目标信号 11(分段错误)- 核心已转储

qemu:未捕获的目标信号 11(分段错误)- 核心已转储

我有问题chroot。我有一台 amd64 主机,我想使用 qemu 来工作aarch64,我尝试使用这个脚本:

#!/bin/bash
echo ">>>"
echo ">>> Configuring ARMv7-A environment"
echo ">>>"
echo $PWD
echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register
echo ">>>  mounting filesystems"
mount -t proc proc $PWD/proc || echo "FAILED /proc"
mount -t sysfs sysfs $PWD/sys || echo "FAILED /sys"
mount --bind /dev $PWD/dev || echo "FAILED /dev"   
mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime shm $PWD/dev/shm || echo "FAILED /dev/shm"

cat /proc/sys/fs/binfmt_misc/status
cat /proc/sys/fs/binfmt_misc/arm   
cp /etc/resolv.conf $PWD/etc/resolv.conf || echo "FAILED resolv.conf"
echo ">>> entering ARMv7-A environment at $PWD"

chroot $PWD bin/bash

echo "<<<"
echo "<<< Back to native environment!"
echo "<<<"
umount $PWD/dev/shm
umount $PWD/dev
umount $PWD/sys    
umount $PWD/proc
echo -1 > /proc/sys/fs/binfmt_misc/arm

然而,当运行它时,我得到一个异常:

>>> entering ARMv7-A environment at /var/chroot/armv7a
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
../enterarmv7a.sh: line 18: 23146 Segmentation fault      (core dumped) chroot $PWD bin/bash

会是什么呢?我正在使用 Ubuntu 20.04 并安装qemu使用apt

相关内容