From 0516250f764bda70e50c99df740b1a093452663f Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 28 Nov 2023 21:47:07 +0800 Subject: [PATCH] =?UTF-8?q?ubuntu:=20=E9=A2=84=E7=95=99=20minimal=20?= =?UTF-8?q?=E4=BA=91=E9=95=9C=E5=83=8F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/reinstall.sh b/reinstall.sh index 0be0603..12b3687 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -372,15 +372,28 @@ setos() { } setos_ubuntu() { + case "$releasever" in + 20.04) codename=focal ;; + 22.04) codename=jammy ;; + esac + if is_use_cloud_image; then # cloud image - # TODO: Minimal 镜像 if is_in_china; then ci_mirror=https://mirror.nju.edu.cn/ubuntu-cloud-images else ci_mirror=https://cloud-images.ubuntu.com fi + eval ${step}_img=$ci_mirror/releases/$releasever/release/ubuntu-$releasever-server-cloudimg-$basearch_alt.img + + # minimal 镜像内核风味是 kvm,后台 vnc 无显示 + # 没有 aarch64 minimal 镜像 + # TODO: 在 trans 里安装普通内核/云内核 + use_minimal_image=false + if $use_minimal_image && [ "$basearch" = x86_64 ]; then + eval ${step}_img=$ci_mirror/minimal/releases/$codename/release/ubuntu-$releasever-minimal-cloudimg-$basearch_alt.img + fi else # 传统安装 if is_in_china; then