Hugh's Blog

DD 重装系统

使用萌咖脚本:https://moeclub.org/2018/04/03/603

默认用户:root,默认密码:MoeClub.org

# redhat, centos
yum install -y xz openssl gawk file

# debian, ubuntu
apt-get install -y xz-utils openssl gawk file

# 下载脚本
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && chmod +x InstallNET.sh

# 参数说明
# -d/--debian [dist-name]
# -u/--ubuntu [dist-name] 
# -c/--centos [dist-version]
# -v/--ver [32/i386|64/amd64]
# --ip-addr/--ip-gate/--ip-mask
# -apt/-yum/--mirror # 使用自定义源
# -dd/--image # 使用自定义镜像
# -a/-m # 是否手动操作 a为自动安装

# 使用默认源
./InstallNET.sh -d 10 -v 64 -a # debian
./InstallNET.sh -u 18.04 -v 64 -a # ubuntu
 
# 使用自定义源
./InstallNET.sh -c 6.9 -v 64 -a --mirror 'http://mirror.centos.org/centos'
./InstallNET.sh -u 18.04 -v 64 -a --mirror 'http://archive.ubuntu.com/ubuntu'

# 使用自定义镜像
./InstallNET.sh -dd 'https://moeclub.org/get-win7embx86-auto'

最近买了台腾讯云轻量,但总是重装失败,最后使用了以下的脚本:

# linux默认密码:Pwd@Linux
# centos默认密码:Pwd@CentOS
wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh