服务器dd重装纯净linux

Linux
1933 0

以下是萌咖版本
所需环境

架构:KVM/XEN,不支持OpenVZ。
系统:Debian/Ubuntu/CentOS

重装为CentOS:
以下命令中的 -c 后面为CentOS版本号,-v 后面为64位/32位,可根据需求进行替换。

# CentOS 6.10 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -c 6.10 -v 64 -a
# CentOS 6.10 32位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -c 6.10 -v 32 -a

重装为Debian:
以下命令中的 -d 后面为Debian版本号,-v 后面为64位/32位,可根据需求进行替换。

# Debian 8 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -d 8 -v 64 -a
# Debian 9 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -d 9 -v 64 -a
# (国内)Debian 10 64位:
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 10 -v 64 -a -p "root密码" -port "ssh端口" --mirror 'https://mirrors.ustc.edu.cn/debian'
# (国内) Debian 11 64位:
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -a -p "root密码" -port "ssh端口" --mirror 'https://mirrors.ustc.edu.cn/debian'

重装为Ubuntu:
以下命令中的 -u 后面为Ubuntu版本号,-v 后面为64位/32位,可根据需求进行替换。

# Ubuntu 12.04 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 12.04 -v 64 -a
# Ubuntu 14.04 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 14.04 -v 64 -a
# Ubuntu 16.04 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 16.04 -v 64 -a
# Ubuntu 18.04 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 18.04 -v 64 -a
# Ubuntu 20.04 64位:
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 20.04 -v 64 -a

关于系统重装过程
运行包含正确系统版本号的脚本后,新系统的安装会自动进行,无需人工干预。

可能的三种情况:

正常情况下10分钟左右就可以安装成功了,期间可以在VNC中观察安装过程:遇到卡住的回车即可

dd之后失联:

可能是网卡没有自启

ifconfig #查看网卡 例如我的:ens5
vim /etc/network/interfaces
#添加以下两行实现网卡自启 dhcp自动获取ip
auto ens5
iface ens5 inet dhcp
#务必把ens5修改成你自己的网卡名称
最后更新 2023-11-02
评论 ( 0 )
评论已关闭