一键重装脚本

用过最多的一键重装脚本就是萌咖的,但自从萌咖消失后,脚本缺乏人维护,已经有许多功能不能适应新的需求了,比如有许多人说重装的时候,引导文件、固件之类的下载不了,那是因为你的机器在国内,连接到这些源如果是在国外,连接速度会很慢,甚至长期等待后会下载失败,我对萌咖的脚本做出了一些功能上的改进,可以让脚本获取的源全部指定为国内,这样就不会出现卡下载不动的问题。

脚本地址:

https://github.com/leitbogioro/Tools/

先SSH登陆你的机器,用以下命令下载脚本:

wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/WedTools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh

以Debian 9为例,你的机器对应以下哪个地域,就可以用对应的命令来重装,根据服务器地址指定不同的源,可以提升下载速度,以下这些源都是官方的,不用怕被魔改了加了什么奇奇怪怪的东西。

国内下载指令添加了cdimage:ustc参数,从中科大下载cdimage,避免即便指定国内的源,但cdimage还指向的是国外,导致连接缓慢无法下载的问题。

美国:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.us.debian.org/debian/' -firmware

日本1:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.yz.yamagata-u.ac.jp/debian/' -firmware

日本2:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.riken.jp/Linux/debian/debian/' -firmware

香港:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.hk.debian.org/debian/' -firmware

新加坡:
b

ash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.sg.debian.org/debian/' -firmware

韩国:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.riken.jp/Linux/debian/debian/' -firmware

英国:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.uk.debian.org/debian/' -firmware

德国:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.de.debian.org/debian/' -firmware

法国:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.fr.debian.org/debian/' -firmware

印度:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://mirror.cse.iitk.ac.in/debian/' -firmware

加拿大:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.ca.debian.org/debian/' -firmware

俄罗斯:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://ftp.ru.debian.org/debian/' -firmware

中国1 清华大学镜像:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'https://mirrors.tuna.tsinghua.edu.cn/debian/' -firmware --cdimage 'ustc'

中国2 163镜像:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://mirrors.163.com/debian/' -firmware --cdimage 'ustc'

中国3 腾讯云镜像:

bash InstallNET.sh -d 9 -v 64 -a --mirror 'http://mirrors.cloud.tencent.com/debian/' -firmware --cdimage 'ustc'

重装完成后,默认登陆端口22,SSH密码是:

LeitboGi0ro

,重装后请尽快修改密码

自定义网关和IP的用法:(例如安装centos7.6)

wget --no-check-certificate -qO InstallNET.sh 'https://db.ci/os/InstallNET.sh' && chmod a+x InstallNET.sh
bash InstallNET.sh -c 7.6.1810 -v 64 -a --ip-addr 服务器ip --ip-gate 服务器网关 --ip-mask 子网掩码 --mirror 'http://linuxsoft.cern.ch/centos-vault/' -firmware
点赞