[](https://github.com/aschey/vercel-tokei)
<!-- [](https://github.com/XAMPPRocky/tokei_rs) -->
[](https://github.com/aschey/vercel-tokei)
Reinstall server with one-click [中文](README.md)
One-Click Script to Reinstall System [中文](README.md)
## Highlights
- Support installation of 17 common Linux distributions.
- Support for installing Windows using the official original ISO. The script can automatically search for the ISO and drivers.
- Support reinstallation in any direction, meaning `Linux to Linux`, `Linux to Win`, `Win to Win`, `Win to Linux`.
- Specifically tailored for low-spec machines, addressing insufficient memory that prevents network installation.
- Automatically detect dynamic and static IPv4 / IPv6, eliminating the need to fill in IP / subnet mask / gateway.
- Support ARM, BIOS, EFI boot, with original system supporting LVM, BTRFS.
- No homemade packages included, all resources obtained in real-time from source sites.
- Supports installation of 17 common Linux distributions
- Supports installation of official Windows ISO, automatically finds ISO links, and integrates virtual machine drivers
- Supports installation in any direction, i.e., `Linux to Linux`, `Linux to Windows`, `Windows to Windows`, `Windows to Linux`
- No need to input IP parameters; automatically recognizes dynamic and static IPs, supports `/32`, `/128`, `gateway outside subnet`, `pure IPv6`, `dual NIC` and other special network configurations
- 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
- Supports BIOS and EFI boot, and ARM architecture
- No homemades image included, all resources are obtained in real-time from source sites
- Includes many comments.
## System Requirements
@ -52,17 +52,6 @@ Reinstall server with one-click [中文](README.md)
>
> Please use <https://github.com/LloydAsp/OsMutation> instead.
> All features can be used on both Linux and Windows.
>
> on Linux, execute `bash reinstall.sh`
>
> on Windows, execute `reinstall.bat`
**All features** can be used on both Linux and Windows.
- on Linux, execute `bash reinstall.sh`
- on Windows, execute `reinstall.bat`
### Feature 1: Install <imgwidth="16"height="16"src="https://www.kernel.org/theme/images/logos/favicon.png"/> Linux
- If no version number is entered, the latest version will be installed.
- Does not include a boot partition (except for Fedora), nor a swap partition, maximizing disk space utilization.
- When installing on a virtual machine, it will automatically select a official limmed-down kernel.
- During the initial login, you may receive a password error prompt; just wait a moment and it should be resolved.
> [!TIP]
> When installing Debian / Kali, x86 architectures can monitor the installation progress through VNC in the background, while ARM architectures can use the serial console.
>
> When installing other systems, can monitor the progress through various methods (SSH, HTTP 80 port, VNC in the background, serial console).
> [!IMPORTANT]
> To install Red Hat, you need to provide the `qcow2` image link obtained from the following website.
>
> See <https://access.redhat.com/downloads/content/rhel>
- On virtual machines, the appropriate official slimmed-down kernel will be automatically installed.
- To install Red Hat, you need to provide the `qcow2` image link obtained from <https://access.redhat.com/downloads/content/rhel>.
- Username `root`, password `123@@@`. It may take a few minutes for the password to take effect on the first boot.
```bash
bash reinstall.sh centos 9
anolis 7|8
alma 8|9
rocky 8|9
redhat 8|9 --img='http://xxx.qcow2'
redhat 8|9 --img='http://xxx.com/xxx.qcow2'
opencloudos 8|9
oracle 7|8|9
fedora 39|40
@ -165,21 +143,29 @@ bash reinstall.sh centos 9
gentoo
```
### Feature 2: DD
> [!TIP]
> When installing Debian / Kali, x86 architectures can monitor the installation progress through VNC in the background, while ARM architectures can use the serial console.
>
> When installing other systems, can monitor the progress through various methods (SSH, HTTP 80 port, VNC in the background, serial console).
> Even if errors occur during the installation process, you can still install Alpine via SSH.
- Supports gzip, xz formats.
- A machine with a static IP running DD Windows will automatically configure the IP, which may take a few minutes to complete after the first boot.
### Feature 2: DD
> [!TIP]
> Can monitor the progress through various methods (SSH, HTTP 80 port, VNC in the background, serial console).
- Supports `gzip` and `xz` formatted images
- When using DD with a Windows image, the script will automatically expand the system partition. For static IP machines, the IP will be configured automatically, and it may take a few minutes to take effect on first boot
### Feature 5: Install <imgwidth="16"height="16"src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png"/> Windows ISO
- Can automatically searching for most iso links. Need to set the language using `--lang`, default is `en-us`.
- Machines with static IP addresses will have their IPs automatically configured after installation.
- Can bypass Windows 11 installation restrictions.
- Username `administrator`, password `123@@@`
- If remote login fails, try using the username `.\administrator`.
- The machine with a static IP will automatically configure the IP. It may take a few minutes to take effect on the first boot.
> [!TIP]
> The script uses <https://massgrave.dev/genuine-installation-media.html> as the ISO source. All ISOs provided are official originals.
#### Method 1: Allow the script to automatically find the ISO
> [!IMPORTANT]
> Note that parameters should be enclosed in quotation marks.
- The script will search for ISO files from <https://massgrave.dev/genuine-installation-media.html>. The ISOs provided on this site are all official versions.
```bash
bash reinstall.sh windows \
@ -215,7 +199,9 @@ bash reinstall.sh windows \
--lang zh-cn
```
- You can also specify an ISO link.
#### Method 2: Specify the ISO link manually
- 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.
> Note that parameters should be enclosed in quotation marks.
<details>
<summary>The following website provides iso links.</summary>
- Massgrave
- <https://massgrave.dev/genuine-installation-media.html> (Recommended, iso sourced from official channels, updated monthly, includes the latest patches)
- Microsoft
- <https://www.microsoft.com/software-download/windows10> (Need to open it with a mobile User-Agent)
- <https://massgrave.dev/genuine-installation-media.html> (Recommended, iso sourced from official channels, updated monthly, includes the latest patches)
- <https://www.microsoft.com/software-download/windows10> (Need to open it with a mobile User-Agent)
[](https://github.com/aschey/vercel-tokei)
<!-- [](https://github.com/XAMPPRocky/tokei_rs) -->
[](https://github.com/aschey/vercel-tokei)
一键重装脚本 [English](README.en.md)
## 亮点
- 支持安装 17 种常见 Linux 发行版
- 支持用官方原版 iso 安装 Windows,并且脚本会自动查找 iso 和驱动
- 支持任意方向重装,也就是支持 `Linux to Linux`、`Linux to Win`、`Win to Win`、`Win to Linux`
- 专门适配低配小鸡,解决内存过少导致无法进行网络安装
- 自动判断动静态 IPv4 / IPv6,无需填写 IP / 掩码 / 网关
- 支持 ARM,支持 BIOS、EFI 引导,原系统支持 LVM、BTRFS
- 支持安装官方原版 Windows iso,自动查找 iso 链接、集成虚拟机驱动
- 支持任意方向重装,即 `Linux to Linux`、`Linux to Windows`、`Windows to Windows`、`Windows to Linux`
- 无需填写 IP 参数,自动识别动静态,支持 `/32`、`/128`、`网关不在子网范围内`、`纯 IPv6`、`双网卡` 等特殊网络
### 功能 5: 安装 <imgwidth="16"height="16"src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png"/> Windows ISO
- 支持自动查找大部分 iso 链接,需指定语言 `--lang`,默认 `en-us`
- 静态 IP 的机器,安装后会自动配置好 IP
- 能够绕过 Windows 11 安装限制
- 用户名 `administrator` 密码 `123@@@`
- 如果远程登录失败,尝试使用用户名 `.\administrator`
- 静态机器会自动配置好 IP,可能首次开机几分钟后才生效
> [!TIP]
> 脚本以 <https://massgrave.dev/genuine-installation-media.html> 作为 iso 镜像查找源。所有 iso 都是官方原版。
#### 方法 1: 让脚本自动查找 ISO
> [!IMPORTANT]
> 注意参数两边有引号。
- 脚本会从 <https://massgrave.dev/genuine-installation-media.html> 查找 iso,该网站提供的 iso 都是官方原版