core: alma 更改为 almalinux

This commit is contained in:
bin456789 2024-11-26 22:09:05 +08:00
parent 0693dbbc64
commit d3b40f3393
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B
5 changed files with 71 additions and 71 deletions

View File

@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: | - run: |
${{ matrix.command }} centos ${{ matrix.command }} centos
${{ matrix.command }} alma-8 ${{ matrix.command }} almalinux 8
${{ matrix.command }} rocky 9 ${{ matrix.command }} rocky 9
${{ matrix.command }} fedora ${{ matrix.command }} fedora
${{ matrix.command }} ubuntu ${{ matrix.command }} ubuntu

View File

@ -30,26 +30,26 @@ The original system can be any system listed in the table.
The system requirements for the target system are as follows: The system requirements for the target system are as follows:
| Target System | Version | Memory | Disk | | Target System | Version | Memory | Disk |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ---------------------- | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ---------------------- |
| <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.17, 3.18, 3.19, 3.20 | 256 MB | 1 GB | | <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.17, 3.18, 3.19, 3.20 | 256 MB | 1 GB |
| <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ | | <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ |
| <img width="16" height="16" src="https://github.com/bin456789/reinstall/assets/7548515/f74b3d5b-085f-4df3-bcc9-8a9bd80bb16d" /> Kali | Rolling | 256 MB | 1 ~ 1.5 GB ^ | | <img width="16" height="16" src="https://github.com/bin456789/reinstall/assets/7548515/f74b3d5b-085f-4df3-bcc9-8a9bd80bb16d" /> Kali | Rolling | 256 MB | 1 ~ 1.5 GB ^ |
| <img width="16" height="16" src="https://canonical-subiquity.readthedocs-hosted.com/en/latest/_static/favicon.png" /> Ubuntu | 16.04, 18.04, 20.04, 22.04, 24.04 | 512 MB \* | 2 GB | | <img width="16" height="16" src="https://canonical-subiquity.readthedocs-hosted.com/en/latest/_static/favicon.png" /> Ubuntu | 16.04, 18.04, 20.04, 22.04, 24.04 | 512 MB \* | 2 GB |
| <img width="16" height="16" src="https://www.centos.org/assets/img/favicon.png" /> CentOS | 9 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.centos.org/assets/img/favicon.png" /> CentOS | 9 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://img.alicdn.com/imgextra/i1/O1CN01oJnJZg1yK4RzI4Rx2_!!6000000006559-2-tps-118-118.png" /> Anolis | 7, 8 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://img.alicdn.com/imgextra/i1/O1CN01oJnJZg1yK4RzI4Rx2_!!6000000006559-2-tps-118-118.png" /> Anolis | 7, 8 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RedHat &nbsp; <img width="16" height="16" src="https://almalinux.org/fav/favicon.ico" /> Alma &nbsp; <img width="16" height="16" src="https://rockylinux.org/favicon.png" /> Rocky | 8, 9 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RedHat &nbsp; <img width="16" height="16" src="https://almalinux.org/fav/favicon.ico" /> AlmaLinux &nbsp; <img width="16" height="16" src="https://rockylinux.org/favicon.png" /> Rocky | 8, 9 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://opencloudos.org/qq.ico" /> OpenCloudOS | 8, 9 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://opencloudos.org/qq.ico" /> OpenCloudOS | 8, 9 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 7, 8, 9 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 7, 8, 9 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://fedoraproject.org/favicon.ico" /> Fedora | 40, 41 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://fedoraproject.org/favicon.ico" /> Fedora | 40, 41 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03, 22.03, 24.03 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03, 22.03, 24.03 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | 15.5, 15.6, Tumbleweed (Rolling) | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | 15.5, 15.6, Tumbleweed (Rolling) | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://nixos.org/_astro/flake-blue.Bf2X2kC4_Z1yqDoT.svg" /> NixOS | 24.05 | 512 MB | 5 GB | | <img width="16" height="16" src="https://nixos.org/_astro/flake-blue.Bf2X2kC4_Z1yqDoT.svg" /> NixOS | 24.05 | 512 MB | 5 GB |
| <img width="16" height="16" src="https://archlinux.org/static/favicon.png" /> Arch | Rolling | 512 MB | 5 GB | | <img width="16" height="16" src="https://archlinux.org/static/favicon.png" /> Arch | Rolling | 512 MB | 5 GB |
| <img width="16" height="16" src="https://www.gentoo.org/assets/img/logo/gentoo-g.png" /> Gentoo | Rolling | 512 MB | 5 GB | | <img width="16" height="16" src="https://www.gentoo.org/assets/img/logo/gentoo-g.png" /> Gentoo | Rolling | 512 MB | 5 GB |
| <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (DD) | Any | 512 MB | Depending on the image | | <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (DD) | Any | 512 MB | Depending on the image |
| <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (ISO) | Vista, 7, 8.x (Server 2008 ~ 2012 R2) | 512 MB | 25 GB | | <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (ISO) | Vista, 7, 8.x (Server 2008 ~ 2012 R2) | 512 MB | 25 GB |
| <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (ISO) | 10, 11 (Server 2016 ~ 2025) | 1 GB | 25 GB | | <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (ISO) | 10, 11 (Server 2016 ~ 2025) | 1 GB | 25 GB |
\* Indicates installation using cloud images, not traditional network installation. \* Indicates installation using cloud images, not traditional network installation.
@ -126,7 +126,7 @@ certutil -urlcache -f -split https://www.ghproxy.cc/https://raw.githubuserconten
```bash ```bash
bash reinstall.sh centos 9 bash reinstall.sh centos 9
anolis 7|8 anolis 7|8
alma 8|9 almalinux 8|9
rocky 8|9 rocky 8|9
redhat 8|9 --img='http://xxx.com/xxx.qcow2' redhat 8|9 --img='http://xxx.com/xxx.qcow2'
opencloudos 8|9 opencloudos 8|9
@ -168,7 +168,7 @@ Install Debian using a cloud image
bash reinstall.sh debian --ci bash reinstall.sh debian --ci
``` ```
Install CentOS, Alma, Rocky, Fedora using ISO Install CentOS, AlmaLinux, Rocky, Fedora using ISO
- Only supports machines with more than 2G of memory and dynamic IP. - Only supports machines with more than 2G of memory and dynamic IP.
- Password is `123@@@`, and the SSH port is `22`; modifying them using parameters is not supported. - Password is `123@@@`, and the SSH port is `22`; modifying them using parameters is not supported.

View File

@ -30,26 +30,26 @@
目标系统的配置要求如下: 目标系统的配置要求如下:
| 目标系统 | 版本 | 内存 | 硬盘 | | 目标系统 | 版本 | 内存 | 硬盘 |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ------------ | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ------------ |
| <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.17, 3.18, 3.19, 3.20 | 256 MB | 1 GB | | <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.17, 3.18, 3.19, 3.20 | 256 MB | 1 GB |
| <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ | | <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ |
| <img width="16" height="16" src="https://github.com/bin456789/reinstall/assets/7548515/f74b3d5b-085f-4df3-bcc9-8a9bd80bb16d" /> Kali | 滚动 | 256 MB | 1 ~ 1.5 GB ^ | | <img width="16" height="16" src="https://github.com/bin456789/reinstall/assets/7548515/f74b3d5b-085f-4df3-bcc9-8a9bd80bb16d" /> Kali | 滚动 | 256 MB | 1 ~ 1.5 GB ^ |
| <img width="16" height="16" src="https://canonical-subiquity.readthedocs-hosted.com/en/latest/_static/favicon.png" /> Ubuntu | 16.04, 18.04, 20.04, 22.04, 24.04 | 512 MB \* | 2 GB | | <img width="16" height="16" src="https://canonical-subiquity.readthedocs-hosted.com/en/latest/_static/favicon.png" /> Ubuntu | 16.04, 18.04, 20.04, 22.04, 24.04 | 512 MB \* | 2 GB |
| <img width="16" height="16" src="https://www.centos.org/assets/img/favicon.png" /> CentOS | 9 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.centos.org/assets/img/favicon.png" /> CentOS | 9 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://img.alicdn.com/imgextra/i1/O1CN01oJnJZg1yK4RzI4Rx2_!!6000000006559-2-tps-118-118.png" /> Anolis | 7, 8 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://img.alicdn.com/imgextra/i1/O1CN01oJnJZg1yK4RzI4Rx2_!!6000000006559-2-tps-118-118.png" /> Anolis | 7, 8 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RedHat &nbsp; <img width="16" height="16" src="https://almalinux.org/fav/favicon.ico" /> Alma &nbsp; <img width="16" height="16" src="https://rockylinux.org/favicon.png" /> Rocky | 8, 9 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RedHat &nbsp; <img width="16" height="16" src="https://almalinux.org/fav/favicon.ico" /> AlmaLinux &nbsp; <img width="16" height="16" src="https://rockylinux.org/favicon.png" /> Rocky | 8, 9 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://opencloudos.org/qq.ico" /> OpenCloudOS | 8, 9 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://opencloudos.org/qq.ico" /> OpenCloudOS | 8, 9 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 7, 8, 9 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 7, 8, 9 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://fedoraproject.org/favicon.ico" /> Fedora | 40, 41 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://fedoraproject.org/favicon.ico" /> Fedora | 40, 41 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03, 22.03, 24.03 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03, 22.03, 24.03 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | 15.5, 15.6, Tumbleweed (滚动) | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | 15.5, 15.6, Tumbleweed (滚动) | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://nixos.org/_astro/flake-blue.Bf2X2kC4_Z1yqDoT.svg" /> NixOS | 24.05 | 512 MB | 5 GB | | <img width="16" height="16" src="https://nixos.org/_astro/flake-blue.Bf2X2kC4_Z1yqDoT.svg" /> NixOS | 24.05 | 512 MB | 5 GB |
| <img width="16" height="16" src="https://archlinux.org/static/favicon.png" /> Arch | 滚动 | 512 MB | 5 GB | | <img width="16" height="16" src="https://archlinux.org/static/favicon.png" /> Arch | 滚动 | 512 MB | 5 GB |
| <img width="16" height="16" src="https://www.gentoo.org/assets/img/logo/gentoo-g.png" /> Gentoo | 滚动 | 512 MB | 5 GB | | <img width="16" height="16" src="https://www.gentoo.org/assets/img/logo/gentoo-g.png" /> Gentoo | 滚动 | 512 MB | 5 GB |
| <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (DD) | 任何 | 512 MB | 取决于镜像 | | <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (DD) | 任何 | 512 MB | 取决于镜像 |
| <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (ISO) | Vista, 7, 8.x (Server 2008 ~ 2012 R2) | 512 MB | 25 GB | | <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (ISO) | Vista, 7, 8.x (Server 2008 ~ 2012 R2) | 512 MB | 25 GB |
| <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (ISO) | 10, 11 (Server 2016 ~ 2025) | 1 GB | 25 GB | | <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows (ISO) | 10, 11 (Server 2016 ~ 2025) | 1 GB | 25 GB |
\* 表示使用云镜像安装,非传统网络安装 \* 表示使用云镜像安装,非传统网络安装
@ -126,7 +126,7 @@ certutil -urlcache -f -split https://www.ghproxy.cc/https://raw.githubuserconten
```bash ```bash
bash reinstall.sh centos 9 bash reinstall.sh centos 9
anolis 7|8 anolis 7|8
alma 8|9 almalinux 8|9
rocky 8|9 rocky 8|9
redhat 8|9 --img='http://xxx.com/xxx.qcow2' redhat 8|9 --img='http://xxx.com/xxx.qcow2'
opencloudos 8|9 opencloudos 8|9
@ -168,7 +168,7 @@ bash reinstall.sh centos 9
bash reinstall.sh debian --ci bash reinstall.sh debian --ci
``` ```
ISO 安装 CentOS, Alma, Rocky, Fedora ISO 安装 CentOS, AlmaLinux, Rocky, Fedora
- 仅支持内存大于 2G 且为动态 IP 的机器 - 仅支持内存大于 2G 且为动态 IP 的机器
- 密码 `123@@@`SSH 端口 `22`,不支持用参数修改 - 密码 `123@@@`SSH 端口 `22`,不支持用参数修改

View File

@ -44,7 +44,7 @@ usage_and_exit() {
cat <<EOF cat <<EOF
Usage: $reinstall_____ centos 9 Usage: $reinstall_____ centos 9
anolis 7|8 anolis 7|8
alma 8|9 almalinux 8|9
rocky 8|9 rocky 8|9
redhat 8|9 --img='http://xxx.com/xxx.qcow2' redhat 8|9 --img='http://xxx.com/xxx.qcow2'
opencloudos 8|9 opencloudos 8|9
@ -1363,20 +1363,20 @@ Continue with DD?
eval "${step}_img_type_warp='$img_type_warp'" eval "${step}_img_type_warp='$img_type_warp'"
} }
setos_centos_alma_rocky_fedora() { setos_centos_almalinux_rocky_fedora() {
if is_use_cloud_image; then if is_use_cloud_image; then
# ci # ci
if is_in_china; then if is_in_china; then
case $distro in case $distro in
"centos") ci_mirror="https://mirror.nju.edu.cn/centos-cloud/centos" ;; "centos") ci_mirror="https://mirror.nju.edu.cn/centos-cloud/centos" ;;
"alma") ci_mirror="https://mirror.nju.edu.cn/almalinux/$releasever/cloud/$basearch/images" ;; "almalinux") ci_mirror="https://mirror.nju.edu.cn/almalinux/$releasever/cloud/$basearch/images" ;;
"rocky") ci_mirror="https://mirror.nju.edu.cn/rocky/$releasever/images/$basearch" ;; "rocky") ci_mirror="https://mirror.nju.edu.cn/rocky/$releasever/images/$basearch" ;;
"fedora") ci_mirror="https://mirror.nju.edu.cn/fedora/releases/$releasever/Cloud/$basearch/images" ;; "fedora") ci_mirror="https://mirror.nju.edu.cn/fedora/releases/$releasever/Cloud/$basearch/images" ;;
esac esac
else else
case $distro in case $distro in
"centos") ci_mirror="https://cloud.centos.org/centos" ;; "centos") ci_mirror="https://cloud.centos.org/centos" ;;
"alma") ci_mirror="https://repo.almalinux.org/almalinux/$releasever/cloud/$basearch/images" ;; "almalinux") ci_mirror="https://repo.almalinux.org/almalinux/$releasever/cloud/$basearch/images" ;;
"rocky") ci_mirror="https://download.rockylinux.org/pub/rocky/$releasever/images/$basearch" ;; "rocky") ci_mirror="https://download.rockylinux.org/pub/rocky/$releasever/images/$basearch" ;;
"fedora") ci_mirror="https://dl.fedoraproject.org/pub/fedora/linux/releases/$releasever/Cloud/$basearch/images" ;; "fedora") ci_mirror="https://dl.fedoraproject.org/pub/fedora/linux/releases/$releasever/Cloud/$basearch/images" ;;
esac esac
@ -1392,7 +1392,7 @@ Continue with DD?
"9") ci_image=$ci_mirror/$releasever-stream/$basearch/images/CentOS-Stream-GenericCloud-$releasever-latest.$basearch.qcow2 ;; "9") ci_image=$ci_mirror/$releasever-stream/$basearch/images/CentOS-Stream-GenericCloud-$releasever-latest.$basearch.qcow2 ;;
esac esac
;; ;;
"alma") ci_image=$ci_mirror/AlmaLinux-$releasever-GenericCloud-latest.$basearch.qcow2 ;; "almalinux") ci_image=$ci_mirror/AlmaLinux-$releasever-GenericCloud-latest.$basearch.qcow2 ;;
"rocky") ci_image=$ci_mirror/Rocky-$releasever-GenericCloud-Base.latest.$basearch.qcow2 ;; "rocky") ci_image=$ci_mirror/Rocky-$releasever-GenericCloud-Base.latest.$basearch.qcow2 ;;
"fedora") "fedora")
# Fedora-Cloud-Base-39-1.5.x86_64.qcow2 # Fedora-Cloud-Base-39-1.5.x86_64.qcow2
@ -1413,12 +1413,12 @@ Continue with DD?
# 传统安装 # 传统安装
case $distro in case $distro in
"centos") mirrorlist="https://mirrors.centos.org/mirrorlist?repo=centos-baseos-$releasever-stream&arch=$basearch" ;; "centos") mirrorlist="https://mirrors.centos.org/mirrorlist?repo=centos-baseos-$releasever-stream&arch=$basearch" ;;
"alma") mirrorlist="https://mirrors.almalinux.org/mirrorlist/$releasever/baseos" ;; "almalinux") mirrorlist="https://mirrors.almalinux.org/mirrorlist/$releasever/baseos" ;;
"rocky") mirrorlist="https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=BaseOS-$releasever" ;; "rocky") mirrorlist="https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=BaseOS-$releasever" ;;
"fedora") mirrorlist="https://mirrors.fedoraproject.org/mirrorlist?arch=$basearch&repo=fedora-$releasever" ;; "fedora") mirrorlist="https://mirrors.fedoraproject.org/mirrorlist?arch=$basearch&repo=fedora-$releasever" ;;
esac esac
# rocky/centos9 需要删除第一行注释, alma 需要替换$basearch # rocky/centos9 需要删除第一行注释, almalinux 需要替换$basearch
for cur_mirror in $(curl -L $mirrorlist | sed "/^#/d" | sed "s,\$basearch,$basearch,"); do for cur_mirror in $(curl -L $mirrorlist | sed "/^#/d" | sed "s,\$basearch,$basearch,"); do
host=$(get_host_by_url $cur_mirror) host=$(get_host_by_url $cur_mirror)
if is_host_has_ipv4_and_ipv6 $host && if is_host_has_ipv4_and_ipv6 $host &&
@ -1516,7 +1516,7 @@ Continue with DD?
eval ${step}_releasever=$releasever eval ${step}_releasever=$releasever
case "$distro" in case "$distro" in
centos | alma | rocky | fedora) setos_centos_alma_rocky_fedora ;; centos | almalinux | rocky | fedora) setos_centos_almalinux_rocky_fedora ;;
*) setos_$distro ;; *) setos_$distro ;;
esac esac
@ -1538,7 +1538,7 @@ is_distro_like_redhat() {
else else
_distro=$distro _distro=$distro
fi fi
[ "$_distro" = redhat ] || [ "$_distro" = centos ] || [ "$_distro" = alma ] || [ "$_distro" = rocky ] || [ "$_distro" = fedora ] || [ "$_distro" = oracle ] [ "$_distro" = redhat ] || [ "$_distro" = centos ] || [ "$_distro" = almalinux ] || [ "$_distro" = rocky ] || [ "$_distro" = fedora ] || [ "$_distro" = oracle ]
} }
is_distro_like_debian() { is_distro_like_debian() {
@ -1560,7 +1560,7 @@ verify_os_name() {
for os in \ for os in \
'centos 7|9' \ 'centos 7|9' \
'anolis 7|8' \ 'anolis 7|8' \
'alma 8|9' \ 'almalinux 8|9' \
'rocky 8|9' \ 'rocky 8|9' \
'redhat 8|9' \ 'redhat 8|9' \
'opencloudos 8|9' \ 'opencloudos 8|9' \
@ -1713,10 +1713,10 @@ install_pkg() {
esac esac
} }
# 系统 package名称 repo名称 # 系统 package名称 repo名称
# centos/alma/rocky/fedora/anolis epel-release epel # centos/almalinux/rocky/fedora/anolis epel-release epel
# oracle linux oracle-epel-release ol9_developer_EPEL # oracle linux oracle-epel-release ol9_developer_EPEL
# opencloudos epol-release EPOL # opencloudos epol-release EPOL
check_is_need_epel() { check_is_need_epel() {
is_need_epel() { is_need_epel() {
case "$pkg" in case "$pkg" in
@ -1825,7 +1825,7 @@ check_ram() {
netboot.xyz) echo 0 ;; netboot.xyz) echo 0 ;;
alpine | debian | kali | dd) echo 256 ;; alpine | debian | kali | dd) echo 256 ;;
arch | gentoo | nixos | windows) echo 512 ;; arch | gentoo | nixos | windows) echo 512 ;;
redhat | centos | alma | rocky | fedora | oracle | ubuntu | anolis | opencloudos | openeuler) echo 1024 ;; redhat | centos | almalinux | rocky | fedora | oracle | ubuntu | anolis | opencloudos | openeuler) echo 1024 ;;
opensuse) echo -1 ;; # 没有安装模式 opensuse) echo -1 ;; # 没有安装模式
esac esac
) )
@ -1840,7 +1840,7 @@ check_ram() {
has_cloud_image=$( has_cloud_image=$(
case "$distro" in case "$distro" in
redhat | centos | alma | rocky | oracle | fedora | debian | ubuntu | opensuse | anolis | openeuler) echo true ;; redhat | centos | almalinux | rocky | oracle | fedora | debian | ubuntu | opensuse | anolis | openeuler) echo true ;;
netboot.xyz | alpine | dd | arch | gentoo | nixos | kali | windows) echo false ;; netboot.xyz | alpine | dd | arch | gentoo | nixos | kali | windows) echo false ;;
esac esac
) )
@ -3532,7 +3532,7 @@ dd | windows | netboot.xyz | kali | alpine | arch | gentoo | nixos)
oracle | opensuse | anolis | opencloudos | openeuler) oracle | opensuse | anolis | opencloudos | openeuler)
cloud_image=1 cloud_image=1
;; ;;
redhat | centos | alma | rocky | fedora | ubuntu) redhat | centos | almalinux | rocky | fedora | ubuntu)
if is_force_use_installer; then if is_force_use_installer; then
unset cloud_image unset cloud_image
else else

View File

@ -1961,7 +1961,7 @@ create_part() {
elif is_use_cloud_image; then elif is_use_cloud_image; then
installer_part_size="$(get_cloud_image_part_size)" installer_part_size="$(get_cloud_image_part_size)"
# 这几个系统不使用dd而是复制文件 # 这几个系统不使用dd而是复制文件
if [ "$distro" = centos ] || [ "$distro" = alma ] || [ "$distro" = rocky ] || if [ "$distro" = centos ] || [ "$distro" = almalinux ] || [ "$distro" = rocky ] ||
[ "$distro" = oracle ] || [ "$distro" = redhat ] || [ "$distro" = oracle ] || [ "$distro" = redhat ] ||
[ "$distro" = anolis ] || [ "$distro" = opencloudos ] || [ "$distro" = openeuler ] || [ "$distro" = anolis ] || [ "$distro" = opencloudos ] || [ "$distro" = openeuler ] ||
[ "$distro" = ubuntu ]; then [ "$distro" = ubuntu ]; then
@ -2474,7 +2474,7 @@ is_need_ucode_firmware() {
get_ucode_firmware_pkgs() { get_ucode_firmware_pkgs() {
case "$distro" in case "$distro" in
centos | alma | rocky | oracle | redhat | anolis | opencloudos | openeuler) os=elol ;; centos | almalinux | rocky | oracle | redhat | anolis | opencloudos | openeuler) os=elol ;;
*) os=$distro ;; *) os=$distro ;;
esac esac
@ -3038,7 +3038,7 @@ get_os_fs() {
case "$distro" in case "$distro" in
ubuntu) echo ext4 ;; ubuntu) echo ext4 ;;
anolis | openeuler) echo ext4 ;; anolis | openeuler) echo ext4 ;;
centos | alma | rocky | oracle | redhat) echo xfs ;; centos | almalinux | rocky | oracle | redhat) echo xfs ;;
opencloudos) echo xfs ;; opencloudos) echo xfs ;;
esac esac
} }
@ -3173,7 +3173,7 @@ install_qcow_by_copy() {
connect_qcow connect_qcow
# 镜像分区格式 # 镜像分区格式
# centos/rocky/alma/rhel: xfs # centos/rocky/almalinux/rhel: xfs
# oracle x86_64: lvm + xfs # oracle x86_64: lvm + xfs
# oracle aarch64 cloud: xfs # oracle aarch64 cloud: xfs
@ -3191,7 +3191,7 @@ install_qcow_by_copy() {
os_part=$(lsblk /dev/nbd0p* --sort SIZE -no NAME,FSTYPE | grep -E 'ext4|xfs' | tail -1 | awk '{print $1}') os_part=$(lsblk /dev/nbd0p* --sort SIZE -no NAME,FSTYPE | grep -E 'ext4|xfs' | tail -1 | awk '{print $1}')
efi_part=$(lsblk /dev/nbd0p* --sort SIZE -no NAME,PARTTYPE | grep -i "$EFI_UUID" | awk '{print $1}') efi_part=$(lsblk /dev/nbd0p* --sort SIZE -no NAME,PARTTYPE | grep -i "$EFI_UUID" | awk '{print $1}')
# 排除前两个,再选择最大分区 # 排除前两个,再选择最大分区
# alma 9 boot 分区的类型不是规定的 uuid # almalinux9 boot 分区的类型不是规定的 uuid
# openeuler boot 分区是 fat 格式 # openeuler boot 分区是 fat 格式
boot_part=$(lsblk /dev/nbd0p* --sort SIZE -no NAME,FSTYPE | grep -E 'ext4|xfs|fat' | awk '{print $1}' | boot_part=$(lsblk /dev/nbd0p* --sort SIZE -no NAME,FSTYPE | grep -E 'ext4|xfs|fat' | awk '{print $1}' |
grep -vx "$os_part" | grep -vx "$efi_part" | tail -1 | awk '{print $1}') grep -vx "$os_part" | grep -vx "$efi_part" | tail -1 | awk '{print $1}')
@ -3361,7 +3361,7 @@ install_qcow_by_copy() {
EOF EOF
# fstab 删除多余分区 # fstab 删除多余分区
# alma/rocky 镜像有 boot 分区 # almalinux/rocky 镜像有 boot 分区
# oracle 镜像有 swap 分区 # oracle 镜像有 swap 分区
sed -i '/[[:space:]]\/boot[[:space:]]/d' /os/etc/fstab sed -i '/[[:space:]]\/boot[[:space:]]/d' /os/etc/fstab
sed -i '/[[:space:]]swap[[:space:]]/d' /os/etc/fstab sed -i '/[[:space:]]swap[[:space:]]/d' /os/etc/fstab
@ -3428,7 +3428,7 @@ EOF
fi fi
# blscfg 启动项 # blscfg 启动项
# rocky/alma镜像是独立的boot分区但我们不是 # rocky/almalinux镜像是独立的boot分区但我们不是
# 因此要添加boot目录 # 因此要添加boot目录
if ls /os/boot/loader/entries/*.conf 2>/dev/null && if ls /os/boot/loader/entries/*.conf 2>/dev/null &&
! grep -q 'initrd /boot/' /os/boot/loader/entries/*.conf; then ! grep -q 'initrd /boot/' /os/boot/loader/entries/*.conf; then
@ -5041,7 +5041,7 @@ trans() {
create_part create_part
download_qcow download_qcow
case "$distro" in case "$distro" in
centos | alma | rocky | oracle | redhat | anolis | opencloudos | openeuler) centos | almalinux | rocky | oracle | redhat | anolis | opencloudos | openeuler)
# 这几个系统云镜像系统盘是8~9g xfs而我们的目标是能在5g硬盘上运行因此改成复制系统文件 # 这几个系统云镜像系统盘是8~9g xfs而我们的目标是能在5g硬盘上运行因此改成复制系统文件
install_qcow_by_copy install_qcow_by_copy
;; ;;
@ -5096,7 +5096,7 @@ trans() {
create_part create_part
mount_part_for_iso_installer mount_part_for_iso_installer
case "$distro" in case "$distro" in
centos | alma | rocky | fedora | ubuntu | redhat) install_redhat_ubuntu ;; centos | almalinux | rocky | fedora | ubuntu | redhat) install_redhat_ubuntu ;;
windows) install_windows ;; windows) install_windows ;;
esac esac
;; ;;