mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 12:36:26 +08:00
core: 添加非 LTS 版本
This commit is contained in:
parent
e2fb8484be
commit
11035ffa63
2
.github/workflows/run_reinstall.yml
vendored
2
.github/workflows/run_reinstall.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
||||
|
||||
${{ matrix.command }} netboot.xyz
|
||||
${{ matrix.command }} dd --img=https://download.opensuse.org/tumbleweed/appliances/openSUSE-MicroOS.x86_64-SelfInstall.raw.xz
|
||||
${{ matrix.command }} windows --image-name='Windows 11 Pro'
|
||||
${{ matrix.command }} windows --image-name='Windows Server blah' --iso https://aka.ms/HCIReleaseImage
|
||||
|
||||
# 测试失败例子
|
||||
# ${{ matrix.command }} wrong-os
|
||||
|
22
README.en.md
22
README.en.md
@ -36,20 +36,20 @@ The system requirements for the target system are as follows:
|
||||
| <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.18, 3.19, 3.20, 3.21 | 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://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://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://canonical-subiquity.readthedocs-hosted.com/en/latest/_static/favicon.png" /> Ubuntu | 16.04 - 24.04, 24.10 | 512 MB \* | 2 GB |
|
||||
| <img width="16" height="16" src="https://img.alicdn.com/imgextra/i1/O1CN01oJnJZg1yK4RzI4Rx2_!!6000000006559-2-tps-118-118.png" /> Anolis | 7, 8, 23 | 512 MB \* | 5 GB |
|
||||
| <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RHEL <img width="16" height="16" src="https://almalinux.org/fav/favicon.ico" /> AlmaLinux <img width="16" height="16" src="https://rockylinux.org/favicon.png" /> Rocky <img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 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, Stream 23 | 512 MB \* | 5 GB |
|
||||
| <img width="16" height="16" src="https://www.centos.org/assets/icons/favicon.svg" /> CentOS | 9, 10 | 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 - 24.03, 24.09 | 512 MB \* | 5 GB |
|
||||
| <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | 15.6, Tumbleweed (Rolling) | 512 MB \* | 5 GB |
|
||||
| <img width="16" height="16" src="https://github.com/user-attachments/assets/99a542b6-6482-4086-addf-f192c06fef73" /> NixOS | 24.11 | 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://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) | 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) | 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 |
|
||||
|
||||
\* Indicates installation using cloud images, not traditional network installation.
|
||||
|
||||
@ -124,20 +124,20 @@ certutil -urlcache -f -split https://jihulab.com/bin456789/reinstall/-/raw/main/
|
||||
- After reinstallation, if you need to change the SSH port or switch to key-based login, make sure to also modify the files inside `/etc/ssh/sshd_config.d/`.
|
||||
|
||||
```bash
|
||||
bash reinstall.sh anolis 7|8
|
||||
bash reinstall.sh anolis 7|8|23
|
||||
opencloudos 8|9|23
|
||||
rocky 8|9
|
||||
redhat 8|9 --img='http://xxx.com/xxx.qcow2'
|
||||
oracle 8|9
|
||||
almalinux 8|9
|
||||
opencloudos 8|9
|
||||
centos 9|10
|
||||
fedora 40|41
|
||||
nixos 24.11
|
||||
debian 9|10|11|12
|
||||
opensuse 15.6|tumbleweed
|
||||
openeuler 20.03|22.03|24.03
|
||||
alpine 3.18|3.19|3.20|3.21
|
||||
ubuntu 16.04|18.04|20.04|22.04|24.04 [--minimal]
|
||||
openeuler 20.03|22.03|24.03|24.09
|
||||
ubuntu 16.04|18.04|20.04|22.04|24.04|24.10 [--minimal]
|
||||
kali
|
||||
arch
|
||||
gentoo
|
||||
@ -330,7 +330,9 @@ bash reinstall.sh windows \
|
||||
- <https://massgrave.dev/genuine-installation-media> (Recommended, iso sourced from official channels, updated monthly, includes the latest patches)
|
||||
- <https://www.microsoft.com/software-download/windows10> (Need to open it with a non-Windows User-Agent)
|
||||
- <https://www.microsoft.com/software-download/windows11>
|
||||
- <https://www.microsoft.com/software-download/windows11arm64>
|
||||
- <https://www.microsoft.com/software-download/windowsinsiderpreviewiso> (Preview)
|
||||
- <https://www.microsoft.com/software-download/windowsinsiderpreviewserver> (Preview)
|
||||
- <https://www.microsoft.com/evalcenter/download-windows-10-enterprise>
|
||||
- <https://www.microsoft.com/evalcenter/download-windows-11-enterprise>
|
||||
- <https://www.microsoft.com/evalcenter/download-windows-11-iot-enterprise-ltsc-eval>
|
||||
|
22
README.md
22
README.md
@ -36,20 +36,20 @@
|
||||
| <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.18, 3.19, 3.20, 3.21 | 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://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://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://canonical-subiquity.readthedocs-hosted.com/en/latest/_static/favicon.png" /> Ubuntu | 16.04 - 24.04, 24.10 | 512 MB \* | 2 GB |
|
||||
| <img width="16" height="16" src="https://img.alicdn.com/imgextra/i1/O1CN01oJnJZg1yK4RzI4Rx2_!!6000000006559-2-tps-118-118.png" /> Anolis | 7, 8, 23 | 512 MB \* | 5 GB |
|
||||
| <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RHEL <img width="16" height="16" src="https://almalinux.org/fav/favicon.ico" /> AlmaLinux <img width="16" height="16" src="https://rockylinux.org/favicon.png" /> Rocky <img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 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, Stream 23 | 512 MB \* | 5 GB |
|
||||
| <img width="16" height="16" src="https://www.centos.org/assets/icons/favicon.svg" /> CentOS | 9, 10 | 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 - 24.03, 24.09 | 512 MB \* | 5 GB |
|
||||
| <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | 15.6, Tumbleweed (滚动) | 512 MB \* | 5 GB |
|
||||
| <img width="16" height="16" src="https://github.com/user-attachments/assets/99a542b6-6482-4086-addf-f192c06fef73" /> NixOS | 24.11 | 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://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) | 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) | 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 |
|
||||
|
||||
\* 表示使用云镜像安装,非传统网络安装
|
||||
|
||||
@ -124,20 +124,20 @@ certutil -urlcache -f -split https://jihulab.com/bin456789/reinstall/-/raw/main/
|
||||
- 重装后如需修改 SSH 端口或者改成密钥登录,注意还要修改 `/etc/ssh/sshd_config.d/` 里面的文件
|
||||
|
||||
```bash
|
||||
bash reinstall.sh anolis 7|8
|
||||
bash reinstall.sh anolis 7|8|23
|
||||
opencloudos 8|9|23
|
||||
rocky 8|9
|
||||
redhat 8|9 --img='http://xxx.com/xxx.qcow2'
|
||||
oracle 8|9
|
||||
almalinux 8|9
|
||||
opencloudos 8|9
|
||||
centos 9|10
|
||||
fedora 40|41
|
||||
nixos 24.11
|
||||
debian 9|10|11|12
|
||||
opensuse 15.6|tumbleweed
|
||||
openeuler 20.03|22.03|24.03
|
||||
alpine 3.18|3.19|3.20|3.21
|
||||
ubuntu 16.04|18.04|20.04|22.04|24.04 [--minimal]
|
||||
openeuler 20.03|22.03|24.03|24.09
|
||||
ubuntu 16.04|18.04|20.04|22.04|24.04|24.10 [--minimal]
|
||||
kali
|
||||
arch
|
||||
gentoo
|
||||
@ -330,7 +330,9 @@ bash reinstall.sh windows \
|
||||
- <https://massgrave.dev/genuine-installation-media> (推荐,iso 来自官方,每月更新,包含最新补丁)
|
||||
- <https://www.microsoft.com/software-download/windows10> (需用非 Windows User-Agent 打开)
|
||||
- <https://www.microsoft.com/software-download/windows11>
|
||||
- <https://www.microsoft.com/software-download/windows11arm64>
|
||||
- <https://www.microsoft.com/software-download/windowsinsiderpreviewiso> (预览版)
|
||||
- <https://www.microsoft.com/software-download/windowsinsiderpreviewserver> (预览版)
|
||||
- <https://www.microsoft.com/evalcenter/download-windows-10-enterprise>
|
||||
- <https://www.microsoft.com/evalcenter/download-windows-11-enterprise>
|
||||
- <https://www.microsoft.com/evalcenter/download-windows-11-iot-enterprise-ltsc-eval>
|
||||
|
44
reinstall.sh
44
reinstall.sh
@ -44,20 +44,20 @@ usage_and_exit() {
|
||||
reinstall_____=' ./reinstall.sh'
|
||||
fi
|
||||
cat <<EOF
|
||||
Usage: $reinstall_____ anolis 7|8
|
||||
Usage: $reinstall_____ anolis 7|8|23
|
||||
opencloudos 8|9|23
|
||||
rocky 8|9
|
||||
redhat 8|9 --img='http://xxx.com/xxx.qcow2'
|
||||
oracle 8|9
|
||||
almalinux 8|9
|
||||
opencloudos 8|9
|
||||
centos 9|10
|
||||
fedora 40|41
|
||||
nixos 24.11
|
||||
debian 9|10|11|12
|
||||
opensuse 15.6|tumbleweed
|
||||
openeuler 20.03|22.03|24.03
|
||||
alpine 3.18|3.19|3.20|3.21
|
||||
ubuntu 16.04|18.04|20.04|22.04|24.04 [--minimal]
|
||||
openeuler 20.03|22.03|24.03|24.09
|
||||
ubuntu 16.04|18.04|20.04|22.04|24.04|24.10 [--minimal]
|
||||
kali
|
||||
arch
|
||||
gentoo
|
||||
@ -1159,6 +1159,7 @@ Continue?
|
||||
20.04) codename=focal ;;
|
||||
22.04) codename=jammy ;;
|
||||
24.04) codename=noble ;;
|
||||
24.10) codename=oracular ;; # non-lts
|
||||
esac
|
||||
|
||||
if is_use_cloud_image; then
|
||||
@ -1295,7 +1296,7 @@ Continue?
|
||||
eval ${step}_img=$mirror/experimental/$basearch_alt/openstack/gentoo-openstack-$basearch_alt-systemd-latest.qcow2
|
||||
else
|
||||
prefix=stage3-$basearch_alt-systemd
|
||||
dir=releases/$basearch_alt/autobuilds/current-$prefix
|
||||
dir=releases/$basearch_alt/autobuilds
|
||||
file=$(curl -L $mirror/$dir/latest-$prefix.txt | grep '.tar.xz' | awk '{print $1}')
|
||||
stage3=$mirror/$dir/$file
|
||||
test_url $stage3 'tar.xz'
|
||||
@ -1473,7 +1474,14 @@ Continue with DD?
|
||||
ver=-2211
|
||||
ci_image=$ci_mirror/$releasever/images/CentOS-$releasever-$basearch-GenericCloud$ver.qcow2c
|
||||
;;
|
||||
*) ci_image=$ci_mirror/$releasever-stream/$basearch/images/CentOS-Stream-GenericCloud-$releasever-latest.$basearch.qcow2 ;;
|
||||
*)
|
||||
# 有 bios 和 efi 镜像
|
||||
# https://cloud.centos.org/centos/10-stream/x86_64/images/CentOS-Stream-GenericCloud-10-latest.x86_64.qcow2
|
||||
# https://cloud.centos.org/centos/10-stream/x86_64/images/CentOS-Stream-GenericCloud-x86_64-10-latest.x86_64.qcow2
|
||||
[ "$basearch" = x86_64 ] &&
|
||||
ci_image=$ci_mirror/$releasever-stream/$basearch/images/CentOS-Stream-GenericCloud-x86_64-$releasever-latest.$basearch.qcow2 ||
|
||||
ci_image=$ci_mirror/$releasever-stream/$basearch/images/CentOS-Stream-GenericCloud-$releasever-latest.$basearch.qcow2
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
almalinux) ci_image=$ci_mirror/AlmaLinux-$releasever-GenericCloud-latest.$basearch.qcow2 ;;
|
||||
@ -1560,7 +1568,13 @@ Continue with DD?
|
||||
|
||||
setos_opencloudos() {
|
||||
# https://mirrors.opencloudos.tech 不支持 ipv6
|
||||
mirror=https://mirrors.cloud.tencent.com/opencloudos
|
||||
# https://mirrors.cloud.tencent.com 没有 stream
|
||||
if [ "$releasever" -ge 23 ]; then
|
||||
mirror=https://mirrors.opencloudos.tech/opencloudos-stream/releases
|
||||
else
|
||||
mirror=https://mirrors.cloud.tencent.com/opencloudos
|
||||
fi
|
||||
|
||||
if is_use_cloud_image; then
|
||||
# ci
|
||||
dir=$releasever/images/$basearch
|
||||
@ -1572,13 +1586,15 @@ Continue with DD?
|
||||
fi
|
||||
}
|
||||
|
||||
# anolis 23 不是 lts,而且 cloud-init 好像有问题
|
||||
setos_anolis() {
|
||||
mirror=https://mirrors.openanolis.cn/anolis
|
||||
if is_use_cloud_image; then
|
||||
# ci
|
||||
dir=$releasever/isos/GA/$basearch
|
||||
file=$(curl -L $mirror/$dir/ | grep -oP 'AnolisOS.*?-ANCK\.qcow2' |
|
||||
[ "$releasever" -ge 23 ] &&
|
||||
filename='AnolisOS.*?\.qcow2' ||
|
||||
filename='AnolisOS.*?-ANCK\.qcow2'
|
||||
file=$(curl -L $mirror/$dir/ | grep -oP "$filename" |
|
||||
sort -uV | tail -1 | grep .)
|
||||
eval ${step}_img=$mirror/$dir/$file
|
||||
else
|
||||
@ -1594,7 +1610,7 @@ Continue with DD?
|
||||
fi
|
||||
if is_use_cloud_image; then
|
||||
# ci
|
||||
name=$(curl -L "$mirror/" | grep -oE "openEuler-$releasever-LTS(-SP[0-9])?" |
|
||||
name=$(curl -L "$mirror/" | grep -oE "openEuler-$releasever(-LTS)?(-SP[0-9])?" |
|
||||
sort -uV | tail -1 | grep .)
|
||||
eval ${step}_img=$mirror/$name/virtual_machine_img/$basearch/$name-$basearch.qcow2.xz
|
||||
else
|
||||
@ -1649,19 +1665,19 @@ verify_os_name() {
|
||||
# 不要删除 centos 7
|
||||
for os in \
|
||||
'centos 7|9|10' \
|
||||
'anolis 7|8' \
|
||||
'anolis 7|8|23' \
|
||||
'opencloudos 8|9|23' \
|
||||
'almalinux 8|9' \
|
||||
'rocky 8|9' \
|
||||
'redhat 8|9' \
|
||||
'opencloudos 8|9' \
|
||||
'oracle 8|9' \
|
||||
'fedora 40|41' \
|
||||
'nixos 24.11' \
|
||||
'debian 9|10|11|12' \
|
||||
'opensuse 15.6|tumbleweed' \
|
||||
'openeuler 20.03|22.03|24.03' \
|
||||
'alpine 3.18|3.19|3.20|3.21' \
|
||||
'ubuntu 16.04|18.04|20.04|22.04|24.04' \
|
||||
'openeuler 20.03|22.03|24.03|24.09' \
|
||||
'ubuntu 16.04|18.04|20.04|22.04|24.04|24.10' \
|
||||
'kali' \
|
||||
'arch' \
|
||||
'gentoo' \
|
||||
|
2
trans.sh
2
trans.sh
@ -5368,7 +5368,7 @@ sync_time() {
|
||||
ntpd -d -n -q -p "$ntp_server"
|
||||
;;
|
||||
http)
|
||||
url=$(grep -m1 ^http /etc/apk/repositories)
|
||||
url="$(grep -m1 ^http /etc/apk/repositories)/$(uname -m)/APKINDEX.tar.gz"
|
||||
# 可能有多行,取第一行
|
||||
date_header=$(wget -S --no-check-certificate --spider "$url" 2>&1 | grep -m1 '^ Date:')
|
||||
# gnu date 不支持 -D
|
||||
|
Loading…
x
Reference in New Issue
Block a user