- 下载 ubuntu-base 基础包
- 解压到目标镜像分区
tar zxpf xxx.tar.gz
cp apt source.list 到 etc/apt/source.list echo hostname >/etc/hostname
echo nameserver ip >/etc/resolv.conf
- 进入 chroot 安装必备工具
apt install vim openssh-server netplan.io net-tools iputils-ping sudo dhcpcd5
passwd root useradd user.. passwd user..
usermod -aG sudo标签:tar,sudo,apt,etc,base,ubuntu,rootfs From: https://www.cnblogs.com/yujian2022/p/18342107