[小技巧] DD刷系统 reinstall: 从Linux/Windows重装到 CentOS/Alma/Rocky/Fedora/Ubuntu/Alpine/Debian/Windows
date
Nov 13, 2023
slug
tip-reinstall-os
status
Published
summary
小技巧 DD 系统
tags
tip
type
Post
URL
Problem & Summary
- ‣
Solution
# Linxu => Others
下载:
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
# 国内
curl -O https://ghps.cc/https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
安装 Linux: 
bash reinstall.sh centos   7|8|9  (8|9 为 stream 版本)
                  alma     8|9
                  rocky    8|9
                  fedora   37|38
                  debian   10|11|12
                  ubuntu   20.04|22.04
                  alpine   3.16|3.17|3.18
                  opensuse 15.4|15.5|tumbleweed (只支持云镜像)
                  arch     (只支持 amd64 云镜像)
                  gentoo   (只支持 amd64 云镜像)
                  不输入版本号,则安装最新版
可选参数:         --ci     强制使用云镜像
安装 Windows:
bash reinstall.sh windows \
     --iso='https://example.com/en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso' \
     --image-name='Windows 10 Enterprise LTSC 2021'
参数说明
--iso 原版镜像链接,无需集成 VirtIO、Xen、AWS、GCP 驱动
--image-name 指定要安装的映像,不区分大小写,两边要有引号,例如:
'Windows 7 Ultimate'
'Windows 10 Enterprise LTSC 2021'
'Windows 11 Pro'
'Windows Server 2022 SERVERDATACENTER'
dd:
bash reinstall.sh dd --img=https://example.com/xxx.gz
重启:
reboot
# Windows => Others
下载 https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat
管理员权限打开 cmd/powershell
reinstall.bat centos-7 (或其他系统)
本脚本所有功能皆可在 Windows 下使用,包括重装到Linux/Windows/dd
centos-7/8/9 (centos 8/9 为 stream 版本)
alma-8/9
rocky-8/9
fedora-37/38
ubuntu-20.04/22.04
alpine-3.16/3.17/3.18
debian-10/11/12
windows (见下方注意事项)
dd
支持 32 位系统 (BIOS)、64 位系统 (BIOS/UEFI),测试成功的系统有 7 10 11 2022
经测试不支持甲骨文云的 ARM
安装 Windows 需要以下参数
--iso           iso 链接,不需要提前添加 virtio 驱动
--image-name    系统全名,不区分大小写,两边要有引号,例如:
                'Windows 7 Ultimate'
                'Windows 10 Enterprise LTSC 2021'
                'Windows 11 Pro'
                'Windows Server 2022 SERVERDATACENTER' 
                
提示:iso 链接可以到 https://archive.org 上面找
内存要求:
debian 384M
centos/alma/rocky/fedora 1G
alpine ?
ubuntu ?
windows 1G
网络要求:
要求有 IPv4、DHCPv4
默认用户名 / 密码:
root            123@@@
administrator   123@@@
Screenshots
