Failed to run arm nspawn-container on x64 pc
Hope2333 opened this issue · 6 comments
Are you rooted?
Yes
Desktop environment
🐭 xfce
Container type
systemd-nspawn
Configuration
container | value |
---|---|
os | ArchLinux Arm |
arch | arm64 |
host | value |
---|---|
os | ArchLinux |
arch | x86_64 |
terminal | xfce-terminal |
tmoe | latest |
Describe the bug
当我在Archlinux(PC)上运行arm64的容器时报错(试了多次,同一个问题)
排查:检查了'/usr/local/etc/tmoe-linux/lib/usr/bin/qemu-aarch64-static'等,没有问题。排除了是qemu下载时把对应架构的bin二进制文件下错的问题
结论:可能是脚本的哪里出了点差错
Screenshots
No response
How to reproduce
No response
Expected behavior
No response
Error Logs
Spawning container arch-arm64 on /usr/local/etc/tmoe-linux/containers/chroot/arch_arm64.
Press ^] three times within 1s to kill container.
execv(/bin/bash, /bin/bash, /bin/sh) failed: Exec format error
Container arch-arm64 failed with error code 1.
Arch Linux ARM
Spawning container arch-arm64 on /usr/local/etc/tmoe-linux/containers/chroot/arch_arm64.
Press ^] three times within 1s to kill container.
execv(/bin/bash, /bin/bash, /bin/sh) failed: Exec format error
Container arch-arm64 failed with error code 1.
Press enter to return.
Alpine Linux v3.17
theshiveringtruth : “宇宙是蚂蚁的梦。”
Spawning container alpine-3.17-arm64 on /usr/local/etc/tmoe-linux/containers/chroot/alpine-3.17_arm64.
Press ^] three times within 1s to kill container.
execv(/bin/bash, /bin/bash, /bin/sh) failed: Exec format error
Container alpine-3.17-arm64 failed with error code 1.
Additional context
No response
sudo pacman -Sy qemu-user-static-binfmt
我把标题中的 chroot 改成了 nspawn。
严格来说,nspawn
与 普通 chroot
有很多区别。
如果安装完那个依赖后还是无法解决,那请再跟我反馈。
好像OK了,这个issus也可关了
一个小问题
Arch Linux ARM
什 不到啊 : “你,对,你,就是你,你是你。”
Spawning container arch-arm64 on /usr/local/etc/tmoe-linux/containers/chroot/arch_arm64.
Press ^] three times within 1s to kill container.
[root@arch-arm64 ~]# exit
exit
Container arch-arm64 failed with error code 1.
Arch Linux ARM
Spawning container arch-arm64 on /usr/local/etc/tmoe-linux/containers/chroot/arch_arm64.
Press ^] three times within 1s to kill container.
[root@arch-arm64 ~]# exit
exit
Container arch-arm64 failed with error code 1.
Press enter to return.
按回车键返回
ok了,但容器进入后脚本停止了运行
。。。我有相同问题,但我是ArchLinux ARM跨架构运行Ubuntu 22.04 amd64
log:
'/root/.config/tmoe-linux/gitstatus' 的模式已由 0755 (rwxr-xr-x) 更改为 0777 (rwxrwxrwx)
'/root/.config/tmoe-linux/gitstatus/timezone.txt' 的模式已由 0644 (rw-r--r--) 更改为 0777 (rwxrwxrwx)
Creating chroot startup script
正在创建chroot容器启动脚本
mkdir: 已创建目录 '/usr/local/etc/tmoe-linux/containers/chroot/ubuntu-jammy_amd64/media/sd'
'/tmp/environment' 的模式已由 0644 (rw-r--r--) 更改为 0666 (rw-rw-rw-)
mkdir: 已创建目录 '/usr/local/etc/tmoe-linux/containers/chroot/ubuntu-jammy_amd64/run/shm'
mkdir: 已创建目录 '/usr/local/etc/tmoe-linux/containers/chroot/ubuntu-jammy_amd64/etc/gitstatus'
mkdir: 已创建目录 '/usr/local/etc/tmoe-linux/containers/chroot/ubuntu-jammy_amd64/usr/local/etc/tmoe-linux/container'
grep: 警告:! 前有多余的 \
Giving startup script execution permission
正在赋予启动脚本执行权限
'tome' -> 'tmoe'
'debian' 的模式已保留为 0755 (rwxr-xr-x)
'startvnc' 的模式已由 0644 (rw-r--r--) 更改为 0755 (rwxr-xr-x)
'stopvnc' 的模式已由 0644 (rw-r--r--) 更改为 0755 (rwxr-xr-x)
'debian-i' 的模式已保留为 0755 (rwxr-xr-x)
'startxsdl' 的模式已由 0644 (rw-r--r--) 更改为 0755 (rwxr-xr-x)
'startx11vnc' 的模式已由 0644 (rw-r--r--) 更改为 0755 (rwxr-xr-x)
'tmoe' 的模式已保留为 0755 (rwxr-xr-x)
'novnc' 的模式已由 0644 (rw-r--r--) 更改为 0755 (rwxr-xr-x)
You can type rm /root/sd/Download/backup/rootfs/ubuntu-jammy_amd64-rootfs.tar.xz to delete the image file
您可以输rm /root/sd/Download/backup/rootfs/ubuntu-jammy_amd64-rootfs.tar.xz来删除容器镜像文件
-rw-r--r-- 1 root root 106M 1月11日 14:04 /root/sd/Download/backup/rootfs/ubuntu-jammy_amd64-rootfs.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:-- 0
curl: (28) SSL connection timeout
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 368k 0 368k 0 0 75251 0 --:--:-- 0:00:05 --:--:-- 75266
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 350k 100 350k 0 0 3995 0 0:01:29 0:01:29 --:--:-- 3995
'/usr/local/etc/tmoe-linux/containers/chroot/ubuntu-jammy_amd64/root' 的模式已保留为 0700 (rwx------)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3359 100 3359 0 0 6477 0 --:--:-- --:--:-- --:--:-- 6497
Against Idleness and Mischief
How doth the little busy bee How skillfully she builds her cell!
Improve each shining hour, How neat she spreads the wax!
And gather honey all the day And labours hard to store it well
From every opening flower! With the sweet food she makes.
In works of labour or of skill In books, or work, or healthful play,
I would be busy too; Let my first years be passed,
For Satan finds some mischief still That I may give for every day
For idle hands to do. Some good account at last.
-- Isaac Watts, 1674-1748
Ubuntu 22.04.1 LTS
秋之回忆 : “从一开始,我就不那么喜欢你。”
Spawning container ubuntu-jammy-amd64 on /usr/local/etc/tmoe-linux/containers/chroot/ubuntu-jammy_amd64.
Press ^] three times within 1s to kill container.
execv(/bin/bash, /bin/bash, /bin/sh) failed: Exec format error
Container ubuntu-jammy-amd64 failed with error code 1.
Ubuntu 22.04.1 LTS
Spawning container ubuntu-jammy-amd64 on /usr/local/etc/tmoe-linux/containers/chroot/ubuntu-jammy_amd64.
Press ^] three times within 1s to kill container.
execv(/bin/bash, /bin/bash, /bin/sh) failed: Exec format error
Container ubuntu-jammy-amd64 failed with error code 1.
Press enter to return.
按回车键返回
Law of Procrastination:
Procrastination avoids boredom; one never has
the feeling that there is nothing important to do.
网络 佚名 : “没有激流就称不上勇进,没有山峰就谈不上攀登。”
Ubuntu 22.04.1 LTS
Spawning container ubuntu-jammy-amd64 on /usr/local/etc/tmoe-linux/containers/chroot/ubuntu-jammy_amd64.
Press ^] three times within 1s to kill container.
execv(/bin/bash, /bin/bash, /bin/sh) failed: Exec format error
Container ubuntu-jammy-amd64 failed with error code 1.
Press enter to return.
按回车键返回
aarch64没有binfmt这个包
,之前装qemu-system时还有依赖问题