raspberry-pi - RaspberryPi 上的 Qemu Debian x86
问题描述
我想在 Raspberry Pi 上创建i386
环境。我正在使用 Raspberry Pi ver B,但我想使用哪个版本并不重要。QEMU
chroot
到目前为止,我做了:
apt-get install qemu qemu-user qemu-user-static binfmt-support debootstrap binutils
然后我chroot
将目录安装到/tmp/mnt
并运行:
sudo debootstrap --foreign --arch i386 buster ./ http://deb.debian.org/debian/
然后我安装:
mount -t sysfs /sys /tmp/mnt/sys/
mount -t proc /proc /tmp/mnt/proc/
mount –bind /dev /tmp/mnt/dev/
mount –bind /dev/pts /tmp/mnt/dev/pts/
mount –bind /dev/shm /tmp/mnt/dev/shm/
现在,当我尝试运行第二阶段时debootstrap
:
sudo chroot ./ ./debootstrap/debootstrap --second-stage
我收到以下错误消息:
W: Failure trying to run: /sbin/ldconfig
W: See //debootstrap/debootstrap.log for details
我检查了debootstrap/debootstrap.log
:
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
事实上,当我尝试时,sudo chroot ./ ./sbin/ldconfig
我得到了同样的 Seg 错误。但是当我尝试sudo chroot ./ ./bin/bash
它的工作。
我不确定下一步应该是什么。
我想这与我的 qemu 配置或版本有关(我正在使用version 2.8.1(Debian 1:2.8+dfsg-6+deb9u4)
)。我检查了许多关于类似问题的主题,但找不到可以帮助我找到解决方案的主题。
解决方案
好吧,我想我明白了。
当我在命令中选择stretch
Debian 版本时,它可以工作。debootstrap
sudo debootstrap --foreign --arch i386 stretch ./ http://deb.debian.org/debian/
现在,当我更多地考虑它时,它是有道理的。我猜想在 chroot 中运行 i386 Debian 并没有提供与主机操作系统的完全分离(我挂载了proc
,sys
等)。
推荐阅读
- c# - NLog 使用 When Condition Renderer 获取值可用性
- xpath - Unable to find element by attribute with lxml
- c++ - 为什么程序 1 有效,但程序 2 无效,有人可以解释程序 2 有什么问题吗?
- java - For 循环映射覆盖以前的值
- javascript - 在移动视图中以字体真棒图标显示标题
- php - 在woocommerce中使用foreach设置购物车数量时的无限循环
- r - 日期未在 plotly online 上正确显示
- python - 初始化和显示网格 - python
- javascript - 路由更改时重新渲染脚本
- visual-studio - Visual Studio 项目中的源文件列表