# bin456789/reinstall: One-Click OS Replacement for VPS Servers

> reinstall is a GPL-3.0 shell script by bin456789 that replaces the operating system on a running VPS without physical access, supporting 20 Linux distributions and Windows installations from official ISOs. It works in any direction: Linux to Linux, Linux to Windows, Windows to Linux, or Windows to Windows.

**bin456789/reinstall** — 一键DD/重装脚本 (One-click reinstall OS on VPS)

- Repository: https://github.com/bin456789/reinstall
- Stars: 13,375 · Forks: 2,162
- Language: Shell
- License: GPL-3.0
- Published: 2026-09-21 · Updated: 2026-09-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/bin456789-reinstall

## What reinstall Solves and Who Uses It

Virtual private server providers typically offer a fixed menu of operating system images through their control panel. Customers get the images the provider maintains, which are often older versions, customized builds with extra packages, or distributions the provider chose rather than what the customer wants. Some providers offer a rescue or netboot mode, but not all do, and rescue modes often restrict what you can install.

reinstall solves that constraint. It runs from inside the existing operating system, replaces it entirely during a reboot, and brings up the new OS when the machine comes back online. The README describes support for any-direction reinstallation: Linux to Linux, Linux to Windows, Windows to Windows, and Windows to Linux. This flexibility matters for operators who received a Windows VPS from a provider but need Linux, or who want to move from one Linux distribution to another without waiting for the provider to add it to their image catalog.

The script also specifically addresses low-resource VPS instances. The README notes that it needs less memory than a standard netboot installer, with Alpine and Debian requiring as little as 256 MB RAM. This makes it usable on the cheapest tier of servers that many hosting providers offer, which often have 512 MB or less of RAM.

For the Windows installation path, the README distinguishes reinstall from scripts that use custom images. reinstall fetches official ISO files and installs from them, with automatic installation of VirtIO and other public cloud drivers where needed. The README also documents automatic handling of IP configuration, including static versus dynamic detection, /32 and /128 prefix lengths, gateway-not-in-subnet scenarios, IPv6-only setups, and IPv4/IPv6 on separate network interfaces.

## How the Script Handles Any-Direction OS Replacement

The core mechanism is a two-stage reboot process. In the first stage, the script modifies the bootloader configuration (BIOS or EFI) of the running server to boot into a minimal in-memory installer environment rather than the installed OS. In the second stage, that installer environment performs the actual operating system installation, then reboots into the new OS.

For Linux installations, the README states that reinstall supports 20 common distributions. These include Alpine (3.21 through 3.24), Debian (versions 9 through 13), Kali, Ubuntu (18.04 LTS through 26.04 LTS), CentOS Stream, Fedora, Anolis, AlmaLinux, Rocky Linux, Oracle Linux, OpenCloudOS, openEuler, openSUSE, NixOS, Arch Linux, Arch Linux ARM, Gentoo, and others. Each distribution has documented minimum RAM and disk requirements.

For Windows, the script locates official ISO files from Microsoft's content delivery network, downloads them, and performs an unattended installation. The README notes automatic installation of VirtIO drivers (needed for KVM-based hypervisors common in public clouds) and other public cloud drivers.

Disk identification uses partition table IDs throughout the process, not device names like /dev/sda. The README explicitly states this design choice ensures the script writes to the correct disk even when device naming order differs between the installation environment and the running system. This matters on servers with multiple disks, where /dev/sda in a rescue environment might not be the same physical disk as /dev/sda in the running OS.

The script supports both BIOS and EFI boot environments, as well as ARM architecture servers. The repository file fix-eth-name.sh and fix-eth-name.service suggest network interface naming is addressed as a post-install step, consistent with the README's claim that IP configuration is handled automatically.

## System Requirements by Target Distribution

The README provides a requirements table for each supported target operating system. Alpine requires 256 MB of RAM and 1 GB of disk. Debian and Kali also require 256 MB RAM but between 1 and 1.5 GB of disk depending on version.

Ubuntu requires 512 MB of RAM (marked with an asterisk indicating this is the minimum) and 2 GB of disk. RHEL-family distributions including AlmaLinux, Rocky Linux, Oracle Linux, Anolis, OpenCloudOS, and CentOS Stream all require 512 MB RAM and 5 GB of disk. Fedora shares those requirements. openEuler requires 512 MB RAM and 5 GB of disk. openSUSE requires 512 MB RAM and 5 GB of disk. NixOS requires 512 MB RAM and 5 GB of disk. Arch Linux and Arch Linux ARM require 512 MB RAM and 5 GB of disk. Gentoo requires 512 MB RAM and 5 GB of disk.

The 256 MB floor for Alpine and Debian means reinstall works on the smallest VPS tiers that many providers sell. A server with 512 MB RAM can run most of the supported Linux distributions. The Windows installation path has its own requirements, which the README notes in the Windows ISO section.

The README states that the original (source) operating system can be any system listed in the table, meaning the script runs from any of these distributions and targets any of them. A server running Ubuntu can reinstall to Alpine, to Windows, or to CentOS Stream, without needing a separate rescue environment from the hosting provider. This bidirectional flexibility is the primary operational advantage over using a provider's built-in reinstall feature, which typically allows only switching between the images the provider offers.

## Five Capabilities Beyond Simple Linux Reinstallation

The README structures reinstall's functionality into five numbered features. The first is one-click reinstallation to Linux, covering all 20 supported distributions. The second is DD (disk dump) raw image writing, which allows writing any custom raw disk image to the VPS disk, useful for specialized appliances or pre-configured images that do not use a standard Linux installer.

The third feature is booting to Alpine Linux Live OS in memory. This brings the server into a minimal in-memory operating system without touching the disk, which allows disk recovery, diagnostics, or manual installation steps without committing to a full reinstall. The fourth feature is booting to netboot.xyz, a network boot menu that provides access to dozens of operating system installers via the internet.

The fifth feature is Windows installation from official ISOs. The script locates the ISO, downloads it, handles driver installation, and completes an unattended Windows setup. The repository includes utility scripts for Windows post-installation tasks: windows-set-netconf.bat, windows-change-rdp-port.bat, windows-allow-ping.bat, windows-del-gpo.bat, windows-resize.bat, windows-frpc.bat, windows-driver-utils.sh, and windows-setup.bat. These suggest the project also addresses common Windows VPS configuration tasks after the OS is installed.

The repository includes frpc-example.toml and frpc.service, indicating support for FRP (Fast Reverse Proxy) configuration. This is relevant for VPS operators who use FRP to maintain a management tunnel to the server during and after the reinstall process, when the server's network configuration might be temporarily disrupted. The logviewer.html and logviewer-nginx.conf files suggest there is a web-based log viewer for monitoring the reinstall progress.

## What reinstall Cannot Do

reinstall is not a configuration management tool. After the new OS comes up, reinstall has placed a clean system on the disk; it does not provision software, set up users beyond the system defaults, or apply application configuration. Any post-install automation must come from a separate layer: Ansible, cloud-init, a shell script, or manual setup.

The script depends on internet access to download distribution packages and ISO files at install time. The README states that all resources are fetched from official mirror sources in real time; there are no custom packages bundled with reinstall. This means a VPS with no outbound internet access, or one in a network segment with strict egress filtering, cannot use reinstall for any installation mode that requires downloading a distribution.

Reinstall rewrites the disk. There is no snapshot or backup step in the process. Any data on the server is lost when the reinstall completes. Operators who need to preserve data must create backups before running the script. The README describes a cancel reinstall feature (linked in the quick start), suggesting there is a window to abort the process before the disk is written, but once the second-stage installer runs, the original OS data is gone.

The script has no idempotency guarantee. Running it twice performs two reinstallations, each wiping what the previous run installed. It is a one-time installation tool, not an ongoing configuration enforcement system.

The README is written primarily in Chinese (the file is README.md), with README.en.md providing an English version. This means documentation for specific edge cases or recent changes may appear in the Chinese version first. The repository has no GitHub releases; versioning is tracked through commits on the main branch only.

## Comparing reinstall with Standard netboot.xyz

netboot.xyz is the natural comparison point. Both tools exist to install operating systems on a server without physical access. The difference is in scope and automation.

netboot.xyz provides a boot menu with many operating system installers. You boot into it, select an OS, and complete the installation interactively or with a preseed configuration you prepare separately. It is a flexible boot environment, not an automated installer. You still need to handle IP configuration, disk layout, and driver installation yourself unless you have prepared detailed preseed or kickstart configurations.

reinstall automates more of that process. The README's claim about automatic IP configuration covers scenarios that manual netboot.xyz installations would require explicit configuration for: /32 prefix lengths, /128 IPv6 prefixes, gateways outside the subnet, and split IPv4/IPv6 network interfaces. These edge cases are common on VPS providers using unusual network configurations, and handling them manually through a netboot.xyz installation requires knowing the exact network setup before you start.

For Windows, the difference is more pronounced. Installing Windows via netboot.xyz typically requires hosting your own WinPE environment or WDS server. reinstall's approach of fetching official ISOs and handling driver installation automatically is less infrastructure-intensive.

The trade-off is that netboot.xyz supports more operating systems and allows more manual control over the installation process. reinstall covers 20 distributions plus Windows and automates the hard parts. Teams that need an OS not in reinstall's supported list, or that need a custom disk layout, will need netboot.xyz or a provider's rescue mode instead.

One of reinstall's features is actually booting to netboot.xyz itself (feature 4), so the two are complementary for operators who want the automated path for common cases and the manual path for edge cases.

## License, Maintenance, and Mirror Dependency

The project is licensed under GPL-3.0. That license requires any redistributed modifications of reinstall to also be released under GPL-3.0. For private use on your own VPS fleet, GPL-3.0 places no restrictions: you can modify the script and run it internally without publishing the changes. The restriction applies only when distributing modified versions to others.

The repository has no GitHub releases. The main branch received its last push on 2026-09-26, which is very recent. Development is tracked through commits rather than tagged versions. This means there is no stable version to pin to; operators who want reproducibility must pin to a specific commit hash rather than a version tag.

Because reinstall fetches all installation resources from official distribution mirrors at runtime, its behavior depends on those mirrors being available. If Alpine's mirror, Debian's mirror, or Microsoft's ISO servers are unreachable from the VPS's network, the corresponding installation mode will fail. This is an inherent constraint of the no-bundled-packages design: it keeps the script small and always uses current versions of distributions, but it introduces a runtime dependency on external servers.

The .github/ directory in the repository suggests CI configuration exists, and the Codacy and CodeFactor badges in the README indicate automated code quality checking is set up. The project also has a Telegram channel (@reinstall_os) linked in the README for community support and feedback.

## Conclusion

reinstall is the right tool for a VPS operator who needs to replace the operating system on a server that the hosting provider did not give a rescue mode for, or who wants to switch from a provider-supplied custom image to a clean official distribution. It is not a backup tool, a configuration management system, or a post-deployment automation layer. The project has no GitHub releases; the main branch received its last push on 2026-09-26. Being licensed under GPL-3.0 means any redistributed modifications of the script must also be released under GPL-3.0.

## FAQ

### Which Linux distributions can reinstall deploy on a VPS?

The README documents 20 supported distributions including Alpine (3.21-3.24), Debian (9-13), Ubuntu (18.04-26.04 LTS), CentOS Stream, Fedora, AlmaLinux, Rocky Linux, Oracle Linux, Arch Linux, NixOS, Gentoo, openSUSE, and others. Each has documented RAM and disk minimums.

### Does reinstall support installing Windows on a VPS?

Yes. The README describes a Windows ISO installation feature that fetches official Microsoft ISO files and installs Windows with automatic VirtIO and public cloud driver setup. The repository also includes several Windows utility scripts for post-installation configuration tasks.

### What is the minimum RAM required to use reinstall?

The minimum is 256 MB for Alpine Linux and Debian. Ubuntu and most other supported Linux distributions require 512 MB. The README notes that reinstall needs less memory than a standard netboot installer, which makes it practical for low-spec VPS instances.

## Sources

- [bin456789/reinstall on GitHub](https://github.com/bin456789/reinstall)
- [Issues](https://github.com/bin456789/reinstall/issues)
- [License: GPL-3.0](https://github.com/bin456789/reinstall/blob/main/LICENSE)
- [README](https://github.com/bin456789/reinstall/blob/main/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/bin456789-reinstall
