explaingit

bin456789/reinstall

11,840ShellAudience · ops devopsComplexity · 3/5Setup · moderate

TLDR

A shell script that reinstalls the operating system on a VPS server remotely, switching between Linux distributions or to Windows with a single command and no control panel needed.

Mindmap

mindmap
  root((reinstall))
    What it does
      Reinstalls OS remotely
      Supports Linux and Windows
      Handles network config
    Modes
      Linux distros
      Windows install
      DD image write
      RAM-only Alpine
      Netboot menu
    Use cases
      VPS migration
      OS switching
      Clean environment
    Audience
      Sysadmins
      VPS users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Switch your VPS from one Linux distribution to another (e.g., Ubuntu to Debian) without needing a hosting control panel.

USE CASE 2

Install Windows on a Linux VPS using official Microsoft ISOs with automatic cloud driver setup.

USE CASE 3

Boot a VPS into a lightweight Alpine Linux RAM environment to perform manual disk operations safely.

Tech stack

Shell

Getting it running

Difficulty · moderate Time to first run · 30min

Requires SSH root access to a VPS and the confidence to overwrite the running OS disk.

In plain English

reinstall is a shell script for VPS servers that lets you replace the operating system on a virtual machine with a single command. It covers both Linux and Windows targets, meaning you can switch from Linux to Linux, Linux to Windows, Windows to Linux, or Windows to Windows without needing physical access to the machine or a control panel reinstall feature. For Linux targets, the script supports 19 common distributions including Debian, Ubuntu, Alpine, Fedora, CentOS Stream, Rocky Linux, AlmaLinux, NixOS, and others across a range of versions. For Windows, the script uses official Microsoft ISOs rather than custom or modified images, and it automatically locates the download link and installs required cloud drivers such as VirtIO. The script has five main modes. The first reinstalls to a Linux distribution. The second writes a raw disk image (DD format) directly to the machine's disk. The third boots the server into Alpine Linux running entirely from memory, useful for performing manual operations on a clean environment. The fourth boots to netboot.xyz, a tool that provides a menu of operating systems to install over the network. The fifth reinstalls to Windows. Network configuration is handled automatically, including support for static IPs, unusual subnet configurations like /32 or /128 addresses, pure IPv6 setups, and machines where IPv4 and IPv6 use separate network interfaces. The script uses disk partition IDs rather than device names to identify the correct target disk, reducing the risk of writing to the wrong location. It is also optimized for low-memory VPS instances, requiring less RAM than standard network boot approaches. All resources are fetched from official distribution mirrors at installation time, so the script itself does not bundle any OS files or custom packages. Both BIOS and EFI boot modes are supported, along with ARM-based servers.

Copy-paste prompts

Prompt 1
I want to reinstall my VPS from Ubuntu 22.04 to Debian 12 using the reinstall script. Walk me through the exact command and any flags I need for a VPS with a static IP and /32 subnet.
Prompt 2
Using the reinstall script, how do I install Windows Server 2022 on a Linux VPS? What happens to my VirtIO drivers?
Prompt 3
My VPS has only 512MB RAM and I need to reinstall the OS. How does the reinstall script handle low-memory environments, and which Linux distros are safe to target?
Prompt 4
I have a pure-IPv6 VPS with no IPv4 address. Can the reinstall script handle this network setup? What flags or config do I need?
Open on GitHub → Explain another repo

← bin456789 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.