One-Command OS Reinstall: Automate Windows & Linux Installations
The open‑source "reinstall" script provides a single‑command solution to reinstall or switch between Windows and Linux systems, supporting multiple distributions, automatic driver handling, low‑resource devices, BIOS/EFI and ARM boot, with detailed usage examples and emergency rescue features.
Project Overview
The reinstall script is an open‑source one‑click DD/reinstall tool that enables cross‑system, zero‑threshold OS installation. It supports all Windows versions from Vista to 11 (including Server editions) and 19 mainstream Linux distributions such as Ubuntu, Debian, CentOS, Alpine, etc., allowing any direction of reinstall (Linux→Windows, Windows→Linux, etc.).
All resources are fetched live from official sources, ensuring a clean system without bundled packages. The script is optimized for low‑spec hardware, works with as little as 256 MB RAM, supports BIOS/EFI and ARM architectures, and uses partition‑table IDs to avoid accidental disk overwrites.
Key Features
Cross‑system free reinstall: Supports Linux→Linux, Linux→Windows, Windows→Windows, and Windows→Linux without being limited by the current OS.
Comprehensive OS coverage: Installs 19 major Linux distros and all Windows versions using official ISO images, guaranteeing high security.
Automatic network driver handling: Detects static, dynamic, IPv6, dual‑NIC scenarios and auto‑installs drivers for KVM, XEN, AWS, Azure, etc.
Extreme adaptability: Runs on low‑end devices, supports BIOS/EFI, ARM, and prevents wrong‑disk writes.
Flexible operation: Auto‑fetches Windows ISO or accepts custom ISO links (including magnet links); can boot into Alpine rescue or netboot.xyz for additional installations.
Purity and safety: Uses only official ISO or cloud images, with no custom packages, ensuring a clean and secure installation.
Quick Installation
Download the script (choose the appropriate source for overseas or domestic servers):
# Overseas server
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O reinstall.sh $_
# Domestic server
curl -O https://cnb.cool/bin456789/reinstall/-/git/raw/main/reinstall.sh || wget -O reinstall.sh $_On Windows, disable real‑time protection, run as administrator, then execute:
# Overseas server
certutil -urlcache -f -split https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat
# Domestic server
certutil -urlcache -f -split https://cnb.cool/bin456789/reinstall/-/git/raw/main/reinstall.batUsage Examples
Install a Linux distribution
Install the latest Ubuntu: bash reinstall.sh ubuntu Specify a version, e.g., Debian 12: bash reinstall.sh debian 12 Minimal Ubuntu installation: bash reinstall.sh ubuntu 24.04 --minimal Default credentials: user root, password 123@@@.
Install a Windows version
Install Windows 11 Pro (script auto‑fetches the official ISO):
# From Linux
bash reinstall.sh windows --image-name "Windows 11 Pro" --lang zh-cn
# From Windows
reinstall.bat windows --image-name "Windows 11 Pro" --lang zh-cnUse a custom ISO:
bash reinstall.sh windows --image-name "Windows 10 Enterprise LTSC 2021" --iso "https://drive.massgrave.dev/en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso"Set a custom password:
reinstall.bat windows --image-name "Windows 11 Pro" --lang zh-cn --password "MyPass123"Emergency Functions
Boot into an Alpine rescue system (SSH available): bash reinstall.sh alpine --hold=1 Boot to netboot.xyz for additional OS choices:
bash reinstall.sh netboot.xyzConclusion
The reinstall project turns a painful, manual OS reinstall process into a single‑command operation, combining system installation, rescue, and high automation into a versatile VPS management tool. It saves developers and regular users considerable time and effort.
Project URL
https://github.com/bin456789/reinstall
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
macrozheng
Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
