https://github.com/p7e4/reinstall
Reinstall your VPS with cloud image
https://github.com/p7e4/reinstall
dd debian reinstall ubuntu vps
Last synced: 26 days ago
JSON representation
Reinstall your VPS with cloud image
- Host: GitHub
- URL: https://github.com/p7e4/reinstall
- Owner: p7e4
- License: gpl-3.0
- Created: 2025-01-01T06:47:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-01T07:15:28.000Z (over 1 year ago)
- Last Synced: 2025-01-01T08:18:47.120Z (over 1 year ago)
- Topics: dd, debian, reinstall, ubuntu, vps
- Language: Shell
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Reinstall
A simple script to reinstall your VPS to major Linux system using cloud image.
## Features
- **short code**: under 300 lines of Bash, easy to read and audit
- **mirror setup**: automatically set up the system package manager mirror for CN region
- **cloud image**: use official cloud image, all tweaks via `cloud-init`, no hidden changes
## System Support
| System | Version | Image | Size |
|-----------|---------|------------------------------------------------|------|
| Debian | 13 | debian-13-genericcloud-amd64.qcow2 | 323M |
| Ubuntu | 26.04 | resolute-server-cloudimg-amd64v3.img | 818M |
| Fedora | 44 | Fedora-Cloud-Base-Generic-44-1.7.x86_64.qcow2 | 556M |
| Rocky | 10 | Rocky-10-GenericCloud-Base.latest.x86_64.qcow2 | 548M |
| AlmaLinux | 10 | AlmaLinux-10-GenericCloud-latest.x86_64.qcow2 | 488M |
| Archlinux | rolling | Arch-Linux-x86_64-cloudimg.qcow2 | 525M |
The host system require **Debian 10/Ubuntu 18/Fedora 42/Rocky Linux 9(target system not fedora/archlinux)/AlmaLinux 9/archlinux and above**, older version might work but not been fully tested.
> The minimum memory requirement for the host server should exceed the size of the image, better double.
## Quick Start
```
# Download the reinstall.sh
# or https://raw.githubusercontent.com/p7e4/reinstall/refs/heads/main/reinstall.sh
curl -O https://cdn.jsdelivr.net/gh/p7e4/reinstall/reinstall.sh
# reinstall system to debian and setup password
bash reinstall.sh -p -s debian
# reinstall system to debian and setup ssh key
bash reinstall.sh -k -s debian
```
after reboot, ssh to your server with root user
## Parameters
| Optional | Default | Description |
|----------|--------------|---------------------------|
| -k | none | ssh key authentication |
| -p | none | password |
| -n | vm-$(system) | hostname |
| -s | none | target system, one of debian/ubuntu/fedora/rocky/almalinux/arch |
## Related Repositories
- [bin456789/reinstall](https://github.com/bin456789/reinstall)
- [bohanyang/debi](https://github.com/bohanyang/debi)