Files
reinstall/README.en.md
T

734 lines
42 KiB
Markdown
Raw Normal View History

2025-04-18 18:42:48 +08:00
<!-- markdownlint-disable MD028 MD033 MD045 -->
2024-05-22 22:32:43 +08:00
2023-12-16 16:41:34 +08:00
# reinstall
2024-08-20 23:52:55 +08:00
[![Codacy](https://img.shields.io/codacy/grade/dc679a17751448628fe6d8ac35e26eed?logo=Codacy&label=Codacy&style=flat-square)](https://app.codacy.com/gh/bin456789/reinstall/dashboard)
[![CodeFactor](https://img.shields.io/codefactor/grade/github/bin456789/reinstall?logo=CodeFactor&logoColor=white&label=CodeFactor&style=flat-square)](https://www.codefactor.io/repository/github/bin456789/reinstall)
2026-01-07 21:34:18 +08:00
[![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) -->
2023-12-16 16:41:34 +08:00
2026-09-06 11:53:44 +08:00
<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)
2023-12-16 16:41:34 +08:00
2025-09-16 00:24:09 +08:00
## Introduction
2024-10-01 20:05:25 +08:00
2026-09-06 11:53:44 +08:00
- 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`.
2025-09-16 00:24:09 +08:00
- 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`
2024-08-20 23:52:55 +08:00
- Specially optimized for low-spec servers, requires less memory than the official netboot
- Uses partition table ID to identify hard drives throughout the process, ensuring no wrong disk is written
2024-11-23 23:50:12 +08:00
- Supports BIOS and EFI boot, and ARM Server
- No homemades image included, all resources are obtained in real-time from mirror sites
2023-12-16 16:41:34 +08:00
2026-05-29 07:25:17 +08:00
Buy me a milk tea:
2025-09-16 00:24:09 +08:00
[![Donate](https://img.shields.io/badge/Donate-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/bin456789)
[![Sponsors](https://raw.githubusercontent.com/bin456789/sponsors/refs/heads/master/sponsors.svg)](https://github.com/sponsors/bin456789)
### Feedback
[![GitHub Issues](https://img.shields.io/badge/GitHub-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/bin456789/reinstall/issues)
[![Telegram Group](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/reinstall_os)
## Quick Start
- [Download](#download-current-system-is--linux)
- [Feature 1. One-click reinstallation to Linux](#feature-1-install--linux)
- [Feature 2. One-click DD Raw image to hard disk](#feature-2-dd-raw-image-to-hard-disk)
2026-01-07 21:34:18 +08:00
- [Feature 3. One-click reboot to Alpine Live OS](#feature-3-reboot-to--alpine-live-os)
2025-09-16 00:24:09 +08:00
- [Feature 4. One-click reboot to netboot.xyz](#feature-4-reboot-to--netbootxyz)
- [Feature 5. One-click reinstallation to Windows](#feature-5-install--windows-iso)
2026-03-10 00:09:05 +08:00
- [Cancel the reinstallation](#cancel-the-reinstallation)
2025-09-16 00:24:09 +08:00
2024-05-03 21:37:07 +08:00
## System Requirements
2024-10-18 01:02:54 +08:00
The original system can be any system listed in the table.
The system requirements for the target system are as follows:
2025-02-21 00:30:34 +08:00
| System | Version | Memory | Disk |
2025-03-02 21:57:06 +08:00
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ---------------- |
2026-06-11 00:12:39 +08:00
| <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 |
2026-09-06 11:53:44 +08:00
| <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 ^ |
2026-09-11 00:11:38 +08:00
| <img width="16" height="16" src="https://github.com/bin456789/reinstall/assets/7548515/f74b3d5b-085f-4df3-bcc9-8a9bd80bb16d" /> Kali | Last-Snapshot, Rolling | 256 MB | 1 ~ 1.5 GB ^ |
2026-04-24 00:12:09 +08:00
| <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 |
2025-02-15 00:25:38 +08:00
| <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 |
2025-09-29 21:00:08 +08:00
| <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RHEL &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 &nbsp;<img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 8, 9, 10 | 512 MB \* | 5 GB |
2025-02-15 00:25:38 +08:00
| <img width="16" height="16" src="https://opencloudos.org/qq.ico" /> OpenCloudOS | 8, 9, Stream 23 | 512 MB \* | 5 GB |
2025-04-02 19:26:07 +08:00
| <img width="16" height="16" src="https://www.centos.org/assets/icons/favicon.svg" /> CentOS Stream | 9, 10 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://fedoraproject.org/favicon.ico" /> Fedora | 43, 44 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03 LTS - 24.03 LTS | 512 MB \* | 5 GB |
2026-05-11 20:20:33 +08:00
| <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | Leap 16.0, Tumbleweed (Rolling) | 512 MB \* | 5 GB |
2026-06-12 22:15:57 +08:00
| <img width="16" height="16" src="https://nixos.org/favicon.svg" /> NixOS | 26.05 | 512 MB | 5 GB |
2026-09-06 11:53:44 +08:00
| <img width="16" height="16" src="https://archlinux.org/static/favicon.png" /> Arch Linux / Arch Linux ARM | Rolling | 512 MB | 5 GB |
2025-02-15 00:25:38 +08:00
| <img width="16" height="16" src="https://www.gentoo.org/assets/img/logo/gentoo-g.png" /> Gentoo | Rolling | 512 MB | 5 GB |
2025-10-31 07:50:45 +08:00
| <img width="16" height="16" src="https://aosc.io/distros/aosc-os.svg" /> AOSC OS | Rolling | 512 MB | 5 GB |
2026-09-06 11:53:44 +08:00
| <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 |
2025-02-15 00:25:38 +08:00
| <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 |
2024-05-03 21:37:07 +08:00
2024-10-18 01:02:54 +08:00
\* Indicates installation using cloud images, not traditional network installation.
2024-05-03 21:37:07 +08:00
2024-10-18 01:02:54 +08:00
^ Indicates requiring either 256 MB memory + 1.5 GB disk, or 512 MB memory + 1 GB disk
2024-05-03 21:37:07 +08:00
2024-05-22 22:32:43 +08:00
> [!WARNING]
2025-09-16 00:24:09 +08:00
>
> In theory it also supports dedicated servers and PCs
>
> but if you can use IPMI or a USB drive, this script is not recommended.
> [!WARNING]
>
2024-05-22 22:32:43 +08:00
> ❌ This script does not support OpenVZ or LXC virtual machines.
>
> Please use <https://github.com/LloydAsp/OsMutation> instead.
2023-12-16 16:41:34 +08:00
2024-05-22 22:32:43 +08:00
## Download (Current system is <img width="20" height="20" src="https://www.kernel.org/theme/images/logos/favicon.png" /> Linux)
For server outside China:
2023-12-16 16:41:34 +08:00
```bash
2025-09-16 00:24:09 +08:00
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O ${_##*/} $_
2023-12-16 16:41:34 +08:00
```
2024-05-22 22:32:43 +08:00
For server inside China:
2023-12-16 16:41:34 +08:00
```bash
2025-09-16 00:24:09 +08:00
curl -O https://cnb.cool/bin456789/reinstall/-/git/raw/main/reinstall.sh || wget -O ${_##*/} $_
2023-12-16 16:41:34 +08:00
```
2024-05-22 22:32:43 +08:00
## Download (Current system is <img width="20" height="20" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows)
2024-01-27 23:08:34 +08:00
2024-05-22 22:32:43 +08:00
> [!IMPORTANT]
> Before proceeding, please disable the 'Real-time protection' feature in `Windows Defender`. This feature may prevent `certutil` from downloading any files.
2024-01-28 22:46:38 +08:00
2024-05-22 22:32:43 +08:00
<details>
2024-01-27 23:08:34 +08:00
<summary>Resolving Script Download Issues on Windows 7</summary>
2024-05-22 22:32:43 +08:00
Due to lack of support for TLS 1.2, SHA-256, or outdated root certificates, Windows Vista, 7, and Server 2008 (R2) may not be able to download scripts automatically. Manual downloading is required, as follows:
2024-05-22 22:32:43 +08:00
Use Internet Explorer (enable TLS 1.2 in IE's advanced settings first) to download, or use Remote Desktop to save the following two files into the same directory:
2024-05-22 22:32:43 +08:00
- <https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat>
2024-05-22 22:32:43 +08:00
- <https://www.cygwin.com/setup-x86.exe>
2024-05-22 22:32:43 +08:00
To use, run the downloaded `reinstall.bat`.
2024-05-22 22:32:43 +08:00
</details>
For server outside China:
2024-01-27 23:08:34 +08:00
```batch
certutil -urlcache -f -split https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat
```
2024-05-22 22:32:43 +08:00
For server inside China:
2024-01-27 23:08:34 +08:00
```batch
2025-04-04 07:50:22 +08:00
certutil -urlcache -f -split https://cnb.cool/bin456789/reinstall/-/git/raw/main/reinstall.bat
2024-01-27 23:08:34 +08:00
```
## Usage
2024-08-20 23:52:55 +08:00
**All features** can be used on both Linux and Windows.
2025-02-21 00:30:36 +08:00
- on Linux, run `bash reinstall.sh ...`
- on Windows, first run `cmd`, then run `.\reinstall.bat ...`
- If the link in the parameter contains special characters, it should be enclosed in `""`, not `''`.
2024-01-27 23:08:34 +08:00
2024-05-22 22:32:43 +08:00
### Feature 1: Install <img width="16" height="16" src="https://www.kernel.org/theme/images/logos/favicon.png" /> Linux
2023-12-16 16:41:34 +08:00
2025-09-16 00:24:09 +08:00
> [!CAUTION]
>
> This feature will erase **the entire hard disk** of the current system (including other partitions)!
>
2026-03-10 00:09:05 +08:00
> If the script was run by mistake, you can run `bash reinstall.sh reset` before rebooting to cancel the reinstallation operation.
2025-09-16 00:24:09 +08:00
2026-05-29 07:25:17 +08:00
- The script prompts for a username and password. If left blank, will use `root` and random password.
- If no version specified, will install the latest version.
- Maximizes disk space utilization: no boot or swap partitions.
2026-05-29 07:25:17 +08:00
- Automatically install optimized kernel based on machine type and vendor.
2026-01-07 21:34:18 +08:00
- 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`.
2024-10-18 01:02:54 +08:00
- 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/`.
2026-05-29 07:25:17 +08:00
- To ensure a faster reinstall, the new system will not be updated during the process. Please update the system manually after reinstallation.
2026-09-06 11:53:44 +08:00
- 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.
2024-07-07 17:07:22 +08:00
2023-12-16 16:41:34 +08:00
```bash
2025-01-13 23:19:38 +08:00
bash reinstall.sh anolis 7|8|23
2025-06-13 21:41:24 +08:00
rocky 8|9|10
2025-09-29 21:00:08 +08:00
oracle 8|9|10
2025-05-29 20:48:30 +08:00
almalinux 8|9|10
opencloudos 8|9|23
centos 9|10
2025-12-04 19:43:54 +08:00
fnos 1
2026-06-09 23:08:15 +08:00
fygoos 1
2026-06-12 22:15:57 +08:00
nixos 26.05
fedora 43|44
2025-08-10 08:02:22 +08:00
debian 9|10|11|12|13
2026-05-11 20:20:33 +08:00
opensuse 16.0|tumbleweed
openeuler 20.03|22.03|24.03
2026-06-11 00:12:39 +08:00
alpine 3.21|3.22|3.23|3.24
2026-09-11 00:11:38 +08:00
kali last-snapshot|rolling
2026-04-24 00:12:09 +08:00
ubuntu 18.04|20.04|22.04|24.04|26.04 [--minimal]
2024-03-31 00:32:05 +08:00
arch
2024-03-28 00:16:05 +08:00
gentoo
2025-03-02 21:57:06 +08:00
aosc
2025-05-16 19:06:09 +08:00
redhat --img="http://access.cdn.redhat.com/xxx.qcow2"
2023-12-16 16:41:34 +08:00
```
2024-10-18 01:02:54 +08:00
#### Optional Parameters
2026-05-29 07:25:17 +08:00
- `--username USERNAME` Set the username
2024-10-18 01:02:54 +08:00
- `--password PASSWORD` Set the password
2025-09-16 00:24:09 +08:00
- `--ssh-key KEY` Set up SSH login public key, [formatted as follows](#--ssh-key). When using public key, password is empty.
2026-05-29 07:25:17 +08:00
- `--ssh-port PORT` Change the SSH port
2025-09-16 00:24:09 +08:00
- `--web-port PORT` Change the Web port (for log observation during installation only)
2026-03-08 23:50:50 +08:00
- `--frpc-config PATH` Add frpc for intranet tunneling. Parameter can be local filepath or HTTP URL of the configuration file.
- `--no-cloud-kernel` Avoid using cloud kernel to prevent black or glitch screens on certain machines; applicable to Debian, Ubuntu, Alpine and openSUSE.
2025-10-31 07:50:45 +08:00
- `--hold 1` Reboot only into install environment, without running installer, only for SSH connect to test network connection.
- `--hold 2` Prevent reboot after installation completes, allowing SSH login to modify system content; the system is mounted at `/target` for Debian/Kali and `/os` for other distros.
2024-10-18 01:02:54 +08:00
2024-08-20 23:52:55 +08:00
> [!TIP]
>
2025-10-31 07:50:45 +08:00
> Can monitor the progress through various methods (SSH, HTTP 80 port, VNC from server provider, serial console).
>
> Even if errors occur during the installation process, SSH is available for manual recovery.
>
> If the target system is not Debian/Kali, run `/trans.sh alpine` can automatically recover to Alpine Linux.
2024-08-20 23:52:55 +08:00
2024-09-06 23:00:35 +08:00
<details>
<summary>Deprecated Features</summary>
2024-09-06 23:00:35 +08:00
2024-10-18 01:02:54 +08:00
Install Debian using a cloud image
- Suitable for machines with slower CPUs
2024-09-06 23:00:35 +08:00
```bash
bash reinstall.sh debian --ci
```
2024-11-26 22:09:05 +08:00
Install CentOS, AlmaLinux, Rocky, Fedora using ISO
2024-10-13 22:58:12 +08:00
2024-10-18 01:02:54 +08:00
- Only supports machines with more than 2G of memory and dynamic IP.
- Username is `root`, Password is `123@@@`, and the SSH port is `22`; modifying them using parameters is not supported.
2024-09-06 23:00:35 +08:00
```bash
bash reinstall.sh centos --installer
bash reinstall.sh almalinux --installer
bash reinstall.sh rocky --installer
bash reinstall.sh fedora --installer
2024-09-06 23:00:35 +08:00
```
2024-10-18 01:02:54 +08:00
Install Ubuntu using ISO
2024-10-13 22:58:12 +08:00
2024-10-18 01:02:54 +08:00
- Only supports machines with more than 1G of memory and dynamic IP.
- Username is `root`, Password is `123@@@`, and the SSH port is `22`; modifying them using parameters is not supported.
2024-09-06 23:00:35 +08:00
```bash
bash reinstall.sh ubuntu --installer
```
</details>
2025-09-16 00:24:09 +08:00
### Feature 2: DD RAW image to hard disk
> [!CAUTION]
>
> This feature will erase **the entire hard disk** of the current system (including other partitions)!
>
2026-03-10 00:09:05 +08:00
> If the script was run by mistake, you can run `bash reinstall.sh reset` before rebooting to cancel the reinstallation operation.
2023-12-16 16:41:34 +08:00
2025-10-31 07:50:45 +08:00
- Supports `raw` and fixed-size `vhd` image formats. Either uncompressed or compressed as `.gz`, `.xz`, `.zst`, `.tar`, `.tar.gz`, `.tar.xz`, `.tar.zst`.
2024-10-18 01:02:54 +08:00
- When deploy a Windows image, the system disk will be automatically expanded, and machines with a static IP will have their IP configured, and may take a few minutes after the first boot for the configuration to take effect.
- When deploy a Linux image, will **NOT** modify any contents of the image.
2026-05-29 07:25:17 +08:00
- The script prompts for a username and password for SSH to view logs during the installation. If left blank, will use `root` and random password.
2024-05-22 22:32:43 +08:00
2023-12-16 16:41:34 +08:00
```bash
2025-02-21 00:30:36 +08:00
bash reinstall.sh dd --img "https://example.com/xxx.xz"
2023-12-16 16:41:34 +08:00
```
2025-05-16 19:06:07 +08:00
#### Optional Parameters
2024-10-18 01:02:54 +08:00
2026-05-29 07:25:17 +08:00
- `--username USERNAME` Set username (for log observation during installation)
- `--password PASSWORD` Set Password (for log observation during installation)
- `--ssh-key KEY` Set up SSH login public key (for log observation during installation), [formatted as follows](#--ssh-key). When using public key, password is empty.
2024-10-18 01:02:54 +08:00
- `--ssh-port PORT` Change SSH port (for log observation during installation)
2026-05-29 07:25:17 +08:00
- `--rdp-port PORT` Change RDP port (DD Windows only)
2024-10-18 01:02:54 +08:00
- `--web-port PORT` Change Web port (for log observation during installation)
2026-05-29 07:25:17 +08:00
- `--allow-ping` Configure Windows Firewall to Allow Ping Responses (DD Windows only)
2026-03-08 23:50:50 +08:00
- `--frpc-config PATH` Add frpc for intranet tunneling (DD Windows only). Parameter can be local filepath or HTTP URL of the configuration file.
- `--cloud-data PATH_OR_URL` Inject cloud-init NoCloud configuration into the DD'd Linux image (DD Linux only)
2025-10-31 07:50:45 +08:00
- `--hold 1` Reboot only into install environment, without running installer, only for SSH connect to test network connection.
- `--hold 2` Prevent reboot after the DD process finishes. For SSH login to modify system content. The Windows system will be mounted at `/os`, but Linux systems will **NOT** be automatically mounted.
2024-10-18 01:02:54 +08:00
> [!TIP]
>
> `--cloud-data` accepts a local directory path or an HTTP base URL. The directory must contain a `user-data` file; `meta-data` and `network-config` are optional:
>
2026-05-29 07:25:17 +08:00
> ```bash
> seed/
> ├── user-data # required
> ├── meta-data # optional
> └── network-config # optional
> ```
>
> ```bash
> # Local directory
> bash reinstall.sh dd --img "https://example.com/xxx.xz" --cloud-data /path/to/seed/
> # HTTP directory
> bash reinstall.sh dd --img "https://example.com/xxx.xz" --cloud-data "https://example.com/seed/"
> ```
2024-08-20 23:52:55 +08:00
> [!TIP]
2025-10-31 07:50:45 +08:00
>
2025-04-15 23:40:58 +08:00
> Can monitor the progress through various methods (SSH, HTTP 80 port, VNC from server provider, serial console).
2025-10-31 07:50:45 +08:00
>
> Even if errors occur during the installation process, SSH is available for manual recovery.
>
> Or Run `/trans.sh alpine` to automatically recover to Alpine Linux.
2024-08-20 23:52:55 +08:00
2026-01-07 21:34:18 +08:00
### Feature 3: Reboot to <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine Live OS
2023-12-16 16:41:34 +08:00
2025-09-16 00:24:09 +08:00
- You can use SSH to backup/restore disk, manually perform DD operations, partition modifications, manual Alpine installation, and other operations.
2026-05-29 07:25:17 +08:00
- The script prompts for a username and password. If left blank, will use `root` and random password.
2025-09-16 00:24:09 +08:00
> [!TIP]
>
> Although the script being run is `reinstall`, this feature **does not** delete any data or perform an automatic reinstallation; manual user operation is required.
2026-01-07 21:34:18 +08:00
>
2025-09-16 00:24:09 +08:00
> If the user does not damage the original system during manual operation, rebooting will return to the original system.
2023-12-16 16:41:34 +08:00
```bash
2025-10-31 07:50:45 +08:00
bash reinstall.sh alpine --hold 1
2023-12-16 16:41:34 +08:00
```
2025-05-16 19:06:07 +08:00
#### Optional Parameters
2024-10-18 01:02:54 +08:00
2026-05-29 07:25:17 +08:00
- `--username USERNAME` Set username
2024-10-18 01:02:54 +08:00
- `--password PASSWORD` Set password
2025-09-16 00:24:09 +08:00
- `--ssh-key KEY` Set up SSH login public key, [formatted as follows](#--ssh-key). When using public key, password is empty.
2026-05-29 07:25:17 +08:00
- `--ssh-port PORT` Change SSH port
2026-03-08 23:50:50 +08:00
- `--frpc-config PATH` Add frpc for intranet tunneling. Parameter can be local filepath or HTTP URL of the configuration file.
2024-10-18 01:02:54 +08:00
2024-05-22 22:32:43 +08:00
### Feature 4: Reboot to <img width="16" height="16" src="https://netboot.xyz/img/favicon.ico" /> netboot.xyz
2024-01-27 23:08:34 +08:00
2024-10-18 01:02:54 +08:00
- Can manually install [more systems](https://github.com/netbootxyz/netboot.xyz?tab=readme-ov-file#what-operating-systems-are-currently-available-on-netbootxyz) using vendor backend VNC.
2025-09-16 00:24:09 +08:00
> [!TIP]
>
> Although the script being run is `reinstall`, this feature **does not** delete any data or perform an automatic reinstallation; manual user operation is required.
2026-01-07 21:34:18 +08:00
>
2025-09-16 00:24:09 +08:00
> If the user does not damage the original system during manual operation, rebooting will return to the original system.
2023-12-16 16:41:34 +08:00
```bash
bash reinstall.sh netboot.xyz
```
2024-01-27 23:08:34 +08:00
![netboot.xyz](https://netboot.xyz/images/netboot.xyz.gif)
2024-05-22 22:32:43 +08:00
### Feature 5: Install <img width="16" height="16" src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png" /> Windows ISO
2023-12-16 16:41:34 +08:00
2024-10-18 01:02:54 +08:00
![Windows Installation](https://github.com/bin456789/reinstall/assets/7548515/07c1aea2-1ce3-4967-904f-aaf9d6eec3f7)
2025-09-16 00:24:09 +08:00
> [!CAUTION]
>
> This feature will erase **the entire hard disk** of the current system (including other partitions)!
>
2026-03-10 00:09:05 +08:00
> If the script was run by mistake, you can run `bash reinstall.sh reset` before rebooting to cancel the reinstallation operation.
2025-09-16 00:24:09 +08:00
2026-05-29 07:25:17 +08:00
- The script prompts for a username and password. If left blank, will use `administrator` and random password.
- In a few languages, the system administrator account is not `administrator`. [Details](https://learn.microsoft.com/archive/technet-wiki/13813.localized-names-for-administrator-account-in-windows#list-of-languages-that-localize-the-administrator-account-name)
- If remote login fails, try adding `.\` before the username, for example, `.\administrator`.
2024-08-20 23:52:55 +08:00
- The machine with a static IP will automatically configure the IP. It may take a few minutes to take effect on the first boot.
2025-10-31 07:50:45 +08:00
- Supports ISO images in any language.
2026-04-28 07:33:09 +08:00
- Automatically bypassing Windows 11 hardware requirements.
2024-05-22 22:32:43 +08:00
#### Supported Systems
2024-10-18 01:02:54 +08:00
- Windows (Vista ~ 11)
- Windows Server (2008 ~ 2025)
- Windows Server Essentials
- Windows Server (Semi) Annual Channel
- Hyper-V Server
- Azure Local (Azure Stack HCI)
2024-05-22 22:32:43 +08:00
2025-05-16 19:06:07 +08:00
#### Method 1: Let the Script Automatically Search for ISO
2024-10-18 01:02:54 +08:00
2026-08-15 22:40:23 +08:00
- The script will search for ISOs from <https://ntriver.org/download-windows-office>, a site that collects official ISOs.
2024-04-05 22:45:59 +08:00
```bash
bash reinstall.sh windows \
2025-02-21 00:30:36 +08:00
--image-name "Windows 11 Enterprise LTSC 2024" \
2024-04-05 22:45:59 +08:00
--lang zh-cn
2023-12-16 16:41:34 +08:00
```
2024-10-01 20:05:25 +08:00
<details>
2026-09-06 11:53:44 +08:00
<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>
2024-10-01 20:05:25 +08:00
2026-08-06 22:13:07 +08:00
Supports these three language format codes. Case insensitive.
| CC Format | CC-CC Format | Language |
| - | - | - |
| ar | ar-sa | Arabic |
| bg | bg-bg | Bulgarian |
| cs | cs-cz | Czech |
| da | da-dk | Danish |
| de | de-de | German |
| el | el-gr | Greek |
| gb | en-gb | Eng_Intl |
| en | en-us | English |
| es | es-es | Spanish |
| mx | es-mx | Spanish_Latam |
| et | et-ee | Estonian |
| fi | fi-fi | Finnish |
| | fr-ca | FrenchCanadian |
| fr | fr-fr | French |
| he | he-il | Hebrew |
| hr | hr-hr | Croatian |
| hu | hu-hu | Hungarian |
| it | it-it | Italian |
| ja | ja-jp | Japanese |
| ko | ko-kr | Korean |
| lt | lt-lt | Lithuanian |
| lv | lv-lv | Latvian |
| no | nb-no | Norwegian |
| nl | nl-nl | Dutch |
| pl | pl-pl | Polish |
| pp | pt-pt | Portuguese |
| pt | pt-br | Brazilian |
| ro | ro-ro | Romanian |
| ru | ru-ru | Russian |
| sk | sk-sk | Slovak |
| sl | sl-si | Slovenian |
| sr | sr-latn / sr-latn-rs | Serbian_Latin |
| sv | sv-se | Swedish |
| th | th-th | Thai |
| tr | tr-tr | Turkish |
| uk | uk-ua | Ukrainian |
| cn | zh-cn | ChnSimp |
| tw | zh-tw | ChnTrad |
| hk | zh-hk | ChnTrad_Hong_Kong |
2024-10-01 20:05:25 +08:00
</details>
2024-08-20 23:52:55 +08:00
#### Method 2: Specify the ISO link manually
2024-10-18 01:02:54 +08:00
- If you don't know the `--image-name`, you can enter any value. After rebooting, connect via SSH and re-enter the correct value based on the error messages.
2024-05-03 21:37:07 +08:00
```bash
bash reinstall.sh windows \
2025-03-20 21:55:38 +08:00
--image-name "Windows 11 Enterprise LTSC 2024 Evaluation" \
2025-02-21 00:30:36 +08:00
--iso "https://go.microsoft.com/fwlink/?linkid=2289029"
2024-05-03 21:37:07 +08:00
```
2025-03-02 21:57:06 +08:00
or Magnet Link
```bash
bash reinstall.sh windows \
--image-name "Windows 11 Enterprise LTSC 2024" \
--iso "magnet:?xt=urn:btih:7352bd2db48c3381dffa783763dc75aa4a6f1cff"
```
2024-05-22 22:32:43 +08:00
<details>
2024-10-18 01:02:54 +08:00
<summary>The following website provides ISO links.</summary>
2024-05-22 22:32:43 +08:00
2025-02-15 00:25:38 +08:00
- General
2026-08-04 21:10:05 +08:00
- <https://ntriver.org/download-windows-office> (Recommended, ISOs are up to date)
2026-08-15 22:40:23 +08:00
- <https://massgrave.dev/genuine-installation-media> (Recommended, ISOs are up to date)
2025-03-02 21:57:06 +08:00
- <https://next.itellyou.cn>
- <https://www.xitongku.com>
2025-02-15 00:25:38 +08:00
- <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>
- Evaluation
- <https://www.microsoft.com/evalcenter/download-windows-11-enterprise>
- <https://www.microsoft.com/evalcenter/download-windows-11-iot-enterprise-ltsc-eval>
- <https://www.microsoft.com/evalcenter/download-windows-server-2012-r2>
- <https://www.microsoft.com/evalcenter/download-windows-server-2016>
- <https://www.microsoft.com/evalcenter/download-windows-server-2019>
- <https://www.microsoft.com/evalcenter/download-windows-server-2022>
- <https://www.microsoft.com/evalcenter/download-windows-server-2025>
- Insider Preview
2025-03-02 21:57:06 +08:00
- <https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewiso>
- <https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver>
2024-05-22 22:32:43 +08:00
</details>
2025-05-16 19:06:07 +08:00
#### Optional Parameters
2023-12-16 16:41:34 +08:00
2026-05-29 07:25:17 +08:00
- `--username USERNAME` Set Username
2024-10-18 01:02:54 +08:00
- `--password PASSWORD` Set Password
- `--rdp-port PORT` Change RDP port
2025-09-16 00:24:09 +08:00
- `--ssh-port PORT` Change SSH port (for log observation during installation only)
- `--web-port PORT` Change Web port (for log observation during installation only)
2026-05-29 07:25:17 +08:00
- `--allow-ping` Configure Windows Firewall to Allow Ping Responses
2025-03-02 21:57:06 +08:00
- `--add-driver INF_OR_DIR` Add additional driver, specifying .inf path, or the folder contains .inf file.
2025-09-16 00:24:09 +08:00
- The driver must be downloaded to current system first.
2025-03-02 21:57:06 +08:00
- This parameter can be set multiple times to add different driver.
- `--no-auto-drivers` Prevent the script automatically download drivers. You need to use `--add-driver` to add the missing drivers.
2026-03-08 23:50:50 +08:00
- `--frpc-config PATH` Add frpc for intranet tunneling. Parameter can be local filepath or HTTP URL of the configuration file.
2025-10-31 07:50:45 +08:00
- `--hold 1` Reboot only into install environment, without running installer, only for SSH connect to test network connection.
- `--hold 2` Allow SSH connections for modifying `boot.wim`, `install.wim` or other contents before rebooting into the official Windows installation program, with the disk mounted at `/os`.
2024-10-18 01:02:54 +08:00
#### The following drivers will be downloaded and installed automatically as needed; use `--no-auto-drivers` to disable this feature
2025-02-15 00:25:38 +08:00
2026-09-06 11:53:44 +08:00
- VirtIO ([Community][virtio-virtio], [Alibaba Cloud][virtio-aliyun], [Tencent Cloud][virtio-qcloud], [GCP][virtio-gcp], [GCP (Win7/2008 SHA-1)][virtio-gcp-win6.1sha1]))
2025-09-16 00:24:09 +08:00
- XEN ([~~Community~~][xen-xen] (unsigned), [Citrix][xen-citrix], [AWS][xen-aws])
2026-09-06 11:53:44 +08:00
- AWS ([ENA Network Adapter][aws-ena], [NVMe Storage Controller][aws-nvme], [VMClock Virtual Clock][aws-vmclock], [PCI Serial][aws-pciserial]))
2025-03-10 22:21:46 +08:00
- GCP ([gVNIC Network Adapter][gcp-gvnic], [GGA Display Adapter][gcp-gga])
- Azure ([MANA Network Adapter][azure-mana])
2026-05-29 07:25:17 +08:00
- 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])
2025-03-10 22:21:46 +08:00
[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
2026-09-06 11:53:44 +08:00
[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/
2025-03-10 22:21:46 +08:00
[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
2026-09-06 11:53:44 +08:00
[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
2025-03-10 22:21:46 +08:00
[azure-mana]: https://learn.microsoft.com/azure/virtual-network/accelerated-networking-mana-windows
2026-03-10 00:09:05 +08:00
[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
2026-05-29 07:25:17 +08:00
[intel-vmd-ultra3]: https://www.intel.com/content/www/us/en/download/920456/intel-rapid-storage-technology-driver-installation-software-for-intel-core-ultra-series-3-platforms.html
2025-04-18 18:42:48 +08:00
[intel-nic-7]: https://www.intel.com/content/www/us/en/download/15590/intel-network-adapter-driver-for-windows-7-final-release.html
2025-03-10 22:21:46 +08:00
[intel-nic-8.1]: https://www.intel.com/content/www/us/en/download/17479/intel-network-adapter-driver-for-windows-8-1.html
[intel-nic-10]: https://www.intel.com/content/www/us/en/download/18293/intel-network-adapter-driver-for-windows-10.html
[intel-nic-11]: https://www.intel.com/content/www/us/en/download/727998/intel-network-adapter-driver-for-microsoft-windows-11.html
[intel-nic-2012]: https://www.intel.com/content/www/us/en/download/16789/intel-network-adapter-driver-for-windows-server-2012.html
[intel-nic-2012-r2]: https://www.intel.com/content/www/us/en/download/17480/intel-network-adapter-driver-for-windows-server-2012-r2.html
[intel-nic-2016]: https://www.intel.com/content/www/us/en/download/18737/intel-network-adapter-driver-for-windows-server-2016.html
[intel-nic-2019]: https://www.intel.com/content/www/us/en/download/19372/intel-network-adapter-driver-for-windows-server-2019.html
[intel-nic-2022]: https://www.intel.com/content/www/us/en/download/706171/intel-network-adapter-driver-for-windows-server-2022.html
[intel-nic-2025]: https://www.intel.com/content/www/us/en/download/838943/intel-network-adapter-driver-for-windows-server-2025.html
2025-02-15 00:25:38 +08:00
2024-10-18 01:02:54 +08:00
#### How to Specify the Image Name `--image-name`
2025-09-16 00:24:09 +08:00
An ISO usually contains multiple system editions, such as Home and Pro. Therefore, you need to use `--image-name` to specify the system edition (image name) to install, case-insensitive.
2024-10-18 01:02:54 +08:00
You can use tools like DISM, DISM++, or Wimlib to query the image names included in the ISO.
#### 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.
2023-12-16 16:41:34 +08:00
![image-name](https://github.com/bin456789/reinstall/assets/7548515/5aae0a9b-61e2-4f66-bb98-d470a6beaac2)
2024-05-22 22:32:43 +08:00
> [!WARNING]
2026-09-06 11:53:44 +08:00
> Vista, Server 2008 and 32-bit systems may lack drivers.
2024-03-17 00:08:48 +08:00
2024-05-22 22:32:43 +08:00
> [!WARNING]
2024-10-01 20:05:25 +08:00
>
2026-09-06 11:53:44 +08:00
> For Vista, 7, Server 2008, Server 2008 R2 installation:
2025-10-31 07:50:45 +08:00
>
> 1. EFI-boot machines must enable CSM.
>
2026-09-06 11:53:44 +08:00
> 2. On Hyper-V / Azure, select Generation 1 VM.
2024-03-17 00:08:48 +08:00
2024-05-22 22:32:43 +08:00
> [!WARNING]
2025-10-31 07:50:45 +08:00
>
2024-05-22 22:32:43 +08:00
> In the Chinese version of Windows 10 LTSC 2021 ISO `zh-cn_windows_10_enterprise_ltsc_2021_x64_dvd_033b7312.iso`, the `wsappx` process may indefinitely consume CPU resources.
>
> The solution is to update the system patches or manually install the `VCLibs` library <https://www.google.com/search?q=ltsc+wsappx>.
2023-12-16 16:41:34 +08:00
2025-10-11 00:01:18 +08:00
> [!WARNING]
2025-10-31 07:50:45 +08:00
>
2025-10-11 00:01:18 +08:00
> When installing Windows ISOs released in `May 2022` or later on GCP, the system may repeatedly reboot during the Windows installation (PE) stage. You can resolve this issue using one of the following two methods:
>
> 1. Add the `--force-boot-mode bios` parameter. The script will install Windows in `BIOS boot + MBR partition table` mode.
2025-10-31 07:50:45 +08:00
>
> (Optional) After installation, you can convert it to `EFI boot + GPT partition table` using the command `MBR2GPT /convert /allowFullOS`.
2025-10-11 00:01:18 +08:00
>
> 2. Create a custom RAW image and install it via DD.
2024-10-18 01:02:54 +08:00
#### Considerations for Installing Windows on ARM
2024-10-01 20:05:25 +08:00
2026-08-15 22:40:23 +08:00
Most ARM cloud server support installing Windows 11.
2024-10-14 22:41:01 +08:00
During the installation process, you might encounter a black screen, and the serial console may display `ConvertPages: failed to find range`, but neither issue affects the installation.
2024-10-01 20:05:25 +08:00
2026-03-10 00:09:05 +08:00
| Compatibility | Cloud Provider | Instance Type | Issues |
| ------------- | -------------- | ----------------------- | ----------------------------------------------------------------------------------- |
| ✔️ | Azure | B2pts_v2 | |
| ✔️ | AWS | T4g | |
| ✔️ | Scaleway | COPARM1 | |
| ✔️ | Gcore | | |
| ❔ | Alibaba Cloud | g6r, c6r, g8y, c8y, r8y | Might hanging at the boot logo during restart; forced reboot will resolve it. |
| ❔ | Oracle Cloud | A1.Flex | Installation success is not guaranteed; newer instances are more likely to succeed. |
| ❌ | Google Cloud | t2a | Missing network card drivers |
2024-10-01 20:05:25 +08:00
2026-03-10 00:09:05 +08:00
### Cancel the reinstallation
- If the script was run by mistake, you can run this command to cancel the reinstallation operation.
- Must be run before rebooting.
```bash
bash reinstall.sh reset
```
2025-09-16 00:24:09 +08:00
## Parameter Format
2024-10-01 20:05:25 +08:00
2025-09-16 00:24:09 +08:00
### --ssh-key
- `--ssh-key "ssh-rsa ..."`
- `--ssh-key "ssh-ed25519 ..."`
- `--ssh-key "ecdsa-sha2-nistp256/384/521 ..."`
- `--ssh-key http://path/to/public_key`
2026-09-06 11:53:44 +08:00
- `--ssh-key github:your_username` or `--ssh-key gh:your_username`
- `--ssh-key gitlab:your_username` or `--ssh-key gl:your_username`
2025-09-16 00:24:09 +08:00
- `--ssh-key /path/to/public_key`
- `--ssh-key C:\path\to\public_key`
2024-10-01 20:05:25 +08:00
2025-10-18 23:41:24 +08:00
## How to Use an Old Version
According to the Law of Bug Conservation, fixing old bugs often introduces new ones.
2026-04-28 07:33:09 +08:00
If a bug occurs, try using an older version to see if it works.
2025-10-18 23:41:24 +08:00
Go to <https://github.com/bin456789/reinstall/commits/main> and find the old version’s `commit_id` on the right side.
2026-04-28 07:33:09 +08:00
Replace `xxxxxxxx` in the script below with the `commit_id` of an older version and run the script.
2025-10-18 23:41:24 +08:00
```bash
2026-04-28 07:33:09 +08:00
commit_id=xxxxxxxx
2025-10-18 23:41:24 +08:00
curl -O https://raw.githubusercontent.com/bin456789/reinstall/$commit_id/reinstall.sh || wget -O ${_##*/} $_
sed -i "/^confhome.*main$/s/main/$commit_id/" reinstall.sh
bash reinstall.sh ...
```
2024-11-23 23:50:12 +08:00
## How to Modify the Script for Your Own
2024-07-14 22:11:53 +08:00
1. Fork this repository.
2024-08-19 00:42:12 +08:00
2. Modify the `confhome` and `confhome_cn` at the beginning of `reinstall.sh` and `reinstall.bat`.
2024-07-14 22:11:53 +08:00
3. Make changes to the other code.
2026-04-28 07:33:09 +08:00
4. Download and run your `reinstall.sh` or `reinstall.bat`."
2024-07-14 22:11:53 +08:00
2024-02-02 00:49:24 +08:00
## Thanks
2024-01-19 11:55:35 +08:00
2024-02-02 00:49:24 +08:00
Thanks to the following businesses for providing free servers.
[![Oracle Cloud](https://github.com/bin456789/reinstall/assets/7548515/8b430ed4-8344-4f96-b4da-c2bda031cc90)](https://www.oracle.com/cloud/)
2024-03-01 00:22:04 +08:00
[![DartNode](https://github.com/bin456789/reinstall/assets/7548515/435d6740-bcdd-4f3a-a196-2f60ae397f17)](https://dartnode.com/)