Operations 7 min read

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

The open‑source "reinstall" shell script automates full system reinstall across Linux, Windows, and NAS platforms with a single command, handling hardware detection, network configuration, and disk partitioning while offering customizable options and built‑in security features.

Architect's Tech Stack
Architect's Tech Stack
Architect's Tech Stack
One-Command OS Reinstall: Automate Linux, Windows, and NAS Deployments

Introduction

Reinstall is an open‑source shell script designed to simplify and fully automate operating system reinstallation on servers, VPS, and NAS devices, eliminating the traditionally complex steps of partitioning, driver handling, and network setup.

Key Features

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

Official ISO direct install : Uses official ISO sources to avoid third‑party security risks.

Zero‑configuration automation : Automatically 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, supporting both legacy and rolling‑release versions.

Windows Versions

Installs any Windows version from Vista up to Windows 11/Server 2025 using official ISO images and injects Virtio drivers for virtualization compatibility.

NAS Platforms

Supports lightweight NAS systems like Feiniu FNOS for quick storage deployments.

Intelligent Compatibility Design

Hardware and Architecture

Works on x86 and ARM CPUs, BIOS/UEFI boot modes, and virtual platforms such as KVM, VMware, and Hyper‑V (excluding OpenVZ/LXC). Optimized for low‑resource VPS: Alpine/Debian can run on 256 MB RAM, Ubuntu/CentOS on 512 MB.

Complex Network Handling

Detects dynamic/static IPs, supports IPv4/IPv6 dual‑stack, /32 or /128 subnets, and gateways outside the subnet without requiring manual network parameter entry.

Full Automation and Usability

Unattended Installation

Pre‑sets SSH port and default credentials ( root/123@@@ or administrator/123@@@) so you can log in immediately after installation.

Allows custom mirror sources (e.g., Tsinghua or Alibaba Cloud) to accelerate downloads and avoid timeouts.

Parameterized Flexible 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

You can specify image URLs, system versions, language, disk layout, and other parameters.

Security and Reliability

Official Source Installation

All ISO images and drivers are fetched directly from official mirrors, eliminating third‑party tampering risks.

Disk Identification Protection

Uses partition‑table IDs to precisely identify target disks, preventing accidental overwrites.

Extended Functions and Scenarios

DD (Disk Dump) Mode

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

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

Instant Boot Tools

Can boot into an Alpine Live OS for fault repair or use netboot.xyz as a network boot manager.

Practical Example

Installing Feiniu FNOS on an idle VPS:

Requirements

x86 architecture, ≥512 MB RAM, ≥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 (used for web login).

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

After reboot, access the web interface at http://IP:5666.

Open‑Source Repository

https://github.com/bin456789/reinstall

LinuxVPSWindowsNASshell scriptOS reinstall
Architect's Tech Stack
Written by

Architect's Tech Stack

Java backend, microservices, distributed systems, containerized programming, and more.

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.