reinstall: One-Click OS Reinstallation Script for VPS Servers

Summary
The `reinstall` script by bin456789 provides a robust one-click solution for reinstalling operating systems on VPS servers. It supports a wide array of Linux distributions and Windows versions, enabling seamless transitions between different OS types. This powerful tool automates IP configuration, optimizes for low-spec environments, and ensures reliable installations using official media.
Repository Info
Tags
Click on any tag to explore related repositories
Introduction
The reinstall script by bin456789 is a highly-starred, one-click solution designed for reinstalling operating systems on Virtual Private Servers (VPS). It simplifies the complex process of deploying a new OS, supporting a vast range of Linux distributions and Windows versions. This versatile script handles reinstallation in any direction, whether it's Linux to Linux, Linux to Windows, Windows to Windows, or Windows to Linux.
Key features include:
- Support for 19 common Linux distributions.
- One-click reinstallation to Windows using official original ISOs, with automatic fetching of ISO links and installation of public cloud drivers like VirtIO.
- Automatic and intelligent IP configuration, supporting various network setups.
- Optimized for low-spec servers, requiring less memory than official netboot methods.
- Ensures data safety by identifying hard drives using partition table IDs.
- Supports BIOS, EFI boot, and ARM servers.
- All resources are obtained in real-time from mirror sites, with no homemade images included.
Installation
To get started with reinstall, download the script appropriate for your current operating system.
For Linux Servers
Use curl or wget to download the script:
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O ${_##*/} $_
For Windows Servers
Important: Before proceeding, disable 'Real-time protection' in Windows Defender, as it may prevent certutil from downloading files.
certutil -urlcache -f -split https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat
For Windows 7, Vista, and Server 2008 (R2) users, manual download might be necessary due to outdated TLS/SHA-256 support. You would need to download reinstall.bat and setup-x86.exe (Cygwin) from the official GitHub repository and Cygwin website respectively, then run reinstall.bat.
Examples
The reinstall script offers various functionalities. Here are a few common use cases:
Install a Linux Distribution
This example installs Ubuntu 22.04. Remember, this will erase the entire hard disk.
bash reinstall.sh ubuntu 22.04
You can also specify a password or SSH key:
bash reinstall.sh debian 12 --password "YourStrongPassword" --ssh-key "ssh-rsa AAAAB3NzaC..."
DD RAW Image to Hard Disk
Deploy a raw or compressed image directly to your hard drive. This also erases the entire disk.
bash reinstall.sh dd --img "https://example.com/path/to/your/image.xz"
Install Windows from ISO
Install Windows, letting the script automatically search for the ISO or providing a direct link.
bash reinstall.sh windows --image-name "Windows 11 Enterprise LTSC 2024" --lang en-us
Or with a specific ISO link:
bash reinstall.sh windows --image-name "Windows 10 Pro" --iso "https://go.microsoft.com/fwlink/?linkid=..."
Common optional parameters like --password, --ssh-key, --ssh-port, and --rdp-port are available across different features.
Why Use reinstall?
- Simplicity and Speed: Automates complex OS reinstallation with a single command, saving significant time and effort.
- Extensive OS Support: Offers broad compatibility with numerous Linux distributions and Windows versions, including server editions.
- Reliability: Uses official ISOs and intelligently integrates necessary drivers (like VirtIO) for a stable installation.
- Smart Networking: Automatically configures IP addresses, adapting to static, dynamic, IPv6-only, and complex subnet scenarios.
- Resource Efficiency: Optimized to run effectively on low-spec VPS environments.
- Flexibility: Supports various boot modes (BIOS, EFI) and ARM architectures, making it suitable for diverse server setups.
- Safety Measures: Employs partition table IDs to ensure the correct disk is targeted, minimizing the risk of data loss.
Links
- GitHub Repository: bin456789/reinstall