Operations 7 min read

One‑Command OS Reinstall: Automate Linux, Windows, and NAS Deployments

The open‑source "reinstall" shell script automates full‑system reinstall for Linux, Windows, and popular NAS platforms, handling hardware detection, network configuration, and disk partitioning with a single command, making VPS and server provisioning fast, secure, and hassle‑free.

Liangxu Linux
Liangxu Linux
Liangxu Linux
One‑Command OS Reinstall: Automate Linux, Windows, and NAS Deployments

Introduction

Reinstall is an open‑source shell‑script project designed to automate operating‑system reinstall tasks on servers and VPSes. It eliminates manual partitioning, ISO handling, and network setup by intelligently detecting hardware, IP configuration, and disk layout, allowing a complete system switch with a single command.

Key Features

All‑direction reinstall support : Linux↔Linux, Linux↔Windows, Windows↔Windows conversions.

Official ISO installation : Directly pulls official ISO images, avoiding third‑party security risks.

Zero‑configuration automation : Auto‑detects IP, gateway, and disk partitions, skipping manual input.

Supported Systems

Multiple Linux Distributions

Covers 19 mainstream distros such as Debian, Ubuntu, CentOS Stream, AlmaLinux, Fedora, openSUSE, Arch Linux, and more, including both legacy and rolling‑release versions.

Windows Versions

Supports official ISO installation for Windows Vista through Windows 11/Server 2025, automatically injecting VirtIO drivers for virtualization compatibility.

NAS Platforms

Includes support for lightweight NAS systems like Feiniu FNOS.

Smart Compatibility Design

Hardware & Architecture

Supports x86 and ARM CPUs, BIOS/UEFI boot, and virtualization platforms KVM, VMware, Hyper‑V (excluding OpenVZ/LXC).

Optimized for low‑spec VPS: Alpine/Debian can run on 256 MB RAM, Ubuntu/CentOS on 512 MB.

Complex Network Handling

Automatically identifies dynamic or static IPs, IPv4/IPv6 dual‑stack, /32 or /128 subnets, and gateways outside the subnet range without user input.

Full Automation & Usability

Unattended Installation

Pre‑sets SSH port and default credentials ( root/123@@@ or administrator/123@@@) for immediate login after install.

Allows custom mirror sources (e.g., Tsinghua, Alibaba Cloud) to speed up downloads and avoid timeout.

Parameterized Deployment

# Example: custom Windows 11 Pro installation
bash reinstall.sh windows \
  --iso="https://example.com/win11.iso" \
  --image-name="Windows 11 Pro" \
  --lang zh-cn

Parameters let you specify ISO URL, system version, language, and disk layout.

Security & Reliability

Official source installation : All ISO and driver files are fetched directly from official mirrors, preventing tampering.

Disk identification protection : Uses partition‑table IDs to ensure the correct disk is targeted, avoiding accidental overwrites.

Extended Features & Scenarios

DD (Disk Dump) Mode

bash reinstall.sh dd --img="https://example.com/custom-system.gz"

Enables custom DD image installation for emergency recovery when network boot fails.

Instant Boot Tools

Can reboot into Alpine Live OS (memory‑based rescue) or netboot.xyz (network boot manager).

China‑specific Optimizations

Provides a domestic CDN source (cnb.cool) to bypass GitHub access restrictions.

Practical Example: Installing Feiniu FNOS on an Idle VPS

Environment Requirements

x86 architecture (ARM not supported), at least 512 MB RAM, and a minimum 8 GB disk.

Download Script

curl -O https://cnb.cool/bin456789/reinstall/-/git/raw/main/reinstall.sh || wget -O reinstall.sh $_

Run Installation

bash reinstall.sh fnos

Enter the system password twice (for web login).

Set disk size (default 8 GB, recommended 16 GB+).

Access After Reboot

Open http://IP:5666 in a browser to reach the web interface.

Web interface screenshot
Web interface screenshot

Open‑Source Repository

https://github.com/bin456789/reinstall

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

AutomationLinuxVPSWindowsNASshell scriptOS reinstall
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.