Something about tools
Find a file
2023-10-12 17:27:39 +09:00
enable or disable win10 update Add files via upload 2022-12-09 02:29:38 +09:00
error_page Add redirect to homepage automatically 2018-11-29 15:24:45 +08:00
imgs Add files via upload 2023-10-10 18:37:29 +09:00
Linux_reinstall Update autoRepackRockyLinuxCloudImages.sh 2023-10-12 17:27:39 +09:00
GroupPolicy_import_export_cn.bat Add files via upload 2018-10-22 23:37:36 +08:00
GroupPolicy_import_export_en.bat Add files via upload 2018-10-22 23:37:36 +08:00
lib.sh a shell to install server componets 2019-03-29 20:49:34 +08:00
README.md Update README.md 2023-10-10 15:59:41 +09:00

Tools

Something about scripts

Linux reinstall useage

If you are not a root user, try to execute the following commands to switch to get root user permission:

sudo -s

Switch to the default direction of the root user

cd ~

And then continue to download and execute this script.

Dependences and OSs are supporting at the following list to install to the OS that script supported:

Debian series(Debian / Ubuntu / Kali):

apt update -y
apt install wget -y

RedHat series, only based on RedHat 7+, grub2(CentOS / AlmaLinux / CloudLinux / RockyLinux / OracleLinux / Fedora / VzLinux / ScientificOS / RedHat Enterprise Linux / Tencent OpenCloudOS / AWS AmazonLinux / AlibabaCloudLinux or AliyunLinux / OpenAnolis):

yum install wget -y

or (for Redhat 8+):

dnf install wget -y

Alpine Linux:

apk update
apk add bash wget
sed -i 's/root:\/bin\/ash/root:\/bin\/bash/g' /etc/passwd

Download:

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

Servers in mainland of China:

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

Quickly start

If you need to add other parameters,a certain name of distributions must be assigned!

Debian 12

bash InstallNET.sh -debian

Kali Rolling

bash InstallNET.sh -kali

Kali can be installed and run in OracleCloud Ampere A1 ARM64 machine successfully but there are not any output results in VNC screen, just waiting patiently after installation has been finished!

Alpine Linux Edge

bash InstallNET.sh -alpine

Alpine Linux is a kind of light Linux release and it's friendly to low memory machine, even 384mb and lower can be executed, but the installation process is unfriendly to low memory because all files will write to the memory and them will write to hard drive at last. 768mb machine have no problem, but it can't install on 512mb or lower machine!

CentOS 9 stream

bash InstallNET.sh -centos

AlmaLinux 9

bash InstallNET.sh -almalinux

RockyLinux 9

bash InstallNET.sh -rockylinux

Fedora 38

bash InstallNET.sh -fedora

Ubuntu 22.04

bash InstallNET.sh -ubuntu

Windows 11 Pro for Workstations

bash InstallNET.sh -windows

Fully useage sample

bash InstallNET.sh -debian/kali/ubuntu/centos/almalinux/rockylinux/fedora(os type) 11(os version) -architecture 64(os bit, not necessary) -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)

Parameters detail descriptions

-debian 7-12 : Debian 7 and later

-kali rolling/dev/experimental : Kali Rolling, Development and Experimental, "Kali Rolling" is most recommend obviously.

-centos 7 or 8/9-stream: CentOS 7 and later

-alpine 3.16-3.18/edge: Alpine Linux 3.16 and later, to keep updating to newest version, "edge" is most recommend obviously.

-almalinux/alma 8/9: AlmaLinux 8 and later

-rockylinux/rocky 8/9: RockyLinux 8 and later

-fedora 37/38: Fedora 37 and later

-ubuntu 20.04/22.04: Ubuntu from 20.04 and later

-windows 10/11/2012/2016/2019/2022: Windows 10 Enterprise LTSC, Windows 11 Pro for Workstation 22H2. For English language, Windows 10 and 11 preferred to use base images of tiny10 and tiny11 which were developed by ntdev. Windows Server 2012 R2, Windows Server 2016, Windows Server 2019, Windows Server 2022. Supports IPv4 dhcp and static, expand current OS disk partition. Automatic steps must be executed after user logged in. All images were re-packaged with incepted drivers which are necessary for cloud virtualizations and provided by teddysun and hosting on https://dl.lamp.sh/vhd/ . Thanks and appreciates for his contributions, here are the github and blog pages of him:
https://github.com/teddysun/
https://teddysun.net/
https://teddysun.com/


-mirror "a valid DIST mirror url": OS install files resource, you can select one which nearest for actual location of your server to upspeed installation.

For Debian, official recommend mirror lists are here:

https://www.debian.org/mirror/list.html

For Kali, official recommend mirror lists are here:

https://http.kali.org/README.mirrorlist

For Alpine Linux, official recommend mirror lists are here:

https://mirrors.alpinelinux.org/

For CentOS 7 and 8-stream, official recommend mirror lists are here:

https://www.centos.org/download/mirrors/

For CentOS 9-stream and later, official recommend mirror lists are here:

https://admin.fedoraproject.org/mirrormanager/mirrors/CentOS

For AlmaLinux, official recommend mirror lists are here:

https://mirrors.almalinux.org/

For RockyLinux, official recommend mirror lists are here:

https://mirrors.rockylinux.org/mirrormanager/mirrors

For Fedora, official recommend mirror lists are here:

https://admin.fedoraproject.org/mirrormanager/mirrors/Fedora

For Ubuntu, official recommend mirror lists are here:

https://launchpad.net/ubuntu/+cdmirrors

Recommended terminal client is Xshell or Putty

-port "": you can pre-specify ssh port of system, range is 1~65535, both Redhat series or Debian series could be supported, default is depended on the original system, if getting this value is failed, the value will fall back to '22'.

-pwd/-password '': you can pre-specify ssh password for target installing system. Native installation methods for Redhat series, Debian/Kali could be supported, not suitable for AlpineLinux and those os which will be installed by "Overwriting Packaged Image Mode"(dd) method like Ubuntu, Windows and Redhat installations(only in environments of low memory capacity). A couple of apostrophe includes between the whole password is recommend, if there is one and more apostrophes in the password, you should use " '\ " to replace the original apostrophe to prevent it's could not be expressed and handled correctly in the shell! default is 'LeitboGi0ro'.

-hostname "": you can pre-specify hostname for the newly installing Linux system, the value with empty or includes special symbols except hyphens is not recommend. If the hostname of your original system is "localhost", empty or you want to assign it randomly(-hostname "random"), the expect format of the value is "instance-year, month, day of the server time-hour, minute of the server time. default is depended on the original system.

-dd/--image "DD image from a valid url": This parameter is for DD mode in KVM or XEN virtualization platform, current os must be Debian series, for example, if you want to DD windows, you can refer to chapter "How to install Windows?" to get more in this document. This option is also applicable for installing those distributions which under in "Overwriting Packaged Image Mode" like Ubuntu, RockyLinux 8+ and AlmaLinux 9+ in low memory mode.

-filetype "gz/xz": To determine DD file type, not only ".gz"(default) but also ".xz" can be supported.

-timezone "like Asia/Tokyo etc": It means assign timezone manually, if you are using a proxy to connect to your machine and then execute "InstallNET.sh", automatic timezone configuration may not suitable for you in this situation.

-raid "0, 1, 5, 6 or 10": Test succeed on Debian 12, Kali rolling, CentOS 9-stream, AlmaLinux 9, RockyLinux 9, Fedora 38 with raid 0, 1, 5, 6 or 10 disks raid partition recipes, raid 0 or 1 needs at least 2 disks, raid 5 needs at least 3 disks, raid 6 or 10 needs at least 4 disks, if your machine has only one hard drive, don't assign it!

-setdisk "a name of one disk or all": If your machine has 2 or more hard drives, and every hard drive want to format during the installation, you can assign -setdisk "all" to enable it, data is invaluable, you should deal with them carefully! or you can allow system to be installed on one disk like "vdc" or "/dev/sdb", This parameter is only suitable for Debian/Redhat series and conflicts with "-raid".

-partition "mbr" or "gpt": Default is "mbr", ext4 file system with mbr partition table, if assign "gpt", the partition method will be as xfs file system with gpt partition table. This is only valid for Debian series, single hard drive formatting environment, not suitable for Raid.

--nomemcheck: Disable memory check by force so that you can install any OS on any size of the memory in target machine, whether installation will succeed is not guaranteed.

-cloudkernel: Replace formal Linux kernel to cloud kernel because numerous hardware drivers like printers, scanners, sound cards, usb controllers etc. which are not necessary in environment of virtual machines of Cloud Computing Platforms and these will be eliminated in the latter aims to help reducing space occupation of memory and hard drive. In situation of raid or dd(Windows) mode, installing cloud kernel will be disabled. -cloudkernel "0" is to disable installing Linux cloud kernel by force, -cloudkernel "1" is to enable installing cloud kernel by force. This option is only valid for installing to Debian 11+/Kali/AlpineLinux. Cloud kernel executing on some hardwares like Oracle Cloud arm64 servers will cause guest display in VNC be disabled, to avoid this, you may assign -cloudkernel "0" to switch to installing traditional Linux kernel by force. For virtualization of VMware and VirtualBox, installing cloud kernel will cause booting failed.

--network "dhcp/auto" or "static/manual": Default to use DHCP to finish network configuration. If your cloud provider is a small or middle merchant, the network of your machine may be static so you need to add it. it is equal with add --ip-addr "" --ip-mask "" --ip-gate "", if you add this, don't distribute the following three items again! It must be added in the last of the command.

--networkstack "ipv4", "ipv6" or "dual": To specify one supported IP stack manually by reading related configurations instead of checking connectivity of IP stacks, "ipv4" is for IPv4 stack, "ipv6" is for IPv6 stack, "dual" is for IPv4 and IPv6 bi-stack. To make sure the parameter of corresponded stack must has specify configurations in system before assign it.

--ip-addr "IPv4 address": It must be added with --ip-gate and --ip-mask together, in this situation, --network "static/manual" is automatically assigned.

--ip-gate "IPv4 gateway": It must be added with --ip-addr and --ip-mask together, in this situation, --network "static/manual" is automatically assigned.

--ip-mask "IPv4 subnet musk": It must be added with --ip-addr and --ip-gate together, in this situation, --network "static/manual" is automatically assigned, can only accept prefix number transmit. IPv4 CIDR Calculator: https://www.vultr.com/resources/subnet-calculator/

--ip-dns "IPv4 DNS server": This one is only for static network configuration and default is 1.0.0.1 and 8.8.4.4, you can also change other IPv4 dns server like 8.8.8.8, 9.9.9.9, 4.4.2.2 etc to replace it. If the network of your machine is DHCP, don't assign it!

--ip6-addr "IPv6 address": It must be added with --ip6-gate and --ip6-mask together, in this situation, --network "static/manual" is automatically assigned.

--ip6-gate "IPv6 gateway": It must be added with --ip6-addr and --ip6-mask together, in this situation, --network "static/manual" is automatically assigned.

--ip6-mask "IPv6 subnet musk": It must be added with --ip6-addr and --ip6-gate together, in this situation, --network "static/manual" is automatically assigned, can only accept prefix number transmit. IPv6 CIDR Calculator: https://en.rakko.tools/tools/27/

--ip6-dns "IPv6 DNS server": This one is only for static network configuration and default is 2606:4700:4700::1001 and 2001:4860:4860::8844, you can also change other IPv6 dns server to replace it. If the network of your machine is DHCP, don't assign it!

--setipv6 "0 is disabled": Default will enable IPv6, if your machine is IPv4 stack and provided by Racknerd and Virmach etc. they will give IPv6 DNS for IPv4 stack server, the server will access to invalid IPv6 network for priority, not IPv4 first, you can remove all IPv6 modules force in new os by adding --setipv6 "0" to avoid the situation of above.

--adapter "real network adapter interface name of the machine, like ens3, enp6s0 etc.": If the kernel is added parameter "net.ifnames=0" or "biosdevname=0", all different network adapters' name will be directed to the same like "eth0", "eth1" etc. If you know the the real name of the network adapter and want let them to replace "eth0", please input the correct value, if you are not sure the real name of it, don't assign it!

--netdevice-unite: This function has an opposite effect of --adapter "real interface name", it will add "net.ifnames=0 biosdevname=0" to the kernel to redirect all different network adapters' interface name to united "eth0", this one don't need to assign any value, I suggest you that before input it and start OS installation, you should backup the real name of the network adapter carefully!

--autoplugadapter: Only valid for Debian/Kali, the connection method of network adapter will be replaced from "allow-hotplug" to "auto" in /etc/network/interfaces. --autoplugadapter "0" is disabled by force, --autoplugadapter "1" is enabled, it's enabled by default. When add this, for multiple interfaces environment, if the interface which is configurated by "auto", regardless of it is plugged by internet cable, Debian/Kali will continuously try to wake and start up it contains with dhcp even timeout. Set up with "allow-hotplug(default setting by Debian/Kali installer)" will skip this problem, but if one interface has more than 1 IP or it will connect to another network bridge, when system restarted, the interfaces' initialization will be failed, in most of VPS environments, the interfaces of machine should be stable, so replace the default from "allow-hotplug" to "auto" for interfaces config method is a better idea, but it causes some server spending a long time to boot up(try to activate all internet adapters and waiting dhcp fatal time). Because the default configure method "allow-hotplug" will cause network adapter disconnected to the host permanently unless rebooting the system when executing "systemctl restart networking" so in order to avoid this situation, all configure method of valid network adapters will use "auto" instead of "allow-hotplug".

--motd: Enable to insert a set of modified MOTD(message of the day) scripts for a convenience to check executing status of a server when connecting by ssh shell, default is disabled, only available for Debian/Kali/AlpineLinux.

--fail2ban: Install and configure fail2ban to prevent from suspicious ssh port blastings. To reduce occupation of the memory, those servers which memory are less than 2GB will disabled automatically. --fail2ban "0" is disabled by force, --fail2ban "1" is enabled by force.

-netbootxyz: Use netbootXYZ(https://netboot.xyz/) to install netbootXYZ supported OS manually, must have VNC, only for x86_64 and AMD64 with BIOS firmware(UEFI is not supported!)

-allbymyself: Install OS supported by this script manually, must have VNC, this option is not valid for Redhat series.

-firmware: Specify drivers for Debian and Kali to support old hardwares, if your server location is in mainland China, program will switch to mirror of 'University of Science and Technology of China(https://mirrors.ustc.edu.cn/debian-cdimage/)' for downloading more quickly, default mirror is from http://cdimage.debian.org/cdimage/.

-lang/-language "cn, en or jp": This option is to set language of dd images of Windows like: -windows 10 -lang "en", cn is simplified Chinese, en is English, jp is Japanese, default is en. It's not valid for Linux distributions.

-architecture "32/i386 or 64/amd64 or arm/arm64": OS bit. Program will automatically detect and redirect the CPU architecture from your machine to new system which would be installed, if you aren't known it well, don't assign it!

Advanced usage, for example Debian 12 (recommend for servers which are locating outside of mainland China)

Japan:

bash InstallNET.sh -debian 12 -mirror "http://ftp.riken.jp/Linux/debian/debian/"

HongKong:

bash InstallNET.sh -debian 12 -mirror "http://ftp.hk.debian.org/debian/"

Singapore:

bash InstallNET.sh -debian 12 -mirror "http://ftp.sg.debian.org/debian/"

South Korea:

bash InstallNET.sh -debian 12 -mirror "http://ftp.kaist.ac.kr/debian/"

Taiwan:

bash InstallNET.sh -debian 12 -mirror "http://ftp.tw.debian.org/debian/"

America:

bash InstallNET.sh -debian 12 -mirror "https://mirrors.ocf.berkeley.edu/debian/"

Canada:

bash InstallNET.sh -debian 12 -mirror "http://ftp.ca.debian.org/debian/"

Britain:

bash InstallNET.sh -debian 12 -mirror "http://ftp.uk.debian.org/debian/"

Germany:

bash InstallNET.sh -debian 12 -mirror "http://ftp.de.debian.org/debian/"

France:

bash InstallNET.sh -debian 12 -mirror "http://ftp.fr.debian.org/debian/"

Netherlands:

bash InstallNET.sh -debian 12 -mirror "http://ftp.nl.debian.org/debian/"

Switzerland:

bash InstallNET.sh -debian 12 -mirror "http://ftp.ch.debian.org/debian/"

Russia:

bash InstallNET.sh -debian 12 -mirror "http://ftp.ru.debian.org/debian/"

Australia:

bash InstallNET.sh -debian 12 -mirror "http://ftp.au.debian.org/debian/"

Default configurations

Time zone

Depends on the geo-location of guest's IP(automode) or "Asia/Tokyo"(if the format of the input parameter is incorrect or it's not supported by current operating system in manual mode)

Default user name

root

Default password

LeitboGi0ro

Default port

The same as the former system which you were connected by terminal, if script can't find any port on the former system, the default is 22.

If you didn't assign any other ssh password or port, after system installation, you must change password(LeitboGi0ro) and ssh port(22) immediately to prevent unauthorized access!

Errors and solutions:

In some versions of CentOS 8 which are not subsumed into CentOS-stream are end of supporting by CentOS official, so the source is failure:

Failed to synchronize cache for repo 'baseos', ignoring this repo.
Failed to synchronize cache for repo 'appstream', ignoring this repo.

You first need to fix the source available and then execute this script.

cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

If script notices any error like in "# Check Dependence", please execute it again!

If you have enabled and assigned IPv6 address after server had been created in the website panel of some cloud providers like Oracle etc. but IPv6 is still invalid in the original system, you can try "dhclient" command to enable IPv6, the same as IPv4:

dhclient -6 "network adapter name"
dhclient -4 "network adapter name"

How to install Windows?

Notice: Microsoft products and services—including images, text, and software downloads (the "content")—are owned either by Microsoft Corporation or by third parties who have granted Microsoft permission to use the content. Microsoft cannot grant you permission for content that is owned by third parties. You may only copy, modify, distribute, display, license, or sell the content if you are granted explicit permission within the End-User License Agreement (EULA) or license terms that accompany the content or are provided in the following guidelines. For more information, consult your copyright attorney.

"InstallNET.sh" doesn't provide any third-part activation service for Windows, this function is only aim to assist you with researching, evaluating related features of Windows. "InstallNET.sh" is not responsible or liable if someone cause any illegal circumstance or lose their data by inappropriate using without any backups. "InstallNET.sh" only supports your server to install from Linux to Windows but it can't work well in Windows so that you have no more chance to use "InstallNET.sh" to install from Windows to Linux again.

Servers based on KVM or XEN or QEMU virtualization, the middle handling linux system is Debian 12(bookworm):

bash InstallNET.sh -dd 'DD image download URL'

Servers based on physical hardware, Intel network adapter, kimsufi etc:

Change netboot to rescue mode, receive mail, get temporary username and password, login rescue linux, execute:

wget -O- 'DD download URL' | xzcat | dd of=/dev/sda

Wait until downloading and unpackaging are all finished, change netboot to formal mode, restart rescue linux:

reboot

Initial connection configurations, hardware requirements and available Windows series DD image download URLs which are provided by TeddySun:

Username: Administrator
Password: Teddysun.com
RDC(Remote Desktop Connection) port: 5900
Network: IPv4 DHCP is necessary
CPU: AMD64 architecture, single core at least, dual core or more is recommend.
Hard Drive: 20GB at least, 50GB or more, SSD is recommend.
Memory: 2GB at least, 8GB or more is recommend.

For BIOS firmware and MBR partition table
  • Windows 11 Pro for Workstations 22H2

Chinese: https://dl.lamp.sh/vhd/zh-cn_windows11_22h2.xz
English: https://dl.lamp.sh/vhd/en-us_windows11_22h2.xz
Japanese: https://dl.lamp.sh/vhd/ja-jp_windows11_22h2.xz

  • Windows Server 2022 Datacenter

Chinese: https://dl.lamp.sh/vhd/zh-cn_win2022.xz
English: https://dl.lamp.sh/vhd/en-us_win2022.xz
Japanese: https://dl.lamp.sh/vhd/ja-jp_win2022.xz

  • Windows 10 Enterprise LTSC

Chinese: https://dl.lamp.sh/vhd/zh-cn_windows10_ltsc.xz
English: https://dl.lamp.sh/vhd/en-us_windows10_ltsc.xz
Japanese: https://dl.lamp.sh/vhd/ja-jp_windows10_ltsc.xz

  • Windows Server 2012 R2 Datacenter

Chinese: https://dl.lamp.sh/vhd/cn_win2012r2.xz
English: https://dl.lamp.sh/vhd/en_win2012r2.xz
Japanese: https://dl.lamp.sh/vhd/ja_win2012r2.xz

For UEFI firmware and GPT partition table
  • Windows 11 Pro for Workstations 22H2

Chinese: https://dl.lamp.sh/vhd/zh-cn_windows11_22h2_uefi.xz
English: https://dl.lamp.sh/vhd/en-us_windows11_22h2_uefi.xz
Japanese: https://dl.lamp.sh/vhd/ja-jp_windows11_22h2_uefi.xz

  • Windows Server 2022 Datacenter

Chinese: https://dl.lamp.sh/vhd/zh-cn_win2022_uefi.xz
English: https://dl.lamp.sh/vhd/en-us_win2022_uefi.xz
Japanese: https://dl.lamp.sh/vhd/ja-jp_win2022_uefi.xz

  • Windows 10 Enterprise LTSC

Chinese: https://dl.lamp.sh/vhd/zh-cn_win10_ltsc_uefi.xz
English: https://dl.lamp.sh/vhd/en-us_win10_ltsc_uefi.xz
Japanese: https://dl.lamp.sh/vhd/ja-jp_win10_ltsc_uefi.xz

  • Windows Server 2012 R2 Datacenter

Chinese: https://dl.lamp.sh/vhd/cn_win2012r2_uefi.xz
English: https://dl.lamp.sh/vhd/en_win2012r2_uefi.xz
Japanese: https://dl.lamp.sh/vhd/ja_win2012r2_uefi.xz

Features and updates:

  • "InstallNET.sh" will give you a clean, safe, official Linux system, and help you escape of your server providers' monitoring.
  • The operation is easy, several minutes installation will be complated.
  • Support install to Debian series(including Debian 8+, Ubuntu 14.04 ~ 20.04), Redhat series(including CentOS 7+, AlmaLinux 8+, RockyLinux 8+, Fedora 34+).
  • Can also run in mainline version of other Redhat series(Oracle Linux 7+, VzLinux 8+) to install supported system.
  • Support major cloud providers, especially support Oracle Cloud ARM machine.
  • Detect the CPU architecture of current os and exchange correct architecture to new system automatically, you need not to add parameter '-version' at all to comfirm architecture manually.
  • Can handle boot menuentry items automatically of grub2 in different hardware platforms(AMD64 legacy / AMD64 UEFI / ARM64 UEFI) to make sure all supported boot file can be loaded correctly.
  • Support install from Linux(Debian series only) to Windows. details refer to "How to install Windows?" section.
  • Support IPv6 single-stack(have only IPv6 public address and IPv4 intranet routing) server like Vultr 2.5$ monthly plan, only for DHCP.
  • Support network auto configurations in bio-stack(have both IPv4 and IPv6 public address), after log into new system, you don't have to config IPv6 address manually, only for Debian, DHCP.
  • You can modify architecture, mirror, firmware, ssh port, password etc.
  • Friendly to low memory device, for Debian series, recommend RAM is above 512MB, for Redhat series, recommend RAM is above 2GB.
  • Ubuntu 22.04 has cancelled net boot start features, so this program don't support Ubuntu 22.04 and above reinstallation, source: http://archive.ubuntu.com/ubuntu/dists/jammy/main/installer-amd64/current/legacy-images/: The Legacy Ubuntu Server Installer is no longer available, initrd.gz and linux netboot file for arm64 architecture as also.
  • The Debian official mirror of South Korea http://ftp.kr.debian.org/debian/ is usually crashed down, so I changed recommend mirror as Jaist University https://www.jaist.ac.jp/index.html, for Japan is from https://www.riken.jp/, a science research organization, for America is from University of California, Berkeley: https://www.berkeley.edu/.
  • Completely modified Debian, such as support terminal files colorful displaying, permanently change dns server, disable expired certificates, add on a cute welcome introduction, pre-install many complements in preseeding progress, now enjoy a newly, comfortable, graceful debian experience!
  • Support grub2 boot file modify, it can switch Debian series to Redhat series or switch Redhat series to Debian series smoothly, in old version if you installed from Debian series to Redhat series, you can never switch to Debian series again.
  • Support xfs file system(only for Debian 9 and later), it's better than the old ext2 and it's the default option of Redhat series, the file system of raid 0 disk partition mode is ext4.
  • Detect if the machine is operating in mainland of China or outside and switch mirror automatically.
  • Support the parameter of '-port' to modify ssh port of Redhat series.
  • Detect the network of device is DHCP or static automatically.
  • For windows DD package, default compression method is "gz", if your package is ".xz", you can add parameter -filetype "xz" to decompress it.
  • Support Raid 0, to add parameter -raid "0", the validation need to be certificated.
  • Disable ntp clock setup for static network in Debian/Ubuntu installation otherwise it may cause static network failed.
  • Fix if input --ip-addr "" --ip-mask "" --ip-gate "", static network configuration may not valid.
  • Support config timezone automatically according to the geo-location of the guest's IP or determine an existed timezone parameter to config it manually is also be supported.
  • Concentrate all needed installation of dependences to inner command except "wget" because you need to download "InstallNET.sh" first.
  • Change name server for Debian permanently is provided by "resolvconf", related configuration files has been written. you just need to logging in new installed system, and install "resolvconf":
echo "O" | apt install resolvconf -y

to make changes validating!

  • Support Debian 12.
  • Update pre-install components, python2 to python3, vim-gtk2 to vim-gtk3 for support Debian 12.
  • Creat a new algorithm for checking effectiveness about IPv6, it's applied in 10-sysinfo for motd file in Debian and the main program "InstallNET.sh".
  • Because of boot menuentry configuration in grub file "grub.cfg" from RockyLinux 9 of official template of Oracle Cloud is different from other standard Redhat like os(version 7+) compeletely, so I creat a new algorithm for handle this and all of similar situation in future.
  • Update vim file modification for Debian 12.
  • Because of github.com and githubusercontent.com etc are banned by China, so I switich external files download sources which are necessary for Debian or Redhat like os example files for motd, firewall configurations etc. If your server is in mainland of China, the external files will be downloaded from https://gitee.com/mb9e8j2/Tools/, the other country/area will also be downloaded in this depository.
  • Try to enable IPv4 and IPv6 dhcp if possible.
  • Add necessary annotates
  • Set default installation os as Debian 12 and the value of architecture is empty instead of AMD64 because program will check architecture automatically.

Defects:

  • Not support for Ubuntu 22.04(jammy) and further versions because Canonical has deprecated the traditions which were also applied together with Debian by forcing users to download a huge several gigabytes iso image and then load it in its' fuckin Cloud-init instead of just two simply a hundred megabytes total network boot files by PXE boot, it runs in QEMU environment and CPU hardware virtualization must be demanded but most of VPS can't handle it well at all. Canonical has developed into a mature commercial company which intends to earn more money from major partners so they discrimes their personal users intentionally who are low-end clients in their conceptions certainly despite these users were their devoted fans since always and helped Canonical to make great achieves today step by step. According to the behavior of discarding a large amount of former precious Debian installer preseed heritances, Canonical would play a role as a guilty dictator like Apple.Inc in more areas and then violate the spirit of the universal free software finally.
  • For Redhat series 8, the minimum memory requirement is 2.5GB, for Redhat series 9, the minimum memory requirement is 2GB.
  • Because the syntax of grub1 in Redhat series 6 is different from other Linux version of grub1 or grub2 completely, so I removed support to CentOS 6 and Oracle Linux 6.
  • All system templates of GCP are not supported.

.bashrc

.bashrc is a script file system which contains a series of configurations for the terminal session. when the user logs in. The file itself includes highlight settingup for different files. how to use?

Delete default .bashrc

rm -rf ~/.bashrc

Download .bashrc and reboot your system

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


reboot

GroupPolicy import and export

This ".bat" script can only run in Windows. Although only one group-policy rule in Windows can be exported at a time and not support a global one and also have no GUI entrance to import another backuped group policy which exported from another computer. It can help you import or export GroupPolicy conveniently.

Attentions

  • Compatible with all versions of Windows.
  • Only support the group-policy rules which exported by this script.
  • If you want to export group-policy rules. Folder which included group-policy files corresponds to current OS version strictly. Not support export rules which is different from current OS version.
  • Export operation is irreversible, be cautious to run it
  • I provided a suggested rules file about Windows Server 2016.
  • You should run it on desktop.