Просмотр исходного кода

Version 2.1.0

[Version 2.1.0]
Initial version of version 2.1.x

1. Release LVM DISK Auto Partition Tools
2. Update the upstream file and prepare the Open Disk CDN file for rebuilding the modified version.
(Look here: https://moeclub.org/2018/04/03/603/)
3. In the current situation, this is a non-generic version and requires more follow up. And solve it.
(Discussed here: https://t.me/Technical_Blog)

etc.
MeowLove 6 лет назад
Родитель
Сommit
3b7ea37333
3 измененных файлов с 266 добавлено и 168 удалено
  1. 148 143
      CoreShell/Core_Install.sh
  2. 94 0
      CoreShell/LVM_DISK_Auto_Partition_Tools.sh
  3. 24 25
      Network-Reinstall-System-Modify.sh

+ 148 - 143
CoreShell/koiok.sh → CoreShell/Core_Install.sh

@@ -1,20 +1,21 @@
 #!/bin/bash
 
+## License: GPL
 ## This is the magically modified version of the one-click reload script.
 ## It can reinstall CentOS, Debian, Ubuntu and other Linux systems (continuously added) over the network in one click.
 ## It can reinstall Windwos 2003, 7, 2008R2, 2012R2, 2016, 2019 and other Windows systems (continuously added) via the network in one click.
-## Technical support is provided by the technical blog. (based on the original version of Vicer)
+## Support GRUB or GRUB2 for installing a clean minimal system.
+## Technical support is provided by the CXT (CXTHHHHH.com). (based on the original version of Vicer)
 
 ## Magic Modify version author:
-## Support GRUB or GRUB2 for installing a clean minimal system.
 ## Default root password: cxthhhhh.com
-## Blog: https://tech.cxthhhhh.com
-## Written By Technical Blog
+## Blog: https://cxthhhhh.com
+## Written By CXT (CXTHHHHH.com)
 
 ## Original version author:
-## Suitable for using by GRUB.
 ## Blog: https://moeclub.org
-## Written By Vicer
+## Written By Vicer (MoeClub.org)
+
 
 export tmpVER=''
 export tmpDIST=''
@@ -23,18 +24,19 @@ export tmpWORD=''
 export tmpMirror=''
 export tmpSSL=''
 export tmpINS=''
-export tmpFW=''
 export ipAddr=''
 export ipMask=''
 export ipGate=''
-export linuxdists=''
+export Relese=''
 export ddMode='0'
 export setNet='0'
 export setRDP='0'
+export setIPv6='0'
 export isMirror='0'
 export FindDists='0'
 export loaderMode='0'
 export SpikCheckDIST='0'
+export setInterfaceName='0'
 export UNKNOWHW='0'
 export UNVER='6.4'
 
@@ -47,19 +49,19 @@ while [[ $# -ge 1 ]]; do
       ;;
     -d|--debian)
       shift
-      linuxdists='debian'
+      Relese='Debian'
       tmpDIST="$1"
       shift
       ;;
     -u|--ubuntu)
       shift
-      linuxdists='ubuntu'
+      Relese='Ubuntu'
       tmpDIST="$1"
       shift
       ;;
     -c|--centos)
       shift
-      linuxdists='centos'
+      Relese='CentOS'
       tmpDIST="$1"
       shift
       ;;
@@ -94,6 +96,10 @@ while [[ $# -ge 1 ]]; do
       ipGate="$1"
       shift
       ;;
+    --dev-net)
+      shift
+      setInterfaceName='1'
+      ;;
     --loader)
       shift
       loaderMode='1'
@@ -128,13 +134,13 @@ while [[ $# -ge 1 ]]; do
       tmpSSL="$1"
       shift
       ;;
-    --firmware)
+    --ipv6)
       shift
-      tmpFW='1'
+      setIPv6='1'
       ;;
     *)
       if [[ "$1" != 'error' ]]; then echo -ne "\nInvaild option: '$1'\n\n"; fi
-      echo -ne " Usage:\n\tbash DebianNET.sh\t-d/--debian [\033[33m\033[04mdists-name\033[0m]\n\t\t\t\t-u/--ubuntu [\033[04mdists-name\033[0m]\n\t\t\t\t-c/--centos [\033[33m\033[04mdists-verison\033[0m]\n\t\t\t\t-v/--ver [32/\033[33m\033[04mi386\033[0m|64/amd64]\n\t\t\t\t--ip-addr/--ip-gate/--ip-mask\n\t\t\t\t-apt/-yum/--mirror\n\t\t\t\t-dd/--image\n\t\t\t\t-a/--auto\n\t\t\t\t-m/--manual\n"
+      echo -ne " Usage:\n\tbash $(basename $0)\t-d/--debian [\033[33m\033[04mdists-name\033[0m]\n\t\t\t\t-u/--ubuntu [\033[04mdists-name\033[0m]\n\t\t\t\t-c/--centos [\033[33m\033[04mdists-verison\033[0m]\n\t\t\t\t-v/--ver [32/\033[33m\033[04mi386\033[0m|64/amd64]\n\t\t\t\t--ip-addr/--ip-gate/--ip-mask\n\t\t\t\t-apt/-yum/--mirror\n\t\t\t\t-dd/--image\n\t\t\t\t-a/--auto\n\t\t\t\t-m/--manual\n"
       exit 1;
       ;;
     esac
@@ -171,69 +177,64 @@ if [ "$FullDependence" == '1' ]; then
 fi
 }
 
-if [[ -z "$linuxdists" ]]; then
-  linuxdists='debian';
-fi
+function SelectMirror(){
+  [ $# -ge 3 ] || exit 1
+  Relese="$1"
+  DIST=$(echo "$2" |sed 's/\ //g' |sed -r 's/(.*)/\L\1/')
+  VER=$(echo "$3" |sed 's/\ //g' |sed -r 's/(.*)/\L\1/')
+  New=$(echo "$4" |sed 's/\ //g')
+  [ -n "$Relese" ] || exit 1
+  [ -n "$DIST" ] || exit 1
+  [ -n "$VER" ] || exit 1
+  relese=$(echo $Relese |sed -r 's/(.*)/\L\1/')
+  if [ "$Relese" == "Debian" ] || [ "$Relese" == "Ubuntu" ]; then
+    inUpdate=''; [ "$Relese" == "Ubuntu" ] && inUpdate='-updates'
+    MirrorTEMP="SUB_MIRROR/dists/${DIST}${inUpdate}/main/installer-${VER}/current/images/netboot/${relese}-installer/${VER}/initrd.gz"
+  elif [ "$Relese" == "CentOS" ]; then
+    MirrorTEMP="SUB_MIRROR/${DIST}/os/${VER}/isolinux/initrd.img"
+  fi
+  [ -n "$MirrorTEMP" ] || exit 1
+  MirrorStatus=0
+  declare -A MirrorBackup
+  MirrorBackup=(["Debian0"]="" ["Debian1"]="http://deb.debian.org/debian" ["Debian2"]="http://archive.debian.org/debian" ["Ubuntu0"]="" ["Ubuntu1"]="http://archive.ubuntu.com/ubuntu" ["CentOS0"]="" ["CentOS1"]="http://mirror.centos.org/centos" ["CentOS2"]="http://vault.centos.org")
+  echo "$New" |grep -q '^http://\|^https://\|^ftp://' && MirrorBackup[${Relese}0]="$New"
+  for mirror in $(echo "${!MirrorBackup[@]}" |sed 's/\ /\n/g' |sort -n |grep "^$Relese")
+    do
+      CurMirror="${MirrorBackup[$mirror]}"
+      [ -n "$CurMirror" ] || continue
+      MirrorURL=`echo "$MirrorTEMP" |sed "s#SUB_MIRROR#${CurMirror}#g"`
+      wget --no-check-certificate --spider --timeout=3 -o /dev/null "$MirrorURL"
+      [ $? -eq 0 ] && MirrorStatus=1 && break
+    done
+  [ $MirrorStatus -eq 1 ] && echo "$CurMirror" || exit 1
+}
 
+[ -n "$Relese" ] || Relese='Debian'
+linux_relese=$(echo "$Relese" |sed 's/\ //g' |sed -r 's/(.*)/\L\1/')
 clear && echo -e "\n\033[36m# Check Dependence\033[0m\n"
 
 if [[ "$ddMode" == '1' ]]; then
   CheckDependence iconv;
-  linuxdists='debian';
-  tmpDIST='jessie';
+  linux_relese='ubuntu';
+  tmpDIST='bionic';
   tmpVER='amd64';
   tmpINS='auto';
 fi
 
-if [[ "$linuxdists" == 'debian' ]] || [[ "$linuxdists" == 'ubuntu' ]]; then
+if [[ "$Relese" == 'Debian' ]] || [[ "$Relese" == 'Ubuntu' ]]; then
   CheckDependence wget,awk,grep,sed,cut,cat,cpio,gzip,find,dirname,basename;
-elif [[ "$linuxdists" == 'centos' ]]; then
+elif [[ "$Relese" == 'CentOS' ]]; then
   CheckDependence wget,awk,grep,sed,cut,cat,cpio,gzip,find,dirname,basename,file,xz;
 fi
-
-if [[ -n "$tmpWORD" ]]; then
-  CheckDependence openssl;
-fi
+[ -n "$tmpWORD" ] && CheckDependence openssl
 
 if [[ "$loaderMode" == "0" ]]; then
-  [[ -f '/boot/grub/grub.cfg' ]] && GRUBOLD='0' && GRUBDIR='/boot/grub' && GRUBFILE='grub.cfg';
-  [[ -z "$GRUBDIR" ]] && [[ -f '/boot/grub2/grub.cfg' ]] && GRUBOLD='0' && GRUBDIR='/boot/grub2' && GRUBFILE='grub.cfg';
-  [[ -z "$GRUBDIR" ]] && [[ -f '/boot/grub/grub.conf' ]] && GRUBOLD='1' && GRUBDIR='/boot/grub' && GRUBFILE='grub.conf';
-  [ -z "$GRUBDIR" -o -z "$GRUBFILE" ] && echo -ne "Error! \nNot Found grub path.\n" && exit 1;
+  [[ -f '/boot/grub/grub.cfg' ]] && GRUBVER='0' && GRUBDIR='/boot/grub' && GRUBFILE='grub.cfg';
+  [[ -z "$GRUBDIR" ]] && [[ -f '/boot/grub2/grub.cfg' ]] && GRUBVER='0' && GRUBDIR='/boot/grub2' && GRUBFILE='grub.cfg';
+  [[ -z "$GRUBDIR" ]] && [[ -f '/boot/grub/grub.conf' ]] && GRUBVER='1' && GRUBDIR='/boot/grub' && GRUBFILE='grub.conf';
+  [ -z "$GRUBDIR" -o -z "$GRUBFILE" ] && echo -ne "Error! \nNot Found grub.\n" && exit 1;
 else
   tmpINS='auto'
-  ddMode='0'
-fi
-
-if [[ "$isMirror" == '1' ]]; then
-  if [[ -n "$tmpMirror" ]]; then
-    TMPMirrorHost="$(echo -n "$tmpMirror" |grep -Eo '.*\.(\w+)')";
-    echo "$TMPMirrorHost" |grep -q '://';
-    if [[ $? == '0' ]]; then
-      MirrorHost="$(echo "$TMPMirrorHost" |awk -F'://' '{print $2}')";
-    else
-      echo -en "\n\033[31mInvaild Mirror! \033[0m\n";
-      [[ "$linuxdists" == 'debian' ]] && echo -en "\033[33mexample:\033[0m http://deb.debian.org/debian\n\n";
-      [[ "$linuxdists" == 'ubuntu' ]] && echo -en "\033[33mexample:\033[0m http://archive.ubuntu.com/ubuntu\n\n";
-      [[ "$linuxdists" == 'centos' ]] && echo -en "\033[33mexample:\033[0m http://mirror.centos.org/centos\n\n";
-      exit 1
-    fi
-    if [[ -n "$MirrorHost" ]]; then
-      MirrorFolder="$(echo -n "$tmpMirror" |awk -F''${MirrorHost}'' '{print $2}' |sed 's/\/$//g')";
-      if [[ -z "$MirrorFolder" ]]; then
-        [[ "$linuxdists" == 'debian' ]] && MirrorFolder='/debian';
-        [[ "$linuxdists" == 'ubuntu' ]] && MirrorFolder='/ubuntu';
-        [[ "$linuxdists" == 'centos' ]] && MirrorFolder='/centos';
-      fi
-      DISTMirror="${MirrorHost}${MirrorFolder}";
-    fi
-  fi
-fi
-
-if [[ -z "$DISTMirror" ]]; then
-  [[ "$linuxdists" == 'debian' ]] && MirrorHost='deb.debian.org' && MirrorFolder='/debian' && DISTMirror="${MirrorHost}${MirrorFolder}";
-  [[ "$linuxdists" == 'ubuntu' ]] && MirrorHost='archive.ubuntu.com' && MirrorFolder='/ubuntu' && DISTMirror="${MirrorHost}${MirrorFolder}";
-  [[ "$linuxdists" == 'centos' ]] && DISTMirror='vault.centos.org';
 fi
 
 if [[ -n "$tmpVER" ]]; then
@@ -242,34 +243,23 @@ if [[ -n "$tmpVER" ]]; then
     VER='i386';
   fi
   if  [[ "$tmpVER" == '64' ]] || [[ "$tmpVER" == 'amd64' ]] || [[ "$tmpVER" == 'x86_64' ]] || [[ "$tmpVER" == 'x64' ]]; then
-    if [[ "$linuxdists" == 'debian' ]] || [[ "$linuxdists" == 'ubuntu' ]]; then
+    if [[ "$Relese" == 'Debian' ]] || [[ "$Relese" == 'Ubuntu' ]]; then
       VER='amd64';
-    elif [[ "$linuxdists" == 'centos' ]]; then
+    elif [[ "$Relese" == 'CentOS' ]]; then
       VER='x86_64';
     fi
   fi
 fi
-
-if [[ -z "$VER" ]]; then
-  VER='i386';
-fi
-
-if [[ -n "$tmpPrefer" ]]; then
-  PreferOption="$(echo "$tmpPrefer" |sed 's/[[:space:]]*//g')"
-fi
-
-if [[ -z "$PreferOption" ]]; then
-  PreferOption='current';
-fi
+[ -z "$VER" ] && VER='amd64'
 
 if [[ -z "$tmpDIST" ]]; then
-  [[ "$linuxdists" == 'debian' ]] && DIST='jessie';
-  [[ "$linuxdists" == 'ubuntu' ]] && DIST='xenial';
-  [[ "$linuxdists" == 'centos' ]] && DIST='6.8';
+  [ "$Relese" == 'Debian' ] && tmpDIST='stretch' && DIST='stretch';
+  [ "$Relese" == 'Ubuntu' ] && tmpDIST='bionic' && DIST='bionic';
+  [ "$Relese" == 'CentOS' ] && tmpDIST='6.10' && DIST='6.10';
 fi
 
 if [[ -z "$DIST" ]]; then
-  if [[ "$linuxdists" == 'debian' ]]; then
+  if [[ "$Relese" == 'Debian' ]]; then
     SpikCheckDIST='0'
     DIST="$(echo "$tmpDIST" |sed -r 's/(.*)/\L\1/')";
     echo "$DIST" |grep -q '[0-9]';
@@ -282,8 +272,9 @@ if [[ -z "$DIST" ]]; then
         [[ "$isDigital" == '10' ]] && DIST='buster';
       }
     }
+    LinuxMirror=$(SelectMirror "$Relese" "$DIST" "$VER" "$tmpMirror")
   fi
-  if [[ "$linuxdists" == 'ubuntu' ]]; then
+  if [[ "$Relese" == 'Ubuntu' ]]; then
     SpikCheckDIST='0'
     DIST="$(echo "$tmpDIST" |sed -r 's/(.*)/\L\1/')";
     echo "$DIST" |grep -q '[0-9]';
@@ -296,37 +287,41 @@ if [[ -z "$DIST" ]]; then
         [[ "$isDigital" == '18.04' ]] && DIST='bionic';
       }
     }
+    LinuxMirror=$(SelectMirror "$Relese" "$DIST" "$VER" "$tmpMirror")
   fi
-  if [[ "$linuxdists" == 'centos' ]]; then
+  if [[ "$Relese" == 'CentOS' ]]; then
     SpikCheckDIST='1'
     DISTCheck="$(echo "$tmpDIST" |grep -o '[\.0-9]\{1,\}')";
-    ListDIST="$(wget --no-check-certificate -qO- "http://$DISTMirror/dir_sizes" |cut -f2 |grep '^[0-9]')"
+    LinuxMirror=$(SelectMirror "$Relese" "$DISTCheck" "$VER" "$tmpMirror")
+    ListDIST="$(wget --no-check-certificate -qO- "$LinuxMirror/dir_sizes" |cut -f2 |grep '^[0-9]')"
     DIST="$(echo "$ListDIST" |grep "^$DISTCheck" |head -n1)"
     [[ -z "$DIST" ]] && {
       echo -ne '\nThe dists version not found in this mirror, Please check it! \n\n'
       bash $0 error;
       exit 1;
     }
-    wget --no-check-certificate -qO- "http://$DISTMirror/$DIST/os/$VER/.treeinfo" |grep -q 'general';
+    wget --no-check-certificate -qO- "$LinuxMirror/$DIST/os/$VER/.treeinfo" |grep -q 'general';
     [[ $? != '0' ]] && {
-      wget --no-check-certificate -qO- "http://$DISTMirror/centos/$DIST/os/$VER/.treeinfo" |grep -q 'general';
-      [[ $? == '0' ]] && {
-        DISTMirror="${DISTMirror}/${linuxdists}"
-      } || {
         echo -ne "\nThe version not found in this mirror, Please change mirror try again! \n\n";
         exit 1;
-      }
     }
-
   fi
 fi
 
+if [[ -z "$LinuxMirror" ]]; then
+  echo -ne "\033[31mError! \033[0mInvaild mirror! \n"
+  [ "$Relese" == 'Debian' ] && echo -en "\033[33mexample:\033[0m http://deb.debian.org/debian\n\n";
+  [ "$Relese" == 'Ubuntu' ] && echo -en "\033[33mexample:\033[0m http://archive.ubuntu.com/ubuntu\n\n";
+  [ "$Relese" == 'CentOS' ] && echo -en "\033[33mexample:\033[0m http://mirror.centos.org/centos\n\n";
+  bash $0 error;
+  exit 1;
+fi
+
 if [[ "$SpikCheckDIST" == '0' ]]; then
-  DistsList="$(wget --no-check-certificate -qO- "http://$DISTMirror/dists/" |grep -o 'href=.*/"' |cut -d'"' -f2 |sed '/-\|old\|Debian\|experimental\|stable\|test\|sid\|devel/d' |grep '^[^/]' |sed -n '1h;1!H;$g;s/\n//g;s/\//\;/g;$p')";
+  DistsList="$(wget --no-check-certificate -qO- "$LinuxMirror/dists/" |grep -o 'href=.*/"' |cut -d'"' -f2 |sed '/-\|old\|Debian\|experimental\|stable\|test\|sid\|devel/d' |grep '^[^/]' |sed -n '1h;1!H;$g;s/\n//g;s/\//\;/g;$p')";
   for CheckDEB in `echo "$DistsList" |sed 's/;/\n/g'`
     do
-      [[ "$CheckDEB" == "$DIST" ]] && FindDists='1';
-      [[ "$FindDists" == '1' ]] && break;
+      [[ "$CheckDEB" == "$DIST" ]] && FindDists='1' && break;
     done
   [[ "$FindDists" == '0' ]] && {
     echo -ne '\nThe dists version not found, Please check it! \n\n'
@@ -336,7 +331,7 @@ if [[ "$SpikCheckDIST" == '0' ]]; then
 fi
 
 [[ "$ddMode" == '1' ]] && {
-  export SSL_SUPPORT='https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/wget_udeb_amd64.tar.gz';
+  export SSL_SUPPORT='https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/wget_udeb_amd64.tar.gz';
   if [[ -n "$tmpURL" ]]; then
     DDURL="$tmpURL"
     echo "$DDURL" |grep -q '^http://\|^ftp://\|^https://';
@@ -356,13 +351,11 @@ fi
 [ -n "$ipAddr" ] && [ -n "$ipMask" ] && [ -n "$ipGate" ] && setNet='1';
 [[ -n "$tmpWORD" ]] && myPASSWORD="$(openssl passwd -1 "$tmpWORD")";
 [[ -z "$myPASSWORD" ]] && myPASSWORD='$1$UIl1uSg0$tAW9qjOqoCto0CIUgUwHT1';
-[[ -n "$tmpFW" ]] && INCFW="$tmpFW";
-[[ -z "$INCFW" ]] && INCFW='0';
 
 if [[ -n "$interface" ]]; then
   IFETH="$interface"
 else
-  if [[ "$linuxdists" == 'centos' ]]; then
+  if [[ "$linux_relese" == 'centos' ]]; then
     IFETH="link"
   else
     IFETH="auto"
@@ -374,7 +367,7 @@ clear && echo -e "\n\033[36m# Install\033[0m\n"
 ASKVNC(){
   inVNC='y';
   [[ "$ddMode" == '0' ]] && {
-    echo -ne "\033[34mCan you login VNC?\033[0m\e[33m[\e[32my\e[33m/n]\e[0m "
+    echo -ne "\033[34mDo you want to install os manually?\033[0m\e[33m[\e[32my\e[33m/n]\e[0m "
     read tmpinVNC
     [[ -n "$inVNCtmp" ]] && inVNC="$tmpinVNC"
   }
@@ -383,18 +376,15 @@ ASKVNC(){
 }
 
 [ "$inVNC" == 'y' -o "$inVNC" == 'n' ] || ASKVNC;
-[[ "$linuxdists" == 'debian' ]] && LinuxName='Debian';
-[[ "$linuxdists" == 'ubuntu' ]] && LinuxName='Ubuntu';
-[[ "$linuxdists" == 'centos' ]] && LinuxName='CentOS';
 [[ "$ddMode" == '0' ]] && { 
-  [[ "$inVNC" == 'y' ]] && echo -e "\033[34mManual Mode\033[0m insatll \033[33m$LinuxName\033[0m [\033[33m$DIST\033[0m] [\033[33m$VER\033[0m] in VNC. "
-  [[ "$inVNC" == 'n' ]] && echo -e "\033[34mAuto Mode\033[0m insatll \033[33m$LinuxName\033[0m [\033[33m$DIST\033[0m] [\033[33m$VER\033[0m]. "
+  [[ "$inVNC" == 'y' ]] && echo -e "\033[34mManual Mode\033[0m insatll [\033[33m$Relese\033[0m] [\033[33m$DIST\033[0m] [\033[33m$VER\033[0m] in VNC. "
+  [[ "$inVNC" == 'n' ]] && echo -e "\033[34mAuto Mode\033[0m insatll [\033[33m$Relese\033[0m] [\033[33m$DIST\033[0m] [\033[33m$VER\033[0m]. "
 }
 [[ "$ddMode" == '1' ]] && {
   echo -ne "\033[34mAuto Mode\033[0m insatll \033[33mWindows\033[0m\n[\033[33m$DDURL\033[0m]\n"
 }
 
-if [[ "$linuxdists" == 'centos' ]]; then
+if [[ "$linux_relese" == 'centos' ]]; then
   if [[ "$DIST" != "$UNVER" ]]; then
     awk 'BEGIN{print '${UNVER}'-'${DIST}'}' |grep -q '^-'
     if [ $? != '0' ]; then
@@ -408,35 +398,37 @@ if [[ "$linuxdists" == 'centos' ]]; then
     fi
     awk 'BEGIN{print '${UNVER}'-'${DIST}'+0.59}' |grep -q '^-'
     if [ $? == '0' ]; then
-      echo -en "\n\033[31mThe version higher then \033[33m6.9 \033[31mis not support in current! \033[0m\n\n"
+      echo -en "\n\033[31mThe version higher then \033[33m6.10 \033[31mis not support in current! \033[0m\n\n"
       exit 1;
     fi
   fi
 fi
 
-echo -e "\n[\033[33m$LinuxName\033[0m] [\033[33m$DIST\033[0m] [\033[33m$VER\033[0m] Downloading..."
-
-[[ -z "$DISTMirror" ]] && echo -ne "\033[31mError! \033[0mInvaild mirror! \n" && exit 1
-
-if [[ "$linuxdists" == 'debian' ]] || [[ "$linuxdists" == 'ubuntu' ]]; then
-wget --no-check-certificate -qO '/boot/initrd.img' "http://$DISTMirror/dists/$DIST/main/installer-$VER/$PreferOption/images/netboot/$linuxdists-installer/$VER/initrd.gz"
-[[ $? -ne '0' ]] && echo -ne "\033[31mError! \033[0mDownload 'initrd.img' for \033[33m$linuxdists\033[0m failed! \n" && exit 1
-wget --no-check-certificate -qO '/boot/vmlinuz' "http://$DISTMirror/dists/$DIST/main/installer-$VER/$PreferOption/images/netboot/$linuxdists-installer/$VER/linux"
-[[ $? -ne '0' ]] && echo -ne "\033[31mError! \033[0mDownload 'vmlinuz' for \033[33m$linuxdists\033[0m failed! \n" && exit 1
-elif [[ "$linuxdists" == 'centos' ]]; then
-wget --no-check-certificate -qO '/boot/initrd.img' "http://$DISTMirror/$DIST/os/$VER/isolinux/initrd.img"
-[[ $? -ne '0' ]] && echo -ne "\033[31mError! \033[0mDownload 'initrd.img' for \033[33m$linuxdists\033[0m failed! \n" && exit 1
-wget --no-check-certificate -qO '/boot/vmlinuz' "http://$DISTMirror/$DIST/os/$VER/isolinux/vmlinuz"
-[[ $? -ne '0' ]] && echo -ne "\033[31mError! \033[0mDownload 'vmlinuz' for \033[33m$linuxdists\033[0m failed! \n" && exit 1
+echo -e "\n[\033[33m$Relese\033[0m] [\033[33m$DIST\033[0m] [\033[33m$VER\033[0m] Downloading..."
+
+if [[ "$linux_relese" == 'debian' ]] || [[ "$linux_relese" == 'ubuntu' ]]; then
+  inUpdate=''; [ "$linux_relese" == 'ubuntu' ] && inUpdate='-updates'
+  wget --no-check-certificate -qO '/boot/initrd.img' "${LinuxMirror}/dists/${DIST}${inUpdate}/main/installer-${VER}/current/images/netboot/${linux_relese}-installer/${VER}/initrd.gz"
+  [[ $? -ne '0' ]] && echo -ne "\033[31mError! \033[0mDownload 'initrd.img' for \033[33m$linux_relese\033[0m failed! \n" && exit 1
+  wget --no-check-certificate -qO '/boot/vmlinuz' "${LinuxMirror}/dists/${DIST}${inUpdate}/main/installer-${VER}/current/images/netboot/${linux_relese}-installer/${VER}/linux"
+  [[ $? -ne '0' ]] && echo -ne "\033[31mError! \033[0mDownload 'vmlinuz' for \033[33m$linux_relese\033[0m failed! \n" && exit 1
+  MirrorHost="$(echo "$LinuxMirror" |awk -F'://|/' '{print $2}')";
+  MirrorFolder="$(echo "$LinuxMirror" |awk -F''${MirrorHost}'' '{print $2}')";
+elif [[ "$linux_relese" == 'centos' ]]; then
+  wget --no-check-certificate -qO '/boot/initrd.img' "${LinuxMirror}/${DIST}/os/${VER}/isolinux/initrd.img"
+  [[ $? -ne '0' ]] && echo -ne "\033[31mError! \033[0mDownload 'initrd.img' for \033[33m$linux_relese\033[0m failed! \n" && exit 1
+  wget --no-check-certificate -qO '/boot/vmlinuz' "${LinuxMirror}/${DIST}/os/${VER}/isolinux/vmlinuz"
+  [[ $? -ne '0' ]] && echo -ne "\033[31mError! \033[0mDownload 'vmlinuz' for \033[33m$linux_relese\033[0m failed! \n" && exit 1
+else
+  bash $0 error;
+  exit 1;
 fi
-if [[ "$linuxdists" == 'debian' ]]; then
-  if [[ "$INCFW" == '1' ]]; then
-    wget --no-check-certificate -qO '/boot/firmware.cpio.gz' "http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/$DIST/current/firmware.cpio.gz"
-    [[ $? -ne '0' ]] && echo -ne "\033[31mError! \033[0mDownload 'firmware' for \033[33m$linuxdists\033[0m failed! \n" && exit 1
-  fi
+if [[ "$linux_relese" == 'debian' ]]; then
+  wget --no-check-certificate -qO '/boot/firmware.cpio.gz' "http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/${DIST}/current/firmware.cpio.gz"
+  [[ $? -ne '0' ]] && echo -ne "\033[31mError! \033[0mDownload 'firmware' for \033[33m$linux_relese\033[0m failed! \n" && exit 1
   if [[ "$ddMode" == '1' ]]; then
-    vKernel_udeb=$(wget --no-check-certificate -qO- "http://$DISTMirror/dists/$DIST/main/installer-$VER/$PreferOption/images/udeb.list" |grep '^acpi-modules' |head -n1 |grep -o '[0-9]\{1,2\}.[0-9]\{1,2\}.[0-9]\{1,2\}-[0-9]\{1,2\}' |head -n1)
-    [[ -z "vKernel_udeb" ]] && vKernel_udeb="3.16.0-4"
+    vKernel_udeb=$(wget --no-check-certificate -qO- "http://$DISTMirror/dists/$DIST/main/installer-$VER/current/images/udeb.list" |grep '^acpi-modules' |head -n1 |grep -o '[0-9]\{1,2\}.[0-9]\{1,2\}.[0-9]\{1,2\}-[0-9]\{1,2\}' |head -n1)
+    [[ -z "vKernel_udeb" ]] && vKernel_udeb="3.16.0-6"
   fi
 fi
 
@@ -518,10 +510,10 @@ if [[ "$loaderMode" == "0" ]]; then
   mv -f $GRUBDIR/$GRUBFILE $GRUBDIR/$GRUBFILE.bak;
   [[ -f $GRUBDIR/$GRUBFILE.old ]] && cat $GRUBDIR/$GRUBFILE.old >$GRUBDIR/$GRUBFILE || cat $GRUBDIR/$GRUBFILE.bak >$GRUBDIR/$GRUBFILE;
 else
-  GRUBOLD='2'
+  GRUBVER='2'
 fi
 
-[[ "$GRUBOLD" == '0' ]] && {
+[[ "$GRUBVER" == '0' ]] && {
   READGRUB='/tmp/grub.read'
   cat $GRUBDIR/$GRUBFILE |sed -n '1h;1!H;$g;s/\n/%%%%%%%/g;$p' |grep -om 1 'menuentry\ [^{]*{[^}]*}%%%%%%%' |sed 's/%%%%%%%/\n/g' >$READGRUB
   LoadNum="$(cat $READGRUB |grep -c 'menuentry ')"
@@ -552,7 +544,7 @@ fi
   INSERTGRUB="$(awk '/menuentry /{print NR}' $GRUBDIR/$GRUBFILE|head -n 1)"
 }
 
-[[ "$GRUBOLD" == '1' ]] && {
+[[ "$GRUBVER" == '1' ]] && {
   CFG0="$(awk '/title[\ ]|title[\t]/{print NR}' $GRUBDIR/$GRUBFILE|head -n 1)";
   CFG1="$(awk '/title[\ ]|title[\t]/{print NR}' $GRUBDIR/$GRUBFILE|head -n 2 |tail -n 1)";
   [[ -n $CFG0 ]] && [ -z $CFG1 -o $CFG1 == $CFG0 ] && sed -n "$CFG0,$"p $GRUBDIR/$GRUBFILE >/tmp/grub.new;
@@ -571,10 +563,20 @@ LinuxKernel="$(grep 'linux.*/\|kernel.*/' /tmp/grub.new |awk '{print $1}' |head
 LinuxIMG="$(grep 'initrd.*/' /tmp/grub.new |awk '{print $1}' |tail -n 1)";
 [ -z "$LinuxIMG" ] && sed -i "/$LinuxKernel.*\//a\\\tinitrd\ \/" /tmp/grub.new && LinuxIMG='initrd';
 
-if [[ "$linuxdists" == 'debian' ]] || [[ "$linuxdists" == 'ubuntu' ]]; then
-  BOOT_OPTION="auto=true hostname=$linuxdists domain= -- quiet"
-elif [[ "$linuxdists" == 'centos' ]]; then
-  BOOT_OPTION="ks=file://ks.cfg ksdevice=$IFETH"
+if [[ "$setInterfaceName" == "1" ]]; then
+  Add_OPTION="net.ifnames=0 biosdevname=0";
+else
+  Add_OPTION="";
+fi
+
+if [[ "$setIPv6" == "1" ]]; then
+  Add_OPTION="$Add_OPTION ipv6.disable=1";
+fi
+
+if [[ "$linux_relese" == 'debian' ]] || [[ "$linux_relese" == 'ubuntu' ]]; then
+  BOOT_OPTION="auto=true $Add_OPTION hostname=$linux_relese domain= -- quiet"
+elif [[ "$linux_relese" == 'centos' ]]; then
+  BOOT_OPTION="ks=file://ks.cfg $Add_OPTION ksdevice=$IFETH"
 fi
 
 [[ "$Type" == 'InBoot' ]] && {
@@ -607,9 +609,9 @@ fi
 [[ -d /tmp/boot ]] && rm -rf /tmp/boot;
 mkdir -p /tmp/boot;
 cd /tmp/boot;
-if [[ "$linuxdists" == 'debian' ]] || [[ "$linuxdists" == 'ubuntu' ]]; then
+if [[ "$linux_relese" == 'debian' ]] || [[ "$linux_relese" == 'ubuntu' ]]; then
   COMPTYPE="gzip";
-elif [[ "$linuxdists" == 'centos' ]]; then
+elif [[ "$linux_relese" == 'centos' ]]; then
   COMPTYPE="$(file /boot/initrd.img |grep -o ':.*compressed data' |cut -d' ' -f2 |sed -r 's/(.*)/\L\1/' |head -n1)"
   [[ -z "$COMPTYPE" ]] && echo "Detect compressed type fail." && exit 1;
 fi
@@ -634,7 +636,7 @@ for ListCOMP in `echo -en 'gzip\nlzma\nxz'`
 
 $UNCOMP < /tmp/$NewIMG | cpio --extract --verbose --make-directories --no-absolute-filenames >>/dev/null 2>&1
 
-if [[ "$linuxdists" == 'debian' ]] || [[ "$linuxdists" == 'ubuntu' ]]; then
+if [[ "$linux_relese" == 'debian' ]] || [[ "$linux_relese" == 'ubuntu' ]]; then
 cat >/tmp/boot/preseed.cfg<<EOF
 d-i debian-installer/locale string en_US
 d-i console-setup/layoutcode string us
@@ -659,6 +661,7 @@ d-i mirror/country string manual
 d-i mirror/http/hostname string $MirrorHost
 d-i mirror/http/directory string $MirrorFolder
 d-i mirror/http/proxy string
+d-i apt-setup/services-select multiselect
 
 d-i passwd/root-login boolean ture
 d-i passwd/make-user boolean false
@@ -724,6 +727,9 @@ EOF
 
 [[ "$DIST" == 'trusty' ]] && GRUBPATCH='1'
 [[ "$DIST" == 'wily' ]] && GRUBPATCH='1'
+[[ "$DIST" == 'xenial' ]] && {
+  sed -i 's/^d-i\ clock-setup\/ntp\ boolean\ true/d-i\ clock-setup\/ntp\ boolean\ false/g' /tmp/boot/preseed.cfg
+}
 
 [[ "$GRUBPATCH" == '1' ]] && {
   sed -i 's/^d-i\ grub-installer\/bootdev\ string\ default//g' /tmp/boot/preseed.cfg
@@ -731,17 +737,14 @@ EOF
 [[ "$GRUBPATCH" == '0' ]] && {
   sed -i 's/debconf-set\ grub-installer\/bootdev.*\"\;//g' /tmp/boot/preseed.cfg
 }
-[[ "$DIST" == 'xenial' ]] && {
-  sed -i 's/^d-i\ clock-setup\/ntp\ boolean\ true/d-i\ clock-setup\/ntp\ boolean\ false/g' /tmp/boot/preseed.cfg
-}
 
-[[ "$linuxdists" == 'debian' ]] && {
+[[ "$linux_relese" == 'debian' ]] && {
   sed -i '/user-setup\/allow-password-weak/d' /tmp/boot/preseed.cfg
   sed -i '/user-setup\/encrypt-home/d' /tmp/boot/preseed.cfg
   sed -i '/pkgsel\/update-policy/d' /tmp/boot/preseed.cfg
   sed -i 's/umount\ \/media.*true\;\ //g' /tmp/boot/preseed.cfg
 }
-[[ "$INCFW" == '1' ]] && [[ "$linuxdists" == 'debian' ]] && [[ -f '/boot/firmware.cpio.gz' ]] && {
+[[ "$linux_relese" == 'debian' ]] && [[ -f '/boot/firmware.cpio.gz' ]] && {
   gzip -d < /boot/firmware.cpio.gz | cpio --extract --verbose --make-directories --no-absolute-filenames >>/dev/null 2>&1
 }
 
@@ -780,12 +783,12 @@ WinRDP(){
   sed -i 's/wget.*\/sbin\/reboot\;\ //g' /tmp/boot/preseed.cfg
 }
 
-elif [[ "$linuxdists" == 'centos' ]]; then
+elif [[ "$linux_relese" == 'centos' ]]; then
 cat >/tmp/boot/ks.cfg<<EOF
 #platform=x86, AMD64, or Intel EM64T
 firewall --enabled --ssh
 install
-url --url="http://$DISTMirror/$DIST/os/$VER/"
+url --url="$LinuxMirror/$DIST/os/$VER/"
 rootpw --iscrypted $myPASSWORD
 auth --useshadow --passalgo=sha512
 firstboot --disable
@@ -833,7 +836,7 @@ rm -rf /tmp/boot;
 [[ "$inVNC" == 'y' ]] && {
   sed -i '$i\\n' $GRUBDIR/$GRUBFILE
   sed -i '$r /tmp/grub.new' $GRUBDIR/$GRUBFILE
-  echo -e "\n\033[33m\033[04mIt will reboot! \nPlease look at VNC! \nSelect\033[0m\033[32m Install OS [$DIST $VER] \033[33m\033[4mto install system.\033[04m\n\n\033[31m\033[04mThere is some information for you.\nDO NOT CLOSE THE WINDOW! \033[0m\n"
+  echo -e "\n\033[33m\033[04mIt will reboot! \nPlease connect VNC! \nSelect\033[0m\033[32m Install OS [$DIST $VER] \033[33m\033[4mto install system.\033[04m\n\n\033[31m\033[04mThere is some information for you.\nDO NOT CLOSE THE WINDOW! \033[0m\n"
   echo -e "\033[35mIPv4\t\tNETMASK\t\tGATEWAY\033[0m"
   echo -e "\033[36m\033[04m$IPv4\033[0m\t\033[36m\033[04m$MASK\033[0m\t\033[36m\033[04m$GATE\033[0m\n\n"
 
@@ -851,5 +854,7 @@ else
   mkdir -p "$HOME/loader"
   cp -rf "/boot/initrd.img" "$HOME/loader/initrd.img"
   cp -rf "/boot/vmlinuz" "$HOME/loader/vmlinuz"
+  [[ -f "/boot/initrd.img" ]] && rm -rf "/boot/initrd.img"
+  [[ -f "/boot/vmlinuz" ]] && rm -rf "/boot/vmlinuz"
   echo && ls -AR1 "$HOME/loader"
 fi

+ 94 - 0
CoreShell/LVM_DISK_Auto_Partition_Tools.sh

@@ -0,0 +1,94 @@
+#!/bin/bash
+echo "------------------------------------------------------------------------------------------------------------------------------------------------------"
+echo -e "\033[33m LVM DISK Auto Partition Tools Version: 1.0.1 (20190622) \033[0m |  Technical support provided by [ https://cxthhhhh.com ] "
+echo "------------------------------------------------------------------------------------------------------------------------------------------------------"
+echo -e "\033[33m 8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 \033[0m"
+echo -e "\033[33m 8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 \033[0m"
+echo -e "\033[33m 88888888888888888888888   8888888    888888    88      8888888     88888888           88888   8888         888    888    888888888888888888888888888 \033[0m"
+echo -e "\033[33m 88888888888888888888888   88888888   888888   888      888888      88888888   88888     888   888    888888888    88   88888888888888888888888888888 \033[0m"
+echo -e "\033[33m 88888888888888888888888   888888888   8888   8888   8   8888   8   88888888   8888888   888   888     88888888    8   888888888888888888888888888888 \033[0m"
+echo -e "\033[33m 88888888888888888888888   888888888    88   88888   88   88   88   88888888   8888888   888   88888       8888       8888888888888888888888888888888 \033[0m"
+echo -e "\033[33m 88888888888888888888888   8888888888   88   88888   888   8  888   88888888   888888    888   888888888     88    8    88888888888888888888888888888 \033[0m"
+echo -e "\033[33m 88888888888888888888888   88888888888      888888   888      888   88888888   88888    8888   8888888888    88    88    8888888888888888888888888888 \033[0m"
+echo -e "\033[33m 88888888888888888888888         888888    8888888   8888    8888   88888888          888888   888          888    8888    88888888888888888888888888 \033[0m"
+echo -e "\033[33m 8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 \033[0m"
+echo -e "\033[33m 8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 \033[0m"
+echo -e "\033[33m 88888888   888888888888888888888888888888888888888888888888       88888888888888888888888888888888888    88888888888   88888888888888888888888888888 \033[0m"
+echo -e "\033[33m 8888888     888888888888888888888   88888888888888888888888          888888888888888888888888   88888   8888   88888   88888888888888888888888888888 \033[0m"
+echo -e "\033[33m 888888   8   88888888888888888888   88888888888888888888888   8888    88888888888888888888888   888888888888   8888888888888888888888888888888888888 \033[0m"
+echo -e "\033[33m 88888   88   88888   88888   88       888          88888888   8888    88        8888       8       88   88        88   8888         8888          88 \033[0m"
+echo -e "\033[33m 8888   8888   8888   88888   8888   8888   88888    8888888          888888888   888    88888   88888   8888   88888   888   88888   888   8888   88 \033[0m"
+echo -e "\033[33m 888            888   88888   8888   8888   88888    8888888   8888888888         888   888888   88888   8888   88888   88    88888   888   8888   88 \033[0m"
+echo -e "\033[33m 888   888888    88    888    8888   8888   88888   88888888   888888888   8888   888   888888    8888   8888   88888   888   88888   888   8888   88 \033[0m"
+echo -e "\033[33m 88    8888888   888          8888     888         888888888   888888888          888   8888888     88   88888     88   8888         8888   8888   88 \033[0m"
+echo -e "\033[33m 8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 \033[0m"
+echo "------------------------------------------------------------------------------------------------------------------------------------------------------"
+echo -e "\033[33m LVM DISK Auto Partition Tools Version: 1.0.1 (20190622) \033[0m |  Technical support provided by [ https://cxthhhhh.com ] "
+echo "------------------------------------------------------------------------------------------------------------------------------------------------------"
+echo "Analyze Disk type (Virtual/Physical)......"
+sleep 5
+if [ -b /dev/vda1 ]; then
+echo "Disk type: Virtual Disk"
+echo "Recognition completed, waiting for disk response."
+echo "Automatic partitioning will take more than 2 minutes to complete."
+sleep 3s
+echo "n
+p
+3
+
+
+t
+3
+8e
+w
+" | fdisk /dev/vda
+sleep 10s
+echo "In the partition (1/5), waiting for the disk response will take more than 30 seconds."
+partprobe
+sleep 20s
+echo "In the partition (2/5), waiting for the disk response will take more than 15 seconds."
+pvcreate /dev/vda3
+sleep 11s
+echo "In the partition (3/5), waiting for the disk response will take more than 15 seconds."
+vgextend centos /dev/vda3
+sleep 11s
+echo "In the partition (4/5), waiting for the disk response will take more than 15 seconds."
+lvextend -l +100%FREE /dev/mapper/centos-root
+sleep 11s
+echo "In the partition (5/5), waiting for the disk response will take more than 10 seconds."
+resize2fs -p /dev/mapper/centos-root
+sleep 6s
+else
+echo "Disk type: Physical Disk"
+echo "Recognition completed, waiting for disk response."
+echo "Automatic partitioning will take more than 2 minutes to complete."
+sleep 3s
+echo "n
+p
+3
+
+
+t
+3
+8e
+w
+" | fdisk /dev/sda
+sleep 10s
+echo "In the partition (1/5), waiting for the disk response will take more than 30 seconds."
+partprobe
+sleep 20s
+echo "In the partition (2/5), waiting for the disk response will take more than 15 seconds."
+pvcreate /dev/sda3
+sleep 11s
+echo "In the partition (3/5), waiting for the disk response will take more than 15 seconds."
+vgextend centos /dev/sda3
+sleep 11s
+echo "In the partition (4/5), waiting for the disk response will take more than 15 seconds."
+lvextend -l +100%FREE /dev/mapper/centos-root
+sleep 11s
+echo "In the partition (5/5), waiting for the disk response will take more than 10 seconds."
+resize2fs -p /dev/mapper/centos-root
+sleep 6s
+fi
+echo "Automatic partition completion, Please restart."
+sleep 3s

+ 24 - 25
Network-Reinstall-System-Modify.sh

@@ -1,20 +1,20 @@
 #!/bin/bash
 
+## License: GPL
 ## This is the magically modified version of the one-click reload script.
 ## It can reinstall CentOS, Debian, Ubuntu and other Linux systems (continuously added) over the network in one click.
 ## It can reinstall Windwos 2003, 7, 2008R2, 2012R2, 2016, 2019 and other Windows systems (continuously added) via the network in one click.
-## Technical support is provided by the technical blog. (based on the original version of Vicer)
+## Support GRUB or GRUB2 for installing a clean minimal system.
+## Technical support is provided by the CXT (CXTHHHHH.com). (based on the original version of Vicer)
 
 ## Magic Modify version author:
-## Support GRUB or GRUB2 for installing a clean minimal system.
 ## Default root password: cxthhhhh.com
-## Blog: https://tech.cxthhhhh.com
-## Written By Technical Blog
+## Blog: https://cxthhhhh.com
+## Written By CXT (CXTHHHHH.com)
 
 ## Original version author:
-## Suitable for using by GRUB.
 ## Blog: https://moeclub.org
-## Written By Vicer
+## Written By Vicer (MoeClub.org)
 
 
 echo -e "\n\n\n"
@@ -26,7 +26,7 @@ echo -e "\033[33m [Magic Modify] Reinstall the system (any Windows / Linux) requ
 echo -e "\033[33m System requirements: Any Linux system with GRUB or GRUB2, recommended CentOS7/Debian9/Ubuntu18.04 \033[0m"
 echo -e "\n"
 echo -e "\033[33m [Original] One-click Network Reinstall System - Magic Modify version (For Linux/Windows) \033[0m"
-echo -e "\033[33m https://tech.cxthhhhh.com/linux/2018/11/27/original-one-click-network-reinstall-system-magic-modify-version-for-linux-windows-en.html \033[0m"
+echo -e "\033[33m https://cxthhhhh.com/linux/2018/11/27/original-one-click-network-reinstall-system-magic-modify-version-for-linux-windows-en.html \033[0m"
 echo "---------------------------------------------------------------------------------------------------------------------"
 echo -e "\n"
 sleep 5s
@@ -37,7 +37,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest CentOS_7 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/CentOS/CentOS_7.X_NetInstallation.vhd.gz'
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/CentOS/CentOS_7.X_NetInstallation.vhd.gz'
 fi
 
 if [ $1 = '-CentOS_6' ]
@@ -45,7 +45,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest CentOS_6 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -c 6.9 -v 64 -a
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -c 6.9 -v 64 -a
 fi
 
 if [ $1 = '-Debian_9' ]
@@ -53,7 +53,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Debian_9 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -d 9 -v 64 -a
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -d 9 -v 64 -a
 fi
 
 if [ $1 = '-Debian_8' ]
@@ -61,7 +61,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Debian_8 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -d 8 -v 64 -a
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -d 8 -v 64 -a
 fi
 
 if [ $1 = '-Debian_7' ]
@@ -69,7 +69,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Debian_7 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -d 7 -v 64 -a
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -d 7 -v 64 -a
 fi
 
 if [ $1 = '-Ubuntu_18.04' ]
@@ -77,7 +77,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Ubuntu_18.04 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -u 18.04 -v 64 -a
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -u 18.04 -v 64 -a
 fi
 
 if [ $1 = '-Ubuntu_16.04' ]
@@ -85,7 +85,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Ubuntu_16.04 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -u 16.04 -v 64 -a
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -u 16.04 -v 64 -a
 fi
 
 if [ $1 = '-Ubuntu_14.04' ]
@@ -93,7 +93,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Ubuntu_14.04 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -u 14.04 -v 64 -a
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -u 14.04 -v 64 -a
 fi
 
 if [ $1 = '-Windows_Server_2019' ]
@@ -101,7 +101,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Windows_Server_2019 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2019_DataCenter_CN.vhd.gz'
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2019_DataCenter_CN.vhd.gz'
 fi
 
 if [ $1 = '-Windows_Server_2016' ]
@@ -109,7 +109,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Windows_Server_2016 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2016_DataCenter_CN.vhd.gz'
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2016_DataCenter_CN.vhd.gz'
 fi
 
 if [ $1 = '-Windows_Server_2012R2' ]
@@ -117,7 +117,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Windows_Server_2012R2 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2012R2_DataCenter_CN.vhd.gz'
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2012R2_DataCenter_CN.vhd.gz'
 fi
 
 if [ $1 = '-Windows_Server_2008R2' ]
@@ -125,7 +125,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Windows_Server_2008R2 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2008R2_DataCenter_CN.vhd.gz'
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2008R2_DataCenter_CN.vhd.gz'
 fi
 
 if [ $1 = '-Windows_7_Vienna' ]
@@ -133,7 +133,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Windows_7_Vienna \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_7_Vienna_Ultimate_CN.vhd.gz'
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_7_Vienna_Ultimate_CN.vhd.gz'
 fi
 
 if [ $1 = '-Windows_Server_2003' ]
@@ -141,7 +141,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest Windows_Server_2003 \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2003_DataCenter_CN.vhd.gz'
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/Windows/Disk_Windows_DD/Disk_Windows_Server_2003_DataCenter_CN.vhd.gz'
 fi
 
 if [ $1 = '-CXT_Bare-metal_System_Deployment_Platform' ]
@@ -149,7 +149,7 @@ then
 	echo -e "\033[33m You have chosen to install the latest CXT_Bare-metal_System_Deployment_Platform \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/CXT-System/CXT_Bare-metal_System_Deployment_Platform.vhd.gz'
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -dd 'https://opendisk.cxthhhhh.com/OperatingSystem/CXT-System/CXT_Bare-metal_System_Deployment_Platform.vhd.gz'
 fi
 
 if [ $1 = '-DD' ]
@@ -157,13 +157,12 @@ then
 	echo -e "\033[33m You have chosen to install the DD package provided by you \033[0m"
 	echo -e "\n"
 	sleep 2s
-	wget --no-check-certificate -qO koiok.sh 'https://tech.cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/koiok.sh' && bash koiok.sh -dd $2
+	wget --no-check-certificate -qO koiok.sh 'https://cxthhhhh.com/tech-tools/Network-Reinstall-System-Modify/CoreShell/Core_Install.sh' && bash koiok.sh -dd $2
 fi
 
 
 echo "---------------------------------------------------------------------------------------------------------------------"
-echo -e "\033[31m !!!!!!!!Error!!!!!!!!Error!!!!!!!!Error!!!!!!!! \033[0m"
-echo -e "\033[31m Please check if the options are correct. For example [-CXT_Bare-metal_System_Deployment_Platform/-CentOS_7/-Windows_Server_2019]/-DD '%URL' \033[0m"
+echo -e "\033[31m Start Installation \033[0m"
 echo "---------------------------------------------------------------------------------------------------------------------"
 echo -e "\n"
 exit