vjsun

  • Home主页
  • Windows系统
  • Linux系统
  • Skill科技
  • Share分享
  • Talk杂谈
Vjsun
个人记录博客,自己的后花园
  1. 首页
  2. Linux系统
  3. 正文

一键DD网络重装纯净系统---脚本合集

4 2 月, 2023 3115点热度 0人点赞 0条评论

玩机器多年,已经养成拿到新的机器就先DD一下系统,为什么也说不清,早年用的aili,tx,还有一些平台,老是感觉不安全(当年我忘记用哪个平台使用ss,被警告了)。所以,就养成新机器都去DD,其实也不知道DD的是否安全,但是,明面的比暗地里的安全吧。下边的DD系统是多家汇总,我都基本使用过,还没出什么问题,就是使用的机器不同,有的可以使用,有的不能使用,所以才需要汇总多个DD.

 一:

提前准备:

Debian series(Debian / Ubuntu):

apt update -y
apt install wget -y

Redhat series(CentOS / AlmaLinux / RockyLinux / OracleLinux / Fedora / VzLinux):

yum update --allowerasing -y
yum install wget -y

代码说明:

-firmware 额外的驱动支持
-d Debian系统 后面是系统版本号
-c Centos系统 后面是系统版本号
-v 后面写64位 32位
-a auto,全自动无人值守安装
--mirror 后面是镜像源地址
-p 后面写自定义密码
–ip-addr ifconfig -a 后获取到的 例:194.87.xxx.xxx
–ip-gate route -n 后获取到的 例 194.87.xxx.xxx
–ip-mask 255.255.xxx.xx

旧:

bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 11 -v 64 -a -firmware -p 自定义密码

新:

bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p 密码 -port 端口 -a -firmware

ps:甲骨文、三毛、Vir、RN等大部分VPS通用,三毛、甲骨文 记得去掉 -firmware,如果你是腾讯云记得卸载组件 否则会导致报错 DD失败

systemctl stop tat_agent
systemctl disable tat_agent
rm -rf /etc/systemd/system/tat_agent.service
rm -fr /usr/local/qcloud

ps -A | grep agent
# 检查看是否还有腾讯云组件
# kill 这个进程

二:

支持 Redhat 7 8 9,包括 CentOS,AlmaLinux,RockyLinux,Fedora,Debian 系 Redhat 系,ARM64 AMD64 自动识别转换,免去手动添加硬件架构参数,grub1 和 grub2 丝滑切换,Debian 系和 Redhat 系可无限互装,自动设置访客时区,连接国内源优化,以及更加智能的动态、静态网络参数配置,对 IPv4 IPv6 双栈机,IPv6 单栈机,甲骨文优化良好,

Github 地址:https://github.com/leitbogioro/Tools

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

参数详情:
-debian 9/10/11 : Debian 9+

-centos 7/8/9-stream: CentOS 7+

-almalinux/alma 8/9: AlmaLinux 8+

-rockylinux/rocky 8/9: RockyLinux 8+

-fedora 34/35/36/37: Fedora 34+

-ubuntu 16.04/18.04/20.04: Ubuntu 16.04~20.04

-mirror "有效的源链接"

-port "1~65535"

-pwd '自定义密码,不可太复杂,不推荐带特殊符号,默认:LeitboGi0ro'

--network "dhcp/auto or static/manual" 动态或静态网络,可选,可不添加,脚本自动识别

带两个横杠的参数应该放在脚本运行最后面。

  1. bash InstallNET.sh -debian 11

完全示范本:下边的代码请参考上边:参数详情  进行删减

  1. bash InstallNET.sh -debian/ubuntu/centos/almalinux/rockylinux/fedora(os type) 11(os version) -version 64(os bit) -port "your server port" -pwd "your server password" -mirror "a valid url for linux image source" -dd/--image "dd image url" -filetype "gz or xz" -timezone "like Asia/Tokyo etc" --dhcp-static/--ip-addr 'x.x.x.x'(ip address) --ip-mask 'x.x.x.x'(subnet mask) --ip-gate 'x.x.x.x'(gateway) -firmware(Debian with hardware drivers)
  2. bash InstallNET.sh -debian 12 -port 8888 -pwd “pass618” –network “static” #简易代码

ps:遇到下边的问题,更换系统或者代码,再试试

解决代码:mkdir /boot/grub2 && grub-mkconfig -o /boot/grub2/grub.cfg
[Debian] [bullseye] [amd64] Downloading... grep: 
(standard input): binary file matches 
Error! grub.cfg.
标签: liunx windows
最后更新:7 5 月, 2026

vjsun

这个人很懒,什么都没留下

打赏 点赞
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2026 VJSUN. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang