在N1的OpenWRT上安装centos环境

  1. 创建磁盘镜像
cd /mnt/data
dd if=/dev/zero of=centos.img bs=1M count=1024
mkfs.ext4 centos.img
mkdir /centos
mount centos.img /centos
  1. 安装centos
wget http://vault.centos.org/altarch/7.4.1708/isos/aarch64/CentOS-7-aarch64-rootfs-7.4.1708.tar.xz
xz -d CentOS-7-aarch64-rootfs-7.4.1708.tar.xz
tar -xvf CentOS-7-aarch64-rootfs-7.4.1708.tar -C /centos
  1. 进入centos环境
mount -o bind /dev /centos/dev
mount -o bind /dev/pts /centos/dev/pts
mount -o bind /proc /centos/proc
mount -o bind /sys /centos/sys
chroot /centos /bin/bash --login
  1. centos环境下
yum update

推荐阅读更多精彩内容