在N1的OpenWRT上安装archlinux环境

  1. 创建磁盘镜像
cd /mnt/data
dd if=/dev/zero of=archlinux.img bs=1M count=1024
mkfs.ext4 archlinux.img
mkdir /archlinux
mount archlinux.img /archlinux
  1. 安装archlinux
wget http://ca.us.mirror.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
tar -xvzf ArchLinuxARM-aarch64-latest.tar.gz -C /archlinux
  1. 进入archlinux环境
mount -o bind /dev /archlinux/dev
mount -o bind /dev/pts /archlinux/dev/pts
mount -o bind /proc /archlinux/proc
mount -o bind /sys /archlinux/sys
chroot /archlinux /bin/bash --login
  1. archlinux环境下
pacman-key --init
pacman-key --populate archlinuxarm
pacman -Syu

推荐阅读更多精彩内容