【全自动】Debian/Ubuntu/CentOS网络重装一键脚本

本一键脚本在萌咖大佬的脚本基础上开发,实现了懒人式一键网络重装 Debian / Ubuntu / CentOS 系统及dd方式安装系统。解决了云服务商提供模板镜像体积过大、预装软件过多、不够纯净等问题。

使用方法

wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh

支持重装的系统

  • Ubuntu 18.04/16.04
  • Debian 9/10
  • CentOS 6
  • CentOS 7 (DD方式)
  • 自定义DD镜像

特性 / 优化

  • 自动获取IP地址、网关、子网掩码
  • 自动判断网络环境,选择国内/外镜像,解决速度慢的问题
  • 懒人一键化,无需复杂的命令
  • 解决萌咖脚本中一些导致安装错误的问题
  • CentOS 7 镜像抛弃LVM,回归ext4,减少不稳定因素

注意

  • 重装后系统密码均在脚本中有提供,安装后请尽快修改密码,Linux系统建议启用密钥登陆。
  • OpenVZ / LXC 架构系统不适用

问题解决办法

如果出现以下提示而不能dd

Auto Mode insatll [Debian] [stretch] [amd64].

[Debian] [stretch] [amd64] Downloading...
Error, Not found interfaces config.

ssh运行下面 两个命令就可以dd了

命令1

mkdir /etc/network/interfaces.d

命令2

echo "# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug ens3
iface ens3 inet dhcp

" > /etc/network/interfaces
© 版权声明
THE END
喜欢就支持以下吧
点赞1赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容