Network-Reinstall-System-Modify.sh 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. #!/bin/bash
  2. ## License: GPL
  3. ## The CXT Version of one-click network reinstallation system Magic revision.
  4. ## It can reinstall CentOS, Rocky, Debian, Ubuntu, Oracle and other General Operating Systems (continuously added) via the network in one click.
  5. ## It can reinstall Windwos 2022, 2019, 2016, 2012R2, Windows 10, 11 and other Windows systems (continuously added) via the network in one click.
  6. ## Support GRUB or GRUB2 for installing a clean minimal system.
  7. ## Technical support is provided by the CXT (CXTHHHHH.com). (based on the original Version of Vicer)
  8. ## Magic Modify Version author:
  9. ## Default root password: cxthhhhh.com
  10. ## WebSite: https://cxthhhhh.com
  11. ## Written By CXT (CXTHHHHH.com)
  12. ## Original Version author:
  13. ## Blog: https://moeclub.org
  14. ## Written By MoeClub.org (Vicer)
  15. CXTaddLine="$1"
  16. CXTaddVER=""
  17. CXTisUEFI=""
  18. CXTmyipapi=""
  19. CXTisCN="No"
  20. if [[ $EUID -ne 0 ]]; then
  21. clear
  22. echo "错误: 重装脚本必须使用root权限执行" 1>&2
  23. echo "Error: This Reinstall script must be run as root!" 1>&2
  24. exit 1
  25. fi
  26. echo -e "\n\n\n"
  27. clear
  28. echo -e "\n"
  29. echo "---------------------------------------------------------------------------------------------------------------------"
  30. echo -e "\033[33m 一键网络重装系统 - 魔改版 版本:V5.3.0 更新:2022年07月18日 \033[0m"
  31. echo -e "\033[33m Network-Reinstall-System-Modify Tools V5.3.0 2022/07/18 \033[0m"
  32. echo "---------------------------------------------------------------------------------------------------------------------"
  33. echo -e "\033[33m 一键网络重装系统 - 魔改版(适用于Linux / Windows) \033[0m"
  34. echo -e "\033[33m 系统需求: 任何带有GRUB或GRUB2的Linux操作系统即可运行, 当前推荐安装的系统为: Rocky8/Debian11/Ubuntu22 \033[0m"
  35. echo -e "\n"
  36. echo -e "\033[33m [Magic Modify] Reinstall the system (any Windows / Linux) requires only network and one click \033[0m"
  37. echo -e "\033[33m System requirements: Any Linux system with GRUB or GRUB2, recommended Rocky8/Debian11/Ubuntu22 \033[0m"
  38. echo -e "\n"
  39. echo -e "\033[33m 官方更新地址(Official update address):CXT - Enjoy Life | 生活、技术、交友、分享 \033[0m"
  40. echo -e "\033[33m https://cxthhhhh.com/Network-Reinstall-System-Modify \033[0m"
  41. echo "---------------------------------------------------------------------------------------------------------------------"
  42. echo " 默认密码: cxthhhhh.com"
  43. echo " Default password: cxthhhhh.com"
  44. echo "---------------------------------------------------------------------------------------------------------------------"
  45. echo -e "\n"
  46. sleep 6s
  47. echo "---------------------------------------------------------------------------------------------------------------------"
  48. echo " 对当前系统环境进行处理. . ."
  49. echo " Pre-environment preparation. . ."
  50. echo "---------------------------------------------------------------------------------------------------------------------"
  51. echo -e "\n"
  52. sleep 2s
  53. if [ -f "/usr/bin/apt-get" ];then
  54. isDebian=`cat /etc/issue|grep Debian`
  55. if [ "$isDebian" != "" ];then
  56. echo '当前系统 是 Debian'
  57. echo 'Current system is Debian'
  58. apt-get install -y xz-utils openssl gawk file wget curl
  59. apt install -y xz-utils openssl gawk file wget curl
  60. sleep 3s
  61. else
  62. echo '当前系统 是 Ubuntu'
  63. echo 'Current system is Ubuntu'
  64. apt-get install -y xz-utils openssl gawk file wget curl
  65. apt install -y xz-utils openssl gawk file wget curl
  66. sleep 3s
  67. fi
  68. else
  69. echo '当前系统 是 CentOS/Rocky/Oracle/RHEL'
  70. echo 'Current system is CentOS/Rocky/Oracle/RHEL'
  71. yum install -y xz openssl gawk file wget curl
  72. dnf install -y xz openssl gawk file wget curl
  73. sleep 3s
  74. fi
  75. echo "---------------------------------------------------------------------------------------------------------------------"
  76. echo " 对当前系统环境进行处理. . . 【OK】"
  77. echo " Pre-environment preparation. . . 【OK】"
  78. echo -e "\n"
  79. echo " 检测系统信息. . . "
  80. echo " Detection system information. . . "
  81. echo "---------------------------------------------------------------------------------------------------------------------"
  82. echo -e "\n"
  83. sleep 1s
  84. CXTDTYPE=`fdisk -l | grep -o gpt | head -1`
  85. if [ $CXTDTYPE == "gpt" ] || [ $CXTDTYPE == "GPT" ];then
  86. echo "UEFI..."
  87. CXTisUEFI="是(True)"
  88. else
  89. echo "Legacy..."
  90. CXTisUEFI="否(False)"
  91. fi
  92. case `uname -m` in aarch64|arm64) CXTaddVER="arm64";; x86|i386|i686) CXTaddVER="i386";; x86_64|amd64) CXTaddVER="amd64";; *) CXTaddVER="";; esac
  93. CXTmyipapi=$(wget --no-check-certificate -qO- https://api.myip.com | grep "\"country\":\"China\"")
  94. if [[ "$CXTmyipapi" != "" ]];then
  95. CXTisCN="Yes"
  96. fi
  97. if [ $CXTisCN != "Yes" ];then
  98. echo "Core Download(Global)..."
  99. #wget -O
  100. wget --no-check-certificate -qO ~/Core_Install.sh 'https://cxthhhhh.com/CXT-Library/Network-Reinstall-System-Modify/CoreShell/Core_Install_v5.3.sh' && chmod a+x ~/Core_Install.sh
  101. CentOSMirrors=""
  102. CentOSVaultMirrors=""
  103. DebianMirrors=""
  104. UbuntuMirrors=""
  105. else
  106. echo "Core Download(CN)..."
  107. #wget -O
  108. wget --no-check-certificate -qO ~/Core_Install.sh 'https://caoxiaotian.com/CXT-Library/Network-Reinstall-System-Modify/CoreShell/Core_Install_v5.3.sh' && chmod a+x ~/Core_Install.sh
  109. CXTrandom=$RANDOM
  110. if [ $[CXTrandom%2] == "0" ];then
  111. echo "本次随机使用阿里源"
  112. CentOSMirrors="--mirror http://mirrors.aliyun.com/centos/"
  113. CentOSVaultMirrors="--mirror http://mirrors.aliyun.com/centos-vault/"
  114. DebianMirrors="--mirror http://mirrors.aliyun.com/debian/"
  115. UbuntuMirrors="--mirror http://mirrors.aliyun.com/ubuntu/"
  116. else
  117. echo "本次随机使用清华源"
  118. CentOSMirrors="--mirror http://mirrors.tuna.tsinghua.edu.cn/centos/"
  119. CentOSVaultMirrors="--mirror http://mirrors.tuna.tsinghua.edu.cn/centos-vault/"
  120. DebianMirrors="--mirror http://mirrors.tuna.tsinghua.edu.cn/debian/"
  121. UbuntuMirrors="--mirror http://mirrors.tuna.tsinghua.edu.cn/ubuntu/"
  122. fi
  123. fi
  124. echo "---------------------------------------------------------------------------------------------------------------------"
  125. echo " 系统信息如下. . . 【OK】"
  126. echo " System information is as follows. . . 【OK】"
  127. echo -e "\n"
  128. echo "你的系统架构是:$CXTaddVER"
  129. echo "Your system firmware architecture is: $CXTaddVER"
  130. echo -e "\n"
  131. echo "你的设备启动类型是UEFI:$CXTisUEFI"
  132. echo "Your device Startup type is UEFI: $CXTisUEFI"
  133. echo -e "\n"
  134. echo "使用大陆加速:$CXTisCN"
  135. echo "Accelerating Chinese mainland with CDN: $CXTisCN"
  136. echo -e "\n"
  137. echo " 启动系统安装. . . "
  138. echo " Start system installation. . . "
  139. echo "---------------------------------------------------------------------------------------------------------------------"
  140. echo -e "\n"
  141. sleep 3s
  142. if [ $CXTaddVER == "arm64" ];then
  143. echo "打印ARM64菜单"
  144. echo -e "\n"
  145. clear
  146. echo -e "\n\n\n"
  147. clear
  148. echo -e "\n"
  149. echo " "
  150. echo "================================================================"
  151. echo "= ="
  152. echo "= 一键网络重装系统 - 魔改版(ARM64安装) ="
  153. echo "= Network-Reinstall-System-Modify (Graphical Install) ="
  154. echo "= ="
  155. echo "= V5.3.0 https://www.cxthhhhh.com ="
  156. echo "= ="
  157. echo "================================================================"
  158. echo " "
  159. echo "您想安装哪个系统(Which System want to Install): "
  160. echo " "
  161. echo " 1) AlmaLinux 9(ARM64)"
  162. echo " 2) CentOS 7(ARM64)【Recommend】"
  163. echo " 3) Debian 11(ARM64)【Recommend】"
  164. echo " 4) Debian 10(ARM64)"
  165. echo " 5) Fedora 36(ARM64)"
  166. echo " 6) Oracle 9(ARM64)"
  167. echo " 7) Rocky 9(ARM64)【Recommend】"
  168. echo " 8) Rocky 8(ARM64)"
  169. echo " 9) Ubuntu 22(ARM64)【Recommend】"
  170. echo " 10) Ubuntu 20(ARM64)"
  171. echo " 99) 更多系统(More System)"
  172. echo " 100) 裸机系统部署平台(高级用户)"
  173. echo " 100) Bare-metal System Deployment Platform(Advanced Users)"
  174. echo " 0) Exit"
  175. echo -ne "\n请选择(Your option): "
  176. echo " "
  177. read N
  178. case $N in
  179. 1) echo -e "\nInstall...AlmaLinux 9(ARM64)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v arm64 -dd "https://odc.cxthhhhh.com/d/SyStem/AlmaLinux/AlmaLinux_9_ARM64_UEFI_NetInstallation_Stable_1.6.vhd.gz" $DebianMirrors $CXTaddLine ;;
  180. 2) echo -e "\nInstall...CentOS 7(ARM64)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v arm64 -dd "https://odc.cxthhhhh.com/d/SyStem/CentOS/CentOS_7.X_ARM64_UEFI_NetInstallation_Final_v9.11.vhd.gz" $DebianMirrors $CXTaddLine ;;
  181. 3) echo -e "\nInstall...Debian 11(ARM64)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -d 11 -a -v arm64 $DebianMirrors $CXTaddLine ;;
  182. 4) echo -e "\nInstall...Debian 10(ARM64)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -d 10 -a -v arm64 $DebianMirrors $CXTaddLine ;;
  183. 5) echo -e "\nInstall...Fedora 36(ARM64)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v arm64 -dd "https://odc.cxthhhhh.com/d/SyStem/Fedora/Fedora_36.X_ARM64_UEFI_NetInatallation_Stable_v1.6.vhd.gz" $DebianMirrors $CXTaddLine ;;
  184. 6) echo -e "\nInstall...Oracle 9(ARM64)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v arm64 -dd "https://odc.cxthhhhh.com/d/SyStem/Oracle/Oracle_9.X_ARM64_UEFI_NetInstallation_Stable_v1.7.vhd.gz" $DebianMirrors $CXTaddLine ;;
  185. 7) echo -e "\nInstall...Rocky 9(ARM64)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v arm64 -dd "https://odc.cxthhhhh.com/d/SyStem/Oracle/Oracle_9.X_ARM64_UEFI_NetInstallation_Stable_v1.7.vhd.gz" $DebianMirrors $CXTaddLine ;;
  186. 8) echo -e "\nInstall...Rocky 8(ARM64)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v arm64 -dd "https://odc.cxthhhhh.com/d/SyStem/Rocky/Rocky_8.X_ARM64_UEFI_NetInstallation_Stable_v6.11.vhd.gz" $DebianMirrors $CXTaddLine ;;
  187. 9) echo -e "\nInstall...Ubuntu 22(ARM64)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -u 22.04 -a -v arm64 $UbuntuMirrors $CXTaddLine ;;
  188. 10) echo -e "\nInstall...Ubuntu 20(ARM64)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -u 20.04 -a -v arm64 $UbuntuMirrors $CXTaddLine ;;
  189. 99) echo "更多系统前往CXT博客及ODC查看。https://www.cxthhhhh.com"; exit 1;;
  190. 100) echo -e "\nInstall...Bare-metal System Deployment Platform(Advanced Users)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v arm64 -dd "https://odc.cxthhhhh.com/d/SyStem/Bare-metal_System_Deployment_Platform/CXT_Bare-metal_System_Deployment_Platform_v3.6.vhd.gz" $DebianMirrors $CXTaddLine ;;
  191. 0) exit 0;;
  192. *) echo "Wrong input!"; exit 1;;
  193. esac
  194. elif [ [$CXTisUEFI == "是(True)"] && [ $CXTaddVER != "arm64" ] ];then
  195. echo "打印UEFI菜单"
  196. echo -e "\n"
  197. clear
  198. echo -e "\n\n\n"
  199. clear
  200. echo -e "\n"
  201. echo " "
  202. echo "================================================================"
  203. echo "= ="
  204. echo "= 一键网络重装系统 - 魔改版(UEFI安装) ="
  205. echo "= Network-Reinstall-System-Modify (Graphical Install) ="
  206. echo "= ="
  207. echo "= V5.3.0 https://www.cxthhhhh.com ="
  208. echo "= ="
  209. echo "================================================================"
  210. echo " "
  211. echo "您想安装哪个系统(Which System want to Install): "
  212. echo " "
  213. echo " 1) CentOS 8(UEFI)"
  214. echo " 2) Debian 11(UEFI)【Recommend】"
  215. echo " 3) Debian 10(UEFI)"
  216. echo " 4) OpenWRT (UEFI)"
  217. echo " 5) Oracle 9(UEFI)"
  218. echo " 6) Rocky 9(UEFI)"
  219. echo " 7) Rocky 8(UEFI)【Recommend】"
  220. echo " 8) Ubuntu 22(UEFI)【Recommend】"
  221. echo " 9) Ubuntu 20(UEFI)"
  222. echo " 21) Windows Server 2022(UEFI)【Recommend】"
  223. echo " 22) Windows Server 2019(UEFI)"
  224. echo " 23) Windows Server 2012 R2(UEFI)"
  225. echo " 99) 更多系统(More System)"
  226. echo " 100) 裸机系统部署平台(高级用户)"
  227. echo " 100) Bare-metal System Deployment Platform(Advanced Users)"
  228. echo " 0) Exit"
  229. echo -ne "\n请选择(Your option): "
  230. echo " "
  231. read N
  232. case $N in
  233. 1) echo -e "\nInstall...CentOS 8(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -firmware -dd "https://odc.cxthhhhh.com/d/SyStem/Rocky/Rocky_8.X_x64_UEFI_NetInstallation_Stable_v6.9.vhd.gz" $DebianMirrors $CXTaddLine ;;
  234. 2) echo -e "\nInstall...Debian 11(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -d 11 -a -v 64 -firmware $DebianMirrors $CXTaddLine ;;
  235. 3) echo -e "\nInstall...Debian 10(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -d 10 -a -v 64 -firmware $DebianMirrors $CXTaddLine ;;
  236. 4) echo -e "\nInstall...OpenWRT (UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -firmware -dd "https://odc.cxthhhhh.com/d/SyStem/OpenWRT-Virtualization-Servers/Stable/openwrt-x86-64-generic-squashfs-combined-efi.img.gz" $DebianMirrors $CXTaddLine ;;
  237. 5) echo -e "\nInstall...Oracle 9(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -firmware -dd "https://odc.cxthhhhh.com/d/SyStem/Oracle/Oracle_9.X_x64_UEFI_NetInstallation_Stable_v1.9.vhd.gz" $DebianMirrors $CXTaddLine ;;
  238. 6) echo -e "\nInstall...Rocky 9(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -firmware -dd "https://odc.cxthhhhh.com/d/SyStem/Rocky/Rocky_8.X_x64_UEFI_NetInstallation_Stable_v6.9.vhd.gz" $DebianMirrors $CXTaddLine ;;
  239. 7) echo -e "\nInstall...Rocky 8(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -firmware -dd "https://odc.cxthhhhh.com/d/SyStem/Rocky/Rocky_8.X_x64_UEFI_NetInstallation_Stable_v6.9.vhd.gz" $DebianMirrors $CXTaddLine ;;
  240. 8) echo -e "\nInstall...Ubuntu 22(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -u 22.04 -a -v 64 -firmware $UbuntuMirrors $CXTaddLine ;;
  241. 9) echo -e "\nInstall...Ubuntu 20(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -u 20.04 -a -v 64 -firmware $UbuntuMirrors $CXTaddLine ;;
  242. 21) echo -e "\nInstall...Windows Server 2022(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -firmware -dd "https://odc.cxthhhhh.com/d/SyStem/Windows_DD_Disks/Disk_Windows_Server_2022_DataCenter_CN_v2.12_UEFI.vhd.gz" $DebianMirrors $CXTaddLine ;;
  243. 22) echo -e "\nInstall...Windows Server 2019(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -firmware -dd "https://odc.cxthhhhh.com/d/SyStem/Windows_DD_Disks/Disk_Windows_Server_2019_DataCenter_CN_v5.1_UEFI.vhd.gz" $DebianMirrors $CXTaddLine ;;
  244. 23) echo -e "\nInstall...Windows Server 2012 R2(UEFI)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -firmware -dd "https://odc.cxthhhhh.com/d/SyStem/Windows_DD_Disks/Disk_Windows_Server_2012R2_DataCenter_CN_v4.29_UEFI.vhd.gz" $DebianMirrors $CXTaddLine ;;
  245. 99) echo "更多系统前往CXT博客及ODC查看。https://www.cxthhhhh.com"; exit 1;;
  246. 100) echo -e "\nInstall...Bare-metal System Deployment Platform(Advanced Users)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -firmware -dd "https://odc.cxthhhhh.com/d/SyStem/Bare-metal_System_Deployment_Platform/CXT_Bare-metal_System_Deployment_Platform_v3.6.vhd.gz" $DebianMirrors $CXTaddLine ;;
  247. 0) exit 0;;
  248. *) echo "Wrong input!"; exit 1;;
  249. esac
  250. else
  251. echo "打印标准菜单"
  252. echo -e "\n"
  253. clear
  254. echo -e "\n\n\n"
  255. clear
  256. echo -e "\n"
  257. echo " "
  258. echo "================================================================"
  259. echo "= ="
  260. echo "= 一键网络重装系统 - 魔改版(BIOS Legacy安装) ="
  261. echo "= Network-Reinstall-System-Modify (Graphical Install) ="
  262. echo "= ="
  263. echo "= V5.3.0 https://www.cxthhhhh.com ="
  264. echo "= ="
  265. echo "================================================================"
  266. echo " "
  267. echo "您想安装哪个系统(Which System want to Install): "
  268. echo " "
  269. echo " 1) CentOS 9"
  270. echo " 2) CentOS 8"
  271. echo " 3) CentOS 7【Recommend】"
  272. echo " 4) Debian 11【Recommend】"
  273. echo " 5) Debian 10"
  274. echo " 6) OpenWRT"
  275. echo " 7) Oracle 9"
  276. echo " 8) Rocky 9"
  277. echo " 9) Rocky 8【Recommend】"
  278. echo " 10) Ubuntu 22【Recommend】"
  279. echo " 11) Ubuntu 20"
  280. echo " 21) Windows Server 2022【Recommend】"
  281. echo " 22) Windows Server 2019"
  282. echo " 23) Windows Server 2016"
  283. echo " 24) Windows Server 2012 R2"
  284. echo " 99) 更多系统(More System)"
  285. echo " 100) 裸机系统部署平台(高级用户)"
  286. echo " 100) Bare-metal System Deployment Platform(Advanced Users)"
  287. echo " 0) Exit"
  288. echo -ne "\n请选择(Your option): "
  289. echo " "
  290. read N
  291. case $N in
  292. 1) echo -e "\nInstall...CentOS 9\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/CentOS/CentOS_9.X_x64_Legacy_NetInstallation_Stable_v1.6.vhd.gz" $DebianMirrors $CXTaddLine ;;
  293. 2) echo -e "\nInstall...CentOS 8\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/CentOS/CentOS_8.X_x64_Legacy_NetInstallation_Stable_v6.8.vhd.gz" $DebianMirrors $CXTaddLine ;;
  294. 3) echo -e "\nInstall...CentOS 7\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/CentOS/CentOS_7.X_x64_Legacy_NetInstallation_Final_v9.8.vhd.gz" $DebianMirrors $CXTaddLine ;;
  295. 4) echo -e "\nInstall...Debian 11\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -d 11 -a -v 64 $DebianMirrors $CXTaddLine ;;
  296. 5) echo -e "\nInstall...Debian 10\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -d 10 -a -v 64 $DebianMirrors $CXTaddLine ;;
  297. 6) echo -e "\nInstall...OpenWRT\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/OpenWRT-Virtualization-Servers/Stable/openwrt-x86-64-generic-squashfs-combined.img.gz" $DebianMirrors $CXTaddLine ;;
  298. 7) echo -e "\nInstall...Oracle 9\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/Oracle/Oracle_9.X_x64_Legacy_NetInstallation_Stable_v1.8.vhd.gz" $DebianMirrors $CXTaddLine ;;
  299. 8) echo -e "\nInstall...Rocky 9\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/Rocky/Rocky_8.X_x64_Legacy_NetInstallation_Stable_v6.8.vhd.gz" $DebianMirrors $CXTaddLine ;;
  300. 9) echo -e "\nInstall...Rocky 8\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/Rocky/Rocky_8.X_x64_Legacy_NetInstallation_Stable_v6.8.vhd.gz" $DebianMirrors $CXTaddLine ;;
  301. 10) echo -e "\nInstall...Ubuntu 22\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -u 22.04 -a -v 64 $UbuntuMirrors $CXTaddLine ;;
  302. 11) echo -e "\nInstall...Ubuntu 20\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -u 20.04 -a -v 64 $UbuntuMirrors $CXTaddLine ;;
  303. 21) echo -e "\nInstall...Windows Server 2022\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/Windows_DD_Disks/Disk_Windows_Server_2022_DataCenter_CN_v2.12.vhd.gz" $DebianMirrors $CXTaddLine ;;
  304. 22) echo -e "\nInstall...Windows Server 2019\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/Windows_DD_Disks/Disk_Windows_Server_2019_DataCenter_CN_v5.1.vhd.gz" $DebianMirrors $CXTaddLine ;;
  305. 23) echo -e "\nInstall...Windows Server 2016\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/Windows_DD_Disks/Disk_Windows_Server_2016_DataCenter_CN_v4.12.vhd.gz" $DebianMirrors $CXTaddLine ;;
  306. 24) echo -e "\nInstall...Windows Server 2012 R2\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/Windows_DD_Disks/Disk_Windows_Server_2012R2_DataCenter_CN_v4.29.vhd.gz" $DebianMirrors $CXTaddLine ;;
  307. 99) echo "更多系统前往CXT博客及ODC查看。https://www.cxthhhhh.com"; exit 1;;
  308. 100) echo -e "\nInstall...Bare-metal System Deployment Platform(Advanced Users)\n"; read -s -n1 -p "任意键继续(Press any key to continue...)" ; bash ~/Core_Install.sh -a -v 64 -dd "https://odc.cxthhhhh.com/d/SyStem/Bare-metal_System_Deployment_Platform/CXT_Bare-metal_System_Deployment_Platform_v3.6.vhd.gz" $DebianMirrors $CXTaddLine ;;
  309. 0) exit 0;;
  310. *) echo "Wrong input!"; exit 1;;
  311. esac
  312. fi
  313. echo "---------------------------------------------------------------------------------------------------------------------"
  314. echo -e "\033[35m 启动 安装 \033[0m"
  315. echo -e "\033[32m Start Installation \033[0m"
  316. echo "---------------------------------------------------------------------------------------------------------------------"
  317. echo -e "\n"