制作一个ubuntu-armhf chroot
sudo apt install schroot debootstrap
sudo mkdir /srv/chroot
sudo mkdir /srv/chroot/debian-armhf
sudo debootstrap --arch armhf --foreign focal /srv/chroot/ubuntu-armhf http://mirrors.ustc.edu.cn/ubuntu-ports/
#sudo debootstrap --arch armhf --foreign buster /srv/chroot/debian-armhf http://debian.xtdv.net/debian
sudo chroot "/srv/chroot/debian-armhf" /debootstrap/debootstrap --second-stage
sudo gedit /etc/schroot/chroot.d/debian-armhf.conf
拷贝以下代码,并将<username>
替换为你的电脑名:
[debian-armhf]
description=Debian Armhf chroot
aliases=debian-armhf
type=directory
directory=/srv/chroot/debian-armhf
profile=desktop
personality=linux
preserve-environment=true
root-users=<username>
users=<username>
sudo gedit /etc/schroot/desktop/nssdatabases
拷贝以下代码:
# System databases to copy into the chroot from the host system.
#
# <database name>
#passwd
shadow
#group
gshadow
services
protocols
#networks
#hosts
#user
sudo gedit /srv/chroot/debian-armhf/var/lib/dpkg/statoverride
拷贝以下代码:
root root 2755 /usr/bin/crontab
现在可以使用schroot及代号进入chroot
sudo schroot -c ubuntu-armhf
gedit ~/.bashrc
添加以下代码:
export LANGUAGE="C"
export LC_ALL="C"
export DISPLAY=:0
参考链接:
https://forum.armbian.com/topic/16584-install-box86-on-arm64/
原文:https://www.cnblogs.com/chendeqiang/p/14680368.html