本脚本作者:Vicer, dansnow
真·究极·一键重装脚本
支持重装的系统:
- Debian 9/10
- Ubuntu 18.04/16.04
- CentOS 6/7
- 自定义DD镜像
特性/优化:
- 自动获取IP地址、网关、子网掩码
- 自动判断网络环境,选择国内/外镜像,再也不用担心卡半天了
- 超级懒人一键化,无需复杂的命令
- 解决萌咖脚本中一些导致安装错误的问题
- CentOS 7 镜像抛弃LVM,回归ext4,减少不稳定因素
使用方法非常简单:
wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh
简介
突破没有VNC,没有救援模式,内存比dd包小的限制。使用Debian Live CD中的busybox做中间媒介,经过复杂的处理,使本机的网络参数传进Windows操作系统中,即使没有DHCP能够让Windows获取网络参数,也能让Windows操作系统在开机的第一时间能够连通网络。
允许使用的环境
1.独立服务器
2.虚拟化:KVM/XEN/VMWARE/Hyper-V等(注意:不支持Docker、OpenVZ、LXC等)
系统需求
1、Debian/Ubuntu/CentOS系统(由GRUB引导)
2、wget用来下载文件,获取公网IP
3、ip获取网关,掩码等
4、sed、awk、grep处理文本
5、VNC远程桌面(可选)
6、无DHCP时额外需求: iconv
# Debian/Ubuntu
# 一般自带
# RedHat/CentOS
yum install glibc-common
使用教程
注意事项:
Vicer脚本目前不支持重装为CentOS 7系统,支持CentOS 6.9以下版本。
重装的系统源自官方发行版。
安装过程全自动进行,无需VNC操作,无需进入救援模式。
系统安装完成后的默认用户名为root,默认密码为:MoeClub.org
重装为CentOS 6.9:
# CentOS 6.9 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -c 6.9 -v 64 -a
# CentOS 6.9 32位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -c 6.9 -v 32 -a
重装为Debian:
以下命令中的 -d 后面为Debian版本号,-v 后面为64位/32位,可根据需求进行替换。
# Debian 8 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 8 -v 64 -a
# Debian 9 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 9 -v 64 -a
# Debian 10 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 10 -v 64 -a
重装为Ubuntu:
以下命令中的 -u 后面为Ubuntu版本号,-v 后面为64位/32位,可根据需求进行替换。
# Ubuntu 12.04 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 12.04 -v 64 -a
# Ubuntu 14.04 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 14.04 -v 64 -a
# Ubuntu 16.04 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 16.04 -v 64 -a
# Ubuntu 18.04 64位:
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 18.04 -v 64 -a
安装其他DD包(比如Windows)
1、需要定制dd包
默认Administrator账户登录(可选)
默认开启远程桌面
适当的调整防火墙(可选)
2、需要相关的虚拟化驱动,VirtIO驱动,XEN驱动。
3、dd包解压后的体积不能超过机器第一块硬盘的最大容积
wget --no-check-certificate -qO DebianNET.sh 'https://moeclub.org/attachment/LinuxShell/DebianNET.sh' && bash DebianNET.sh -dd '[Windows dd包直连地址]'
以上系统如果在安装时需要指定网络参数(非dhcp,用于下载相关环境),可以按下面命令执行,将命令当中的X.X.X.X替换为自己的网络参数。
–ip-addr :IP Address//IP地址
–ip-mask :Netmask //子网掩码
–ip-gate :Gateway //网关
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/wn789/xitong/master/InstallNET.sh' && bash InstallNET.sh --ip-addr X.X.X.X --ip-mask X.X.X.X --ip-gate X.X.X.X -dd 'https://moeclub.org/get-win7embx86-auto'
附可用的dd包
由www.moerats.com提供的Vicer的dd包备用地址(用于KVM,Hyper-V,其他自测,)
在你的机器上全新安装,如果你有VNC,可以看到全部过程。
Windows Embedded Standard 7(Thin PC)作为底包:
https://moeclub.org/get-win7embx86-auto
该包只添加了VirtIO驱动,理论上仅能在KVM,Hyper-V构架下正常运行。
如需在其他虚拟化构架下运行,请自行添加相关虚拟化驱动。
备用地址:
https://down.moerats.com/Windows/win7embx86-auto.gz
Windows Embedded 8.1 Industry Pro x64 (2.87G;KVM;XEN;Hyper-V;未激活)
https://down.moerats.com/Windows/win8embx64-auto.gz
远程登陆账号为: Administrator
远程登陆密码为: Vicer
如果因此违反了TOS,萌咖和本博主不负任何责任。
Windows Server 2008/2012R2:
http://down.80host.com/iso/dd/WS2008R2Enterprise-Joodle-Template.gz
http://down.80host.com/iso/dd/Windows2012R2-Joodle-Template.gz
Username:Administrator
Password:Password147
Laiboke.com制作的中文版2012R2
http://down.80host.com/iso/dd/Win2012R2ZW.gz
Username:Administrator
Password:Laiboke.com
安装完成后建议立刻修改密码。