mirror of
https://github.com/bin456789/reinstall.git
synced 2026-10-04 06:27:49 +08:00
core: 不重要的更新
This commit is contained in:
@@ -7,14 +7,16 @@
|
||||
[](https://github.com/aschey/vercel-tokei)
|
||||
<!-- [](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 <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 <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
|
||||

|
||||
|
||||
> [!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`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user