记录定制Ubuntu22.04文件系统

定制Ubuntu 22.04文件系统

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
wget https://old-releases.ubuntu.com/releases/22.04.1/ubuntu-22.04-live-server-arm64.iso
mount ubuntu-22.04-live-server-arm64.iso /mnt
cp /mnt/casper/ubuntu-server-minimal.squashfs ./
umount /mnt
unsquashfs ubuntu-server-minimal.squashfs
echo 'nameserver 8.8.8.8' >> squashfs-root/etc/resolv.conf
echo 'nameserver 8.8.4.4' >> squashfs-root/etc/resolv.conf
chroot squashfs-root
apt-get update
apt-get install -y unzip vim  sysstat  libnuma1  dmidecode  rsync  net-tools  psmisc  parted  arping  ntpdate  iproute2  iputils-ping  mawk  cracklib-runtime  ethtool  ntp  fdisk  libssl-dev  libpam-cracklib  logrotate
exit
cd squashfs-root
find . | cpio -o -H newc | gzip > ../Sample-root-filesystem-soc_ubuntu-22.04-aarch64.img

执行apt-get install命令后,若出现“perl:warning:xxx”相关报错、“debconf:xxx”相关报错、“Failed to retrieve available kernel versions.”以及“Failed to check for processor microcode upgrades.”报错,不影响Linux组件下载。

或根据官方参考文档进行,但是添加如下内容到squashfs-root/etc/resolv.conf

1
2
3
nameserver 127.0.0.53
options edns0 trust-ad
search .
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计