enable or disable win10 update | ||
error_page | ||
imgs | ||
Linux_reinstall | ||
GroupPolicy_import_export_cn.bat | ||
GroupPolicy_import_export_en.bat | ||
lib.sh | ||
README.md |
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
Alpine Linux Edge
bash InstallNET.sh -alpine
Alpine Linux is a kind of light Linux release and it's friendly to those machines that have lower performance, system memory at least 256MB is necessary.
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
Default configurations of SSH or RDP service
Default user name
For Linux: root
For Windows: Administrator
Default password
For Linux: LeitboGi0ro
For Windows: Teddysun.com
Default port
For Linux: The same as the former system which you were connected by terminal.
If you didn't assign any other ssh password or port, after system installation, you must change password(LeitboGi0ro) immediately to prevent unauthorized access!
For Windows: 3389
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:
Optional list of distributions:
- Windows 10 Enterprise LTSC 22H2 for simplified Chinese and Japanese, 23H2 for English
- Windows 11 Pro for Workstation 22H2 for simplified Chinese and Japanese, 23H2 for English
- Windows Server 2012 R2
- Windows Server 2016
- Windows Server 2019
- Windows Server 2022
Note: Windows 10 and 11 23H2 for English preferred to use base images of tiny10 and tiny11 which were developed and optimized by ntdev .
Installing Windows by using "bash InstallNET.sh -windows distribution number" supports IPv4/IPv6 dhcp or static, expanding current OS disk partition from default 15GB dd image to the actual capacity of the drive. Automatic setting steps of above must be executed after Administrator user logged in(for example, you can log into the newly installed system via VNC first if the router of upstream network supports only static configure method so that accessing server via RDP is unable yet).
All Windows dd images were re-packaged with incepted drivers which are necessary for cloud virtualizations and provided by Teddy Sun 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/
-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.
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. This option is applicable for "Overwriting Packaged Image Mode".
For installing Ubuntu in any memory capacties, installing RockyLinux 8+ and AlmaLinux 9+ in low memory mode, installing Windows by using "bash InstallNET.sh -windows", the middle handler is AlpineLinux.
Steps of DD any system that you want to: Servers based on KVM or XEN or QEMU virtualization, the middle handling linux system is Debian 12:
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
-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 the format of the input parameter is incorrect or it's not supported by current operating system, the value will fall back to "Asia/Tokyo". If the parameter is not assigned, the value depends on the geo-location of guest's IP address, if you are using a proxy to connect to the server with ssh service, 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 or capacity of all drives are not the same or in a virtual environment, 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, this option is only for trouble shotting.
--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.
--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.
--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".
--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.
-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
-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/.
-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/"
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"
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" --network "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)
The Unlicense and Legal notice:
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to http://unlicense.org/
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.
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.