core: 不重要的更新

This commit is contained in:
bin456789
2026-09-06 12:12:28 +08:00
parent 6ec91dddb9
commit 6a0a2c9b3c
5 changed files with 371 additions and 105 deletions
+133 -28
View File
@@ -7,12 +7,14 @@
[![Lines of Code](https://aschey.tech/tokei/github/bin456789/reinstall?category=code&label=Lines%20of%20Code&style=flat-square)](https://github.com/aschey/vercel-tokei)
<!-- [![Lines of Code](https://tokei.rs/b1/github/bin456789/reinstall?category=code&label=Lines%20of%20Code&style=flat-square)](https://github.com/XAMPPRocky/tokei_rs) -->
One-Click system reinstallation script for VPS [中文](README.md)
<a href="https://trendshift.io/repositories/14732"><img src="https://trendshift.io/api/badge/repositories/14732" alt="bin456789%2Freinstall | Trendshift" width="250" height="55"/></a>
One-Click OS reinstallation script for VPS [中文](README.md)
## Introduction
- One-click reinstallation to Linux: Supports 19 common distributions.
- One-click reinstallation to Windows: Uses the official original ISO instead of custom images. The script can automatically fetch the ISO link and installs public cloud drivers like `VirtIO`.
- One-click reinstallation to Linux: Supports 20 common distributions.
- One-click reinstallation to Windows: Uses the official original ISO instead of custom images. Supports automatically fetch the ISO link and installs public cloud drivers like `VirtIO`.
- Supports reinstallation in any direction, i.e., `Linux to Linux`, `Linux to Windows`, `Windows to Windows`, `Windows to Linux`
- Automatically configures IP and intelligently sets it as static or dynamic. Supports `/32`, `/128`, `gateway outside subnet`, `IPv6 only`, `IPv4/IPv6 on different NIC`
- Specially optimized for low-spec servers, requires less memory than the official netboot
@@ -49,7 +51,7 @@ The system requirements for the target system are as follows:
| System | Version | Memory | Disk |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ---------------- |
| <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.21, 3.22, 3.23, 3.24 | 256 MB | 1 GB |
| <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9, 10, 11, 12, 13 | 256 MB | 1 ~ 1.5 GB ^ |
| <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9 ELTS - 11 ELTS, 12, 13 | 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://documentation.ubuntu.com/server/_static/favicon.png" /> Ubuntu | 18.04 LTS - 26.04 LTS | 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 |
@@ -60,10 +62,10 @@ The system requirements for the target system are as follows:
| <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03 LTS - 24.03 LTS | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | Leap 16.0, Tumbleweed (Rolling) | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://nixos.org/favicon.svg" /> NixOS | 26.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 Linux / Arch Linux ARM | 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://aosc.io/distros/aosc-os.svg" /> AOSC OS | Rolling | 512 MB | 5 GB |
| <img width="16" height="16" src="https://www.fnnas.com/favicon.ico" /> fnOS &nbsp;<img width="16" height="16" src="https://fygonas.com/favicon.ico" /> FygoOS | 1 | 512 MB | 8 GB |
| <img width="16" height="16" src="https://www.fnnas.com/favicon.ico" /> fnOS &nbsp;<img width="16" height="16" src="https://fygonas.com/favicon.ico" /> FygoOS | 1 | 512 MB | 10 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 | Depends on 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 |
@@ -154,6 +156,7 @@ certutil -urlcache -f -split https://cnb.cool/bin456789/reinstall/-/git/raw/main
- When installing Red Hat, you must provide the `qcow2` image link obtained from <https://access.redhat.com/downloads/content/rhel>. You can also install `qcow2` of other RHEL-based OS, such as `Alibaba Cloud Linux` and `TencentOS Server`.
- 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/`.
- To ensure a faster reinstall, the new system will not be updated during the process. Please update the system manually after reinstallation.
- The username, password, and key configured during the installation of fnOS/FygoOS are only used to log in via SSH to view logs during installation, and will not be applied to the new system. After installation, you need to go to the admin panel at <http://IP:5666> to create a user and enable SSH.
```bash
bash reinstall.sh anolis 7|8|23
@@ -365,7 +368,116 @@ bash reinstall.sh windows \
```
<details>
<summary> --lang list </summary>
<summary>--image-name list</summary>
The following editions support automatic ISO search. For other editions, please use Method 2 to manually specify the ISO link for installation.
```text
Windows Vista Starter
Windows Vista HomeBasic
Windows Vista HomePremium
Windows Vista Business
Windows Vista Ultimate
Windows Vista Enterprise
Windows 7 Starter
Windows 7 HomeBasic
Windows 7 HomePremium
Windows 7 Professional
Windows 7 Ultimate
Windows 7 Enterprise
Windows 8
Windows 8 Pro
Windows 8 Enterprise
Windows 8.1
Windows 8.1 Pro
Windows 8.1 Enterprise
Windows 10 Home
Windows 10 Home Single Language
Windows 10 Pro
Windows 10 Pro Education
Windows 10 Pro for Workstations
Windows 10 Education
Windows 10 Enterprise
Windows 10 Enterprise 2015 LTSB
Windows 10 Enterprise 2016 LTSB
Windows 10 Enterprise LTSC 2019
Windows 10 Enterprise LTSC 2021
Windows 10 IoT Enterprise
Windows 10 IoT Enterprise 2015 LTSB
Windows 10 IoT Enterprise 2016 LTSB
Windows 10 IoT Enterprise LTSC 2019
Windows 10 IoT Enterprise LTSC 2021
Windows 11 Home
Windows 11 Home Single Language
Windows 11 Pro
Windows 11 Pro Education
Windows 11 Pro for Workstations
Windows 11 Education
Windows 11 Enterprise
Windows 11 Enterprise LTSC 2024
Windows 11 IoT Enterprise
Windows 11 IoT Enterprise LTSC 2024
Windows 11 IoT Enterprise Subscription
Windows 11 IoT Enterprise Subscription LTSC 2024
Windows Longhorn ServerWeb
Windows Longhorn ServerWebCore
Windows Longhorn ServerStandard
Windows Longhorn ServerStandardCore
Windows Longhorn ServerEnterprise
Windows Longhorn ServerEnterpriseCore
Windows Longhorn ServerDatacenter
Windows Longhorn ServerDatacenterCore
Windows Server 2008 R2 ServerWeb
Windows Server 2008 R2 ServerWebCore
Windows Server 2008 R2 ServerStandard
Windows Server 2008 R2 ServerStandardCore
Windows Server 2008 R2 ServerEnterprise
Windows Server 2008 R2 ServerEnterpriseCore
Windows Server 2008 R2 ServerDatacenter
Windows Server 2008 R2 ServerDatacenterCore
Windows Server 2012 ServerStandard
Windows Server 2012 ServerStandardCore
Windows Server 2012 ServerDatacenter
Windows Server 2012 ServerDatacenterCore
Windows Server 2012 R2 ServerStandard
Windows Server 2012 R2 ServerStandardCore
Windows Server 2012 R2 ServerDatacenter
Windows Server 2012 R2 ServerDatacenterCore
Windows Server 2016 ServerStandard
Windows Server 2016 ServerStandardCore
Windows Server 2016 ServerDatacenter
Windows Server 2016 ServerDatacenterCore
Windows Server 2019 ServerStandard
Windows Server 2019 ServerStandardCore
Windows Server 2019 ServerDatacenter
Windows Server 2019 ServerDatacenterCore
Windows Server 2022 ServerStandard
Windows Server 2022 ServerStandardCore
Windows Server 2022 ServerDatacenter
Windows Server 2022 ServerDatacenterCore
Windows Server 2025 ServerStandard
Windows Server 2025 ServerStandardCore
Windows Server 2025 ServerDatacenter
Windows Server 2025 ServerDatacenterCore
```
</details>
<details>
<summary>--lang list</summary>
Supports these three language format codes. Case insensitive.
@@ -436,7 +548,6 @@ bash reinstall.sh windows \
<summary>The following website provides ISO links.</summary>
- General
- <https://msdl.gravesoft.dev>
- <https://ntriver.org/download-windows-office> (Recommended, ISOs are up to date)
- <https://massgrave.dev/genuine-installation-media> (Recommended, ISOs are up to date)
- <https://next.itellyou.cn>
@@ -475,9 +586,9 @@ bash reinstall.sh windows \
#### The following drivers will automatic download and install as needed, without the need for manual addition
- VirtIO ([Community][virtio-virtio], [Alibaba Cloud][virtio-aliyun], [Tencent Cloud][virtio-qcloud], [GCP][virtio-gcp])
- VirtIO ([Community][virtio-virtio], [Alibaba Cloud][virtio-aliyun], [Tencent Cloud][virtio-qcloud], [GCP][virtio-gcp], [GCP (Win7/2008 SHA-1)][virtio-gcp-win6.1sha1]))
- XEN ([~~Community~~][xen-xen] (unsigned), [Citrix][xen-citrix], [AWS][xen-aws])
- AWS ([ENA Network Adapter][aws-ena], [NVME Storage Controller][aws-nvme])
- AWS ([ENA Network Adapter][aws-ena], [NVMe Storage Controller][aws-nvme], [VMClock Virtual Clock][aws-vmclock], [PCI Serial][aws-pciserial]))
- GCP ([gVNIC Network Adapter][gcp-gvnic], [GGA Display Adapter][gcp-gga])
- Azure ([MANA Network Adapter][azure-mana])
- Intel (VMD Storage Controller: [11th Gen Core][intel-vmd-gen11], [12th-15th Gen Core][intel-vmd-gen12-to-gen15], [Core Ultra 3][intel-vmd-ultra3], Network Adapter: [7][intel-nic-7], [8.x][intel-nic-8.1], [10][intel-nic-10], [11][intel-nic-11], [2008 R2][intel-nic-7], [2012][intel-nic-2012], [2012 R2][intel-nic-2012-r2], [2016][intel-nic-2016], [2019][intel-nic-2019], [2022][intel-nic-2022], [2025][intel-nic-2025])
@@ -485,14 +596,17 @@ bash reinstall.sh windows \
[virtio-virtio]: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/
[virtio-aliyun]: https://www.alibabacloud.com/help/ecs/user-guide/install-the-virtio-driver-1
[virtio-qcloud]: https://cloud.tencent.com/document/product/213/17815#b84b2032-752c-43c4-a509-73530b8f82ff
[virtio-gcp]: https://console.cloud.google.com/storage/browser/gce-windows-drivers-public
[xen-xen]: https://xenproject.org/resources/downloads/
[virtio-gcp]: https://packages.cloud.google.com/yuck/repos/google-compute-engine-stable/index
[virtio-gcp-win6.1sha1]: https://console.cloud.google.com/storage/browser/gce-windows-drivers-public/win6.1sha1
[xen-xen]: https://xenbits.xenproject.org/pvdrivers/win/
[xen-aws]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/xen-drivers-overview.html
[xen-citrix]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Upgrading_PV_drivers.html#win2008-citrix-upgrade
[aws-ena]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ena-driver-releases-windows.html
[aws-nvme]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-driver-version-history.html
[gcp-gvnic]: https://cloud.google.com/compute/docs/networking/using-gvnic
[gcp-gga]: https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display
[aws-vmclock]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/other-windows-device-drivers.html
[aws-pciserial]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/migrating-latest-types.html#install-serial-port-bare-metal
[gcp-gvnic]: https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-gvnic-stable/index
[gcp-gga]: https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-gga-stable/index
[azure-mana]: https://learn.microsoft.com/azure/virtual-network/accelerated-networking-mana-windows
[intel-vmd-gen11]: https://www.intel.com/content/www/us/en/download/849933/intel-rapid-storage-technology-driver-installation-software-with-intel-optane-memory-12th-to-13th-gen-platforms.html
[intel-vmd-gen12-to-gen15]: https://www.intel.com/content/www/us/en/download/849936/intel-rapid-storage-technology-driver-installation-software-with-intel-optane-memory-12th-to-15th-gen-platforms.html
@@ -514,15 +628,6 @@ An ISO usually contains multiple system editions, such as Home and Pro. Therefor
You can use tools like DISM, DISM++, or Wimlib to query the image names included in the ISO.
Commonly used image names include:
```text
Windows 7 Ultimate
Windows 11 Pro
Windows 11 Enterprise LTSC 2024
Windows Server 2025 SERVERDATACENTER
```
#### How to Use [DISM++](https://github.com/Chuyu-Team/Dism-Multi-language/releases) to Query the Image Names Included in the ISO
Open File menu > Open Image File, select the iso to be installed to get the image name (full system name), and all available image names are installable.
@@ -530,15 +635,15 @@ Open File menu > Open Image File, select the iso to be installed to get the imag
![image-name](https://github.com/bin456789/reinstall/assets/7548515/5aae0a9b-61e2-4f66-bb98-d470a6beaac2)
> [!WARNING]
> Vista (Server 2008) and 32-bit systems may lack drivers.
> Vista, Server 2008 and 32-bit systems may lack drivers.
> [!WARNING]
>
> For Windows 7 (Server 2008 R2) installation:
> For Vista, 7, Server 2008, Server 2008 R2 installation:
>
> 1. EFI-boot machines must enable CSM.
>
> 2. On Hyper-V (Azure), select Generation 1 VM. <https://learn.microsoft.com/windows-server/virtualization/hyper-v/plan/should-i-create-a-generation-1-or-2-virtual-machine-in-hyper-v>
> 2. On Hyper-V / Azure, select Generation 1 VM.
> [!WARNING]
>
@@ -589,8 +694,8 @@ bash reinstall.sh reset
- `--ssh-key "ssh-ed25519 ..."`
- `--ssh-key "ecdsa-sha2-nistp256/384/521 ..."`
- `--ssh-key http://path/to/public_key`
- `--ssh-key github:your_username`
- `--ssh-key gitlab:your_username`
- `--ssh-key github:your_username` or `--ssh-key gh:your_username`
- `--ssh-key gitlab:your_username` or `--ssh-key gl:your_username`
- `--ssh-key /path/to/public_key`
- `--ssh-key C:\path\to\public_key`
+134 -29
View File
@@ -7,14 +7,16 @@
[![Lines of Code](https://aschey.tech/tokei/github/bin456789/reinstall?category=code&label=Lines%20of%20Code&style=flat-square)](https://github.com/aschey/vercel-tokei)
<!-- [![Lines of Code](https://tokei.rs/b1/github/bin456789/reinstall?category=code&label=Lines%20of%20Code&style=flat-square)](https://github.com/XAMPPRocky/tokei_rs) -->
<a href="https://trendshift.io/repositories/14732"><img src="https://trendshift.io/api/badge/repositories/14732" alt="bin456789%2Freinstall | Trendshift" width="250" height="55"/></a>
一键 VPS 系统重装脚本 [English](README.en.md)
## 介绍
- 一键重装到 Linux,支持 19 种常见发行版
- 一键重装到 Windows,使用官方原版 ISO 而非自制镜像,脚本支持自动查找 ISO 链接、自动安装 `VirtIO` 等公有云驱动
- 一键重装到 Linux,支持 20 种常见发行版
- 一键重装到 Windows,使用官方原版 ISO 而非自制镜像,支持自动查找 ISO 链接、自动安装 `VirtIO` 等公有云驱动
- 支持任意方向重装,即 `Linux to Linux`、`Linux to Windows`、`Windows to Windows`、`Windows to Linux`
- 自动设置 IP,智能设置动静态,支持 `/32`、`/128`、`网关不在子网范围内`、`纯 IPv6`、`IPv4/IPv6 在不同的网卡`
- 自动设置 IP,智能设置动静态,支持 `/32`、`/128`、`网关不在子网范围内`、`纯 IPv6`、`IPv4/IPv6 在不同网卡`
- 专门适配低配小鸡,比官方 netboot 需要更少的内存
- 全程用分区表 ID 识别硬盘,确保不会写错硬盘
- 支持 BIOS、EFI 引导,支持 ARM 服务器
@@ -49,7 +51,7 @@
| 系统 | 版本 | 内存 | 硬盘 |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ------------ |
| <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.21, 3.22, 3.23, 3.24 | 256 MB | 1 GB |
| <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9, 10, 11, 12, 13 | 256 MB | 1 ~ 1.5 GB ^ |
| <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9 ELTS - 11 ELTS, 12, 13 | 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://documentation.ubuntu.com/server/_static/favicon.png" /> Ubuntu | 18.04 LTS - 26.04 LTS | 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 |
@@ -60,10 +62,10 @@
| <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03 LTS - 24.03 LTS | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | Leap 16.0, Tumbleweed (滚动) | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://nixos.org/favicon.svg" /> NixOS | 26.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 Linux / Arch Linux ARM | 滚动 | 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://aosc.io/distros/aosc-os.svg" /> 安同 OS | 滚动 | 512 MB | 5 GB |
| <img width="16" height="16" src="https://www.fnnas.com/favicon.ico" /> 飞牛 fnOS &nbsp;<img width="16" height="16" src="https://fygonas.com/favicon.ico" /> FygoOS | 1 | 512 MB | 8 GB |
| <img width="16" height="16" src="https://www.fnnas.com/favicon.ico" /> 飞牛 fnOS &nbsp;<img width="16" height="16" src="https://fygonas.com/favicon.ico" /> FygoOS | 1 | 512 MB | 10 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 |
@@ -154,6 +156,7 @@ certutil -urlcache -f -split https://cnb.cool/bin456789/reinstall/-/git/raw/main
- 安装 Red Hat 时需填写 <https://access.redhat.com/downloads/content/rhel> 得到的 `qcow2` 镜像链接,也可以安装其它类 RHEL 系统的 `qcow2`,例如 `Alibaba Cloud Linux` 和 `TencentOS Server`
- 重装后如需修改 SSH 端口或者改成密钥登录,注意还要修改 `/etc/ssh/sshd_config.d/` 里面的文件
- 为了快速安装,重装时不会对新系统进行更新,请在重装后自行更新
- 安装飞牛 fnOS/FygoOS 时设置的用户名、密码、密钥仅用于安装期间登录 SSH 查看日志,不会应用到新系统。系统安装后需到后台面板 <http://IP:5666> 创建用户和开启 SSH
```bash
bash reinstall.sh anolis 7|8|23
@@ -356,7 +359,7 @@ bash reinstall.sh netboot.xyz
#### 方法 1: 让脚本自动查找 ISO
- 脚本会 <https://ntriver.org/download-windows-office> 查找 ISO,网站专门提供官方 ISO 下载
- 脚本会从 <https://ntriver.org/download-windows-office> 查找 ISO,该网站专门收集官方 ISO 镜像
```bash
bash reinstall.sh windows \
@@ -365,7 +368,116 @@ bash reinstall.sh windows \
```
<details>
<summary> --lang 列表</summary>
<summary>--image-name 列表</summary>
以下版本支持自动查找,其它版本请用方法 2 手动指定 ISO 链接安装
```text
Windows Vista Starter
Windows Vista HomeBasic
Windows Vista HomePremium
Windows Vista Business
Windows Vista Ultimate
Windows Vista Enterprise
Windows 7 Starter
Windows 7 HomeBasic
Windows 7 HomePremium
Windows 7 Professional
Windows 7 Ultimate
Windows 7 Enterprise
Windows 8
Windows 8 Pro
Windows 8 Enterprise
Windows 8.1
Windows 8.1 Pro
Windows 8.1 Enterprise
Windows 10 Home
Windows 10 Home Single Language
Windows 10 Pro
Windows 10 Pro Education
Windows 10 Pro for Workstations
Windows 10 Education
Windows 10 Enterprise
Windows 10 Enterprise 2015 LTSB
Windows 10 Enterprise 2016 LTSB
Windows 10 Enterprise LTSC 2019
Windows 10 Enterprise LTSC 2021
Windows 10 IoT Enterprise
Windows 10 IoT Enterprise 2015 LTSB
Windows 10 IoT Enterprise 2016 LTSB
Windows 10 IoT Enterprise LTSC 2019
Windows 10 IoT Enterprise LTSC 2021
Windows 11 Home
Windows 11 Home Single Language
Windows 11 Pro
Windows 11 Pro Education
Windows 11 Pro for Workstations
Windows 11 Education
Windows 11 Enterprise
Windows 11 Enterprise LTSC 2024
Windows 11 IoT Enterprise
Windows 11 IoT Enterprise LTSC 2024
Windows 11 IoT Enterprise Subscription
Windows 11 IoT Enterprise Subscription LTSC 2024
Windows Longhorn ServerWeb
Windows Longhorn ServerWebCore
Windows Longhorn ServerStandard
Windows Longhorn ServerStandardCore
Windows Longhorn ServerEnterprise
Windows Longhorn ServerEnterpriseCore
Windows Longhorn ServerDatacenter
Windows Longhorn ServerDatacenterCore
Windows Server 2008 R2 ServerWeb
Windows Server 2008 R2 ServerWebCore
Windows Server 2008 R2 ServerStandard
Windows Server 2008 R2 ServerStandardCore
Windows Server 2008 R2 ServerEnterprise
Windows Server 2008 R2 ServerEnterpriseCore
Windows Server 2008 R2 ServerDatacenter
Windows Server 2008 R2 ServerDatacenterCore
Windows Server 2012 ServerStandard
Windows Server 2012 ServerStandardCore
Windows Server 2012 ServerDatacenter
Windows Server 2012 ServerDatacenterCore
Windows Server 2012 R2 ServerStandard
Windows Server 2012 R2 ServerStandardCore
Windows Server 2012 R2 ServerDatacenter
Windows Server 2012 R2 ServerDatacenterCore
Windows Server 2016 ServerStandard
Windows Server 2016 ServerStandardCore
Windows Server 2016 ServerDatacenter
Windows Server 2016 ServerDatacenterCore
Windows Server 2019 ServerStandard
Windows Server 2019 ServerStandardCore
Windows Server 2019 ServerDatacenter
Windows Server 2019 ServerDatacenterCore
Windows Server 2022 ServerStandard
Windows Server 2022 ServerStandardCore
Windows Server 2022 ServerDatacenter
Windows Server 2022 ServerDatacenterCore
Windows Server 2025 ServerStandard
Windows Server 2025 ServerStandardCore
Windows Server 2025 ServerDatacenter
Windows Server 2025 ServerDatacenterCore
```
</details>
<details>
<summary>--lang 列表</summary>
支持这三种语言代码格式,不区分大小写
@@ -436,7 +548,6 @@ bash reinstall.sh windows \
<summary>以下网站可找到 ISO 链接</summary>
- 正式版
- <https://msdl.gravesoft.dev>
- <https://ntriver.org/download-windows-office> (推荐,ISO 是最新版)
- <https://massgrave.dev/genuine-installation-media> (推荐,ISO 是最新版)
- <https://next.itellyou.cn>
@@ -475,9 +586,9 @@ bash reinstall.sh windows \
#### 以下驱动会自动按需下载安装,无需手动添加
- VirtIO ([社区版][virtio-virtio], [阿里云][virtio-aliyun], [腾讯云][virtio-qcloud], [GCP][virtio-gcp])
- VirtIO ([社区版][virtio-virtio], [阿里云][virtio-aliyun], [腾讯云][virtio-qcloud], [GCP][virtio-gcp], [GCP (Win7/2008 SHA-1)][virtio-gcp-win6.1sha1])
- XEN ([~~社区版~~][xen-xen] (未签名), [Citrix][xen-citrix], [AWS][xen-aws])
- AWS ([ENA 网卡][aws-ena], [NVME 存储控制器][aws-nvme])
- AWS ([ENA 网卡][aws-ena], [NVMe 存储控制器][aws-nvme], [VMClock 虚拟时钟][aws-vmclock], [PCI 串口][aws-pciserial])
- GCP ([gVNIC 网卡][gcp-gvnic], [GGA 显卡][gcp-gga])
- Azure ([MANA 网卡][azure-mana])
- Intel (VMD 存储控制器: [11代酷睿][intel-vmd-gen11], [12-15代酷睿][intel-vmd-gen12-to-gen15], [酷睿 Ultra 3][intel-vmd-ultra3], 网卡: [7][intel-nic-7], [8.x][intel-nic-8.1], [10][intel-nic-10], [11][intel-nic-11], [2008 R2][intel-nic-7], [2012][intel-nic-2012], [2012 R2][intel-nic-2012-r2], [2016][intel-nic-2016], [2019][intel-nic-2019], [2022][intel-nic-2022], [2025][intel-nic-2025])
@@ -485,14 +596,17 @@ bash reinstall.sh windows \
[virtio-virtio]: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/
[virtio-aliyun]: https://www.alibabacloud.com/help/ecs/user-guide/install-the-virtio-driver-1
[virtio-qcloud]: https://cloud.tencent.com/document/product/213/17815#b84b2032-752c-43c4-a509-73530b8f82ff
[virtio-gcp]: https://console.cloud.google.com/storage/browser/gce-windows-drivers-public
[xen-xen]: https://xenproject.org/resources/downloads/
[virtio-gcp]: https://packages.cloud.google.com/yuck/repos/google-compute-engine-stable/index
[virtio-gcp-win6.1sha1]: https://console.cloud.google.com/storage/browser/gce-windows-drivers-public/win6.1sha1
[xen-xen]: https://xenbits.xenproject.org/pvdrivers/win/
[xen-aws]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/xen-drivers-overview.html
[xen-citrix]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Upgrading_PV_drivers.html#win2008-citrix-upgrade
[aws-ena]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ena-driver-releases-windows.html
[aws-nvme]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-driver-version-history.html
[gcp-gvnic]: https://cloud.google.com/compute/docs/networking/using-gvnic
[gcp-gga]: https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display
[aws-vmclock]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/other-windows-device-drivers.html
[aws-pciserial]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/migrating-latest-types.html#install-serial-port-bare-metal
[gcp-gvnic]: https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-gvnic-stable/index
[gcp-gga]: https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-gga-stable/index
[azure-mana]: https://learn.microsoft.com/azure/virtual-network/accelerated-networking-mana-windows
[intel-vmd-gen11]: https://www.intel.com/content/www/us/en/download/849933/intel-rapid-storage-technology-driver-installation-software-with-intel-optane-memory-12th-to-13th-gen-platforms.html
[intel-vmd-gen12-to-gen15]: https://www.intel.com/content/www/us/en/download/849936/intel-rapid-storage-technology-driver-installation-software-with-intel-optane-memory-12th-to-15th-gen-platforms.html
@@ -514,15 +628,6 @@ bash reinstall.sh windows \
可以用 DISM、DISM++、Wimlib 等工具查询 ISO 包含的映像名称
常用的映像名称有:
```text
Windows 7 Ultimate
Windows 11 Pro
Windows 11 Enterprise LTSC 2024
Windows Server 2025 SERVERDATACENTER
```
#### 如何用 [DISM++](https://github.com/Chuyu-Team/Dism-Multi-language/releases) 查询 ISO 包含的映像名称
打开文件菜单 > 打开映像文件,选择要安装的 iso,即可得到映像名称,所有映像名称都可以安装
@@ -530,15 +635,15 @@ Windows Server 2025 SERVERDATACENTER
![image-name](https://github.com/bin456789/reinstall/assets/7548515/5aae0a9b-61e2-4f66-bb98-d470a6beaac2)
> [!WARNING]
> Vista (Server 2008) 和 32 位系统可能会缺少驱动
> Vista、Server 2008 和 32 位系统可能会缺少驱动
> [!WARNING]
>
> 安装 Windows 7 (Server 2008 R2) 时
> 安装 Vista、7、Server 2008、Server 2008 R2 时
>
> 1. EFI 引导的机器要开启 CSM
>
> 2. Hyper-V (Azure) 需选择第 1 代虚拟机 <https://learn.microsoft.com/windows-server/virtualization/hyper-v/plan/should-i-create-a-generation-1-or-2-virtual-machine-in-hyper-v>
> 2. Hyper-V / Azure 需选择第 1 代虚拟机
> [!WARNING]
>
@@ -589,8 +694,8 @@ bash reinstall.sh reset
- `--ssh-key "ssh-ed25519 ..."`
- `--ssh-key "ecdsa-sha2-nistp256/384/521 ..."`
- `--ssh-key http://path/to/public_key`
- `--ssh-key github:your_username`
- `--ssh-key gitlab:your_username`
- `--ssh-key github:your_username` 或 `--ssh-key gh:your_username`
- `--ssh-key gitlab:your_username` 或 `--ssh-key gl:your_username`
- `--ssh-key /path/to/public_key`
- `--ssh-key C:\path\to\public_key`
+4
View File
@@ -122,6 +122,10 @@ d-i grub-installer/force-efi-extra-removable boolean true
# di 环境下 /etc/passwd 设置了 root 的家目录是 /,不是常见的 /root
# 我们不修改它,防止出问题
# 新文件的默认权限是 644
# 用 anna 安装 network-console 后,/etc/{passwd,group,shadow} 权限也是 644
# 因此不需要修改它们的权限
# di 环境下 锁定用户将无法登录 ssh
# passwd/root-password-crypted 是 ! 开头时会提示输入密码
+45 -25
View File
@@ -662,7 +662,8 @@ is_virt() {
if is_in_windows; then
# https://github.com/systemd/systemd/blob/main/src/basic/virt.c
# https://sources.debian.org/src/hw-detect/1.159/hw-detect.finish-install.d/08hw-detect/
vmstr='VMware|Virtual|Virtualization|VirtualBox|VMW|Hyper-V|Bochs|QEMU|KVM|OpenStack|KubeVirt|innotek|Xen|Parallels|BHYVE'
vmstr='VMware|VirtualBox|VMW|Hyper-V|Bochs|QEMU|KVM|OpenStack|KubeVirt|innotek|Xen|HVM|Parallels|BHYVE|OVMF'
vmstr+='|virt|Virtual|Virtualization'
for name in ComputerSystem BIOS BaseBoard; do
if wmic $name | grep -Eiw $vmstr; then
_is_virt=true
@@ -1090,6 +1091,14 @@ get_windows_iso_link() {
;;
esac
;;
2008 | '2008 r2')
case "$edition" in
serverweb | serverwebcore) echo _ ;;
serverstandard | serverstandardcore) echo _ ;;
serverenterprise | serverenterprisecore) echo _ ;;
serverdatacenter | serverdatacentercore) echo _ ;;
esac
;;
2012 | '2012 r2' | 2016 | 2019 | 2022 | 2025)
case "$edition" in
serverstandard | serverstandardcore) echo _ ;;
@@ -1241,6 +1250,9 @@ get_best_windows_iso_line() {
local lines
lines=$(cat)
# 排除 debug 版
lines=$(echo "$lines" | grep -Ei -v '_(symbols|debug|debugging|checked)_')
# 在所有符合的 iso 中
# 先选择 win10/11 大版本更新的 (version 26h1) 或者有 sp 版本的 (sp1, windows_8.1_with_update_)
# 再选择有日期更新的 (updated_july_2026)
@@ -1251,8 +1263,8 @@ get_best_windows_iso_line() {
# zh-cn_windows_server_2019_x64_dvd_19d65722.iso 2022-11-15
# cn_windows_server_2019_updated_april_2021_x64_dvd_a6dae187.iso 2021-04-20
for key in '(version|sp[0-9]|update)' 'updated' 'vl'; do
if grep_lines=$(grep -E "_${key}_" <<<"$lines"); then
for key in '(version_[0-9h]{4}|sp[1-9]|service_pack|with_update)' 'updated' 'vl'; do
if grep_lines=$(grep -Ei "_${key}_" <<<"$lines"); then
lines=$grep_lines
fi
done
@@ -1387,7 +1399,7 @@ setos() {
setos_debian() {
is_debian_elts() {
[ "$releasever" -le 10 ]
[ "$releasever" -le 11 ]
}
if [ "$releasever" -le 9 ] && [ "$basearch" = aarch64 ]; then
@@ -1545,7 +1557,6 @@ Continue?
# https://unicom.mirrors.ustc.edu.cn/ubuntu-cloud-images/releases/
# https://mirror.nju.edu.cn/ubuntu-cloud-images/releases/
# mirrors.cloud.tencent.com
ci_mirror=https://mirror.nju.edu.cn/ubuntu-cloud-images
else
ci_mirror=https://cloud-images.ubuntu.com
@@ -1717,10 +1728,10 @@ Continue?
# 16.0) file=Leap-$releasever-Minimal-VM.$basearch-kvm$(if [ "$basearch" = x86_64 ]; then echo '-and-xen'; fi).qcow2 ;;
esac
# https://src.opensuse.org/openSUSE/Leap-Images/src/branch/leap-16.0/kiwi-templates-Minimal/Minimal.kiwi
# kvm 镜像里面没有 cloud-init
# 但不够 Cloud 镜像通用?
# https://src.opensuse.org/pool/kiwi-templates-Minimal/src/branch/factory/Minimal.kiwi
# https://build.opensuse.org/projects/Virtualization:Appliances:Images:openSUSE-Tumbleweed/packages/kiwi-templates-Minimal/files/Minimal.kiwi
# 有专门的kvm镜像,openSUSE-Leap-15.5-Minimal-VM.x86_64-kvm-and-xen.qcow2,里面没有cloud-init
# file=openSUSE-Leap-15.5-Minimal-VM.x86_64-kvm-and-xen.qcow2
fi
img=$mirror/$dir/$file
fi
@@ -1858,10 +1869,10 @@ Continue with DD?
setos_fnos() {
# 系统盘大小
min=8
default=8
echo "请输入系统分区大小,最小 $min GB,但可能无法更新系统。"
echo "Please input System Partition Size. Minimal is $min GB but may not be able to do system updates."
min=10
default=64
echo "请输入系统分区大小,最小 $min GB,但可能无法更新系统。建议 $default GB。"
echo "Please input System Partition Size. Minimal is $min GB but may not be able to do system updates. Recommended is $default GB."
while true; do
IFS= read -r -p "Size in GB [$default]: " input
input=${input:-$default}
@@ -2064,15 +2075,18 @@ Continue with DD?
setos_opencloudos() {
# https://mirrors.opencloudos.tech 不支持 ipv6
# https://mirrors.cloud.tencent.com 没有 stream
# mirrors.cloud.tencent.com 为公网与内网统一域名
# https://cloud.tencent.com/document/product/213/8623
if [ "$releasever" -ge 23 ]; then
mirror=https://mirrors.opencloudos.tech/opencloudos-stream/releases
mirror=https://mirrors.cloud.tencent.com/opencloudos-stream/releases
else
mirror=https://mirrors.cloud.tencent.com/opencloudos
fi
if is_use_cloud_image; then
# ci
# https://opencloudos.org/api/v1/iso-releases/published
if [ -z "$img" ]; then
if [ "$releasever" -eq 9 ]; then
dir=$releasever/images/qcow2/$basearch
@@ -2786,7 +2800,7 @@ save_password() {
fi
# windows
if [ "$distro" = windows ] || [ "$distro" = dd ]; then
if [ "$distro" = windows ]; then
install_pkg iconv
# 要分两行写,因为 echo "$(xxx)" 返回值始终为 0,出错也不会中断脚本
@@ -3351,9 +3365,9 @@ install_grub_win() {
# grub 对应的 alpine 版本
case "$grub_ver" in
2.06) local alpine_ver=3.19 ;;
2.12) local alpine_ver=3.23 ;;
2.14) local alpine_ver=3.24 ;;
2.12) local alpine_ver=3.23 ;;
2.06) local alpine_ver=3.19 ;;
esac
# grub 架构名和对应的 alpine 包名
@@ -3395,9 +3409,10 @@ install_grub_win() {
fi
# 设置 grub 包含的模块
# 原系统是 windows,因此不需要 ext2 lvm xfs btrfs
grub_modules+=" normal minicmd serial ls echo test cat reboot halt linux chain search all_video configfile"
grub_modules+=" scsi part_msdos part_gpt fat ntfs ntfscomp lzopio xzio gzio zstd"
# 原系统是 windows,因此不需要 ext2 lvm xfs btrfs 模块
# vmlinuz/initramfs 不需要 grub 解压,因此不需要 lzopio xzio gzio zstd 模块
grub_modules="normal minicmd serial ls echo test cat reboot halt linux chain search all_video configfile"
grub_modules+=" scsi part_msdos part_gpt fat ntfs ntfscomp"
if ! is_efi; then
grub_modules+=" biosdisk linux16"
fi
@@ -3756,7 +3771,7 @@ EOF
# pata-modules 默认安装(改成可选),里面的驱动都是 pata_ 开头,但只有 pata_legacy.ko(+) 在云内核中
# sata-modules 默认安装(改成可选),里面的驱动大部分是 sata_ 开头的,其他重要的还有 ahci.ko libahci.ko ata_piix.ko(+)
# 云内核没有 sata 模块,也没有内嵌,有一个 CONFIG_SATA_HOST=y,libata-$(CONFIG_SATA_HOST) += libata-sata.o
# 云内核没有 sata 模块,也没有内嵌,有一个 CONFIG_SATA_HOST=y,libata-$(CONFIG_SATA_HOST) += libata-sata.o
# scsi-modules 默认安装(改成可选),包含 nvme.ko(+) 和各种虚拟化驱动(+)
download_and_extract_deb() {
@@ -3969,9 +3984,9 @@ EOF
fi
# amd64)
# level1=737 # MT=754108, qemu: -m 780
# level2=424 # MT=433340, qemu: -m 460
# min=316 # MT=322748, qemu: -m 350
# level1=737 # MT=754108, qemu: -m 780
# level2=424 # MT=433340, qemu: -m 460
# min=316 # MT=322748, qemu: -m 350
# 将 use_level 2 9 修改为 use_level 1
# x86 use_level 2 会出现 No root file system is defined.
@@ -4928,11 +4943,16 @@ EOF
[ -n "$2" ] || ssh_key_error_and_exit "Need value for $1"
case "$(to_lower <<<"$2")" in
github:* | gitlab:* | http://* | https://*)
gh:* | github:* | gl:* | gitlab:* | http://* | https://*)
if [[ "$(to_lower <<<"$2")" = http* ]]; then
key_url=$2
else
IFS=: read -r site user <<<"$2"
case "$(to_lower <<<"$site")" in
gh | github) site=github ;;
gl | gitlab) site=gitlab ;;
*) ;;
esac
[ -n "$user" ] || ssh_key_error_and_exit "Need a username for $site"
key_url="https://$site.com/$user.keys"
fi
+55 -23
View File
@@ -361,17 +361,20 @@ download() {
update_part() {
sleep 1
sync
sleep 1
# partprobe
# 有分区挂载中会报 Resource busy 错误
if is_have_cmd partprobe; then
partprobe /dev/$xda 2>/dev/null || true
sleep 1
fi
# partx
# https://access.redhat.com/solutions/199573
if is_have_cmd partx; then
partx -u /dev/$xda
sleep 1
fi
# mdev
@@ -380,6 +383,7 @@ update_part() {
# 因此要先停止 mdev 服务
# 还要删除 /dev/$xda*?
ensure_service_stopped mdev
sleep 1
# 即使停止了 mdev,有时也会报 Directory not empty,因此添加 retry
retry 5 rm -rf /dev/disk/*
@@ -387,6 +391,7 @@ update_part() {
# modprobe: can't change directory to '/lib/modules': No such file or directory
# 因此强制不显示上面的提示
mdev -sf 2>/dev/null
sleep 1
ensure_service_started mdev 2>/dev/null
sleep 1
}
@@ -673,13 +678,6 @@ is_virt_contains() {
}
is_dmi_contains() {
# Manufacturer: Alibaba Cloud
# Manufacturer: Tencent Cloud
# Manufacturer: Huawei Cloud
# Asset Tag: OracleCloud.com
# Vendor: Amazon EC2
# Manufacturer: Amazon EC2
# Asset Tag: Amazon EC2
cache_dmi_and_virt
echo "$_dmi" | grep -Eiwq "$1"
}
@@ -2903,8 +2901,8 @@ create_part() {
# shellcheck disable=SC2154
if [ "$distro" = windows ]; then
if ! size_bytes=$(get_link_file_size "$iso"); then
# 默认值,目前最大的 iso 小于 8g
size_bytes=$((8 * 1024 * 1024 * 1024))
# 默认值,目前最大的 iso 小于 10g
size_bytes=$((10 * 1024 * 1024 * 1024))
fi
# 按iso容量计算分区大小
@@ -5363,8 +5361,18 @@ install_qcow_by_copy() {
fi
chroot_dnf install efibootmgr grub2-efi-$arch shim-$arch
fi
# openeuler arm 25.09 云镜像里面的 grubaa64.efi 是用于 mbr 分区表,$root 是 hd0,msdos1
# 因此要重新下载 $root 是 hd0,gpt1 的 grubaa64.efi
# openeuler arm 云镜像里面的 grubaa64.efi 有问题
# 1. 会自动进入 rescue 模式
# set 命令输出如下
# fw_path='(hd0,gpt1)//EFI/openEuler'
# prefix='(hd0,msdos1)/efi/EFI/openEuler'
# root='hd0,msdos1'
# 将 msdos1 改成 gpt1 后才能加载 normal 正常引导
# 2. 不是来自 grub2-efi-aa64 rpm
# 因此重新下载 $root 是 hd0,gpt1 的 grubaa64.efi
if $need_reinstall_grub_efi; then
chroot_dnf reinstall grub2-efi-$arch
fi
@@ -5704,6 +5712,7 @@ EOF
# centos/rocky/almalinux/rhel: xfs
# oracle x86_64: lvm + xfs
# oracle aarch64 cloud: xfs
# openeuler x64/arm: mbr 分区表 + ext4
# alibaba cloud linux 3: ext4
is_lvm_image=false
@@ -6361,6 +6370,15 @@ get_cloud_vendor() {
# busybox blkid 不显示 sr0 的 UUID
apk add lsblk
# Manufacturer: Alibaba Cloud
# Manufacturer: Tencent Cloud
# Manufacturer: Huawei Cloud
# Asset Tag: OracleCloud.com
# Vendor: Amazon EC2
# Manufacturer: Amazon EC2
# Asset Tag: Amazon EC2
# Asset Tag: HUAWEICLOUD
# http://git.annexia.org/?p=virt-what.git;a=blob;f=virt-what.in;hb=HEAD
# virt-what 可识别厂商 aws google_cloud alibaba_cloud alibaba_cloud-ebm
if is_dmi_contains "Amazon EC2" || is_virt_contains aws; then
@@ -6369,16 +6387,16 @@ get_cloud_vendor() {
echo gcp
elif is_dmi_contains "OracleCloud"; then
echo oracle
elif is_dmi_contains "7783-7084-3265-9085-8269-3286-77"; then
echo azure
elif lsblk -o UUID,LABEL | grep -i 9796-932E | grep -iq config-2; then
echo ibm
elif is_dmi_contains 'Huawei Cloud'; then
elif is_dmi_contains 'HUAWEICLOUD'; then
echo huawei
elif is_dmi_contains 'Alibaba Cloud'; then
echo aliyun
elif is_dmi_contains 'Tencent Cloud'; then
echo qcloud
elif is_dmi_contains "7783-7084-3265-9085-8269-3286-77"; then
echo azure
elif lsblk -o UUID,LABEL | grep -i 9796-932E | grep -iq config-2; then
echo ibm
fi
}
@@ -6985,7 +7003,7 @@ install_windows() {
;;
azure)
# inf 不限版本,未测试
if [ "$arch_wim" = x86 ] || [ "$arch_wim" = x86_64 ]; then
if [ "$arch_wim" = x86_64 ]; then
add_driver_azure
fi
;;
@@ -7313,14 +7331,21 @@ EOF
cp_drivers $drv/xen/.Drivers
}
# citrix xen
# 社区版
# https://xenbits.xenproject.org/pvdrivers/win/ 未签名
# https://github.com/xcp-ng/win-pv-drivers/releases
# 商业版
# https://pvupdates.vmd.citrix.com/updates.json 7.2.0.1555
# https://pvupdates.vmd.citrix.com/updates.v9.json 9.3.3.125
# https://pvupdates.vmd.citrix.com/autoupdate.v1.json 9.3.3.125
# https://pvupdates.vmd.citrix.com/autoupdate.v2.json 9.4.0.146
# https://support.citrix.com/s/article/CTX235403-updates-to-xenserver-vm-tools-for-windows-for-xenserver-and-citrix-hypervisor
# https://pvupdates.vmd.citrix.com/autoupdate.v2.json 9.6.0.19
# https://pvupdates.vmd.citrix.com/ 9.6.0.19
# https://www.xenserver.com/downloads 9.6.0.xx
# https://docs.xenserver.com/en-us/xenserver/9/vms/windows/vm-tools
# https://web.archive.org/web/20230830234619/https://support.citrix.com/article/CTX235403/updates-to-citrix-vm-tools-for-windows-for-xenserver-and-citrix-hypervisor
# 最高版本
# 最高版本?
# 2012 r2 9.3.1
# 2012 9.3.0
# 2008 (r2) 7.2.0.1555
@@ -7490,6 +7515,8 @@ EOF
# 先获取最新版本号,再下载
# 用 stable-virtio 的话国内镜像下载的可能是缓存的旧版
# anubis 默认策略拉黑了华为云,连验证的机会都没有
# https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/
# 路径是网页,可能会弹出 anubis 验证
@@ -7738,8 +7765,13 @@ EOF
info "Add drivers: GCP"
# https://packages.cloud.google.com/yuck/repos/google-compute-engine-stable/index
# https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-gvnic-gq-stable/index
# 官方镜像的 gvnic 是从 gvnic-gq-stable 获取的,版本低一点,但更稳定?
# https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-gvnic-stable/index
# https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-gga-stable/index
# https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-netkvm-stable/index
# https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-balloon-stable/index
# https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-pvpanic-stable/index
# https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-vioscsi-stable/index
# https://packages.cloud.google.com/yuck/repos/google-compute-engine-driver-nvme-stable/index
mkdir -p $drv/gce
gce_repo=https://packages.cloud.google.com/yuck