Project address, welcome to star, GitHub homepage or private message feedback:
Support for reinstalling any Redhat systems (including Oracle Linux CentOS Almalinux RockyLinux) from mainstream major companies such as Oracle, and reinstalling Debian/Kali, also supports Ubuntu/Debian back to Redhat system, both sides can be installed permanently without any problems! Completely solve the problem of the original version of Mengka's grub boot not working, can only install CentOS 6.9 (my version does not support CentOS 6.9), IPv4 and IPv6 handling, and other details are also very well handled.
Remember to update the source before downloading and install wget, AlpineLinux needs to install bash:
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
Machines in China can now be downloaded from Gitee:
wget --no-check-certificate -qO InstallNET.sh 'https://gitee.com/mb9e8j2/Tools/raw/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
Quick start ( only valid when the script does not include -pwd -port -mirror and other parameters, if added, the corresponding distribution of the system must be specified! ):
No need to enter the architecture to use (-v), the script will automatically detect and convert between Debian and Redhat systems!
Debian 12 (supports 9 to 12)
bash InstallNET.sh -debian
Kali rolling (recommended only for the rolling branch)
bash InstallNET.sh -kali
ARM64 AMD64 machines are all OK, although the Oracle ARM machine of Oracle will black screen after restarting, without any prompts, and cannot be debugged in VNC, as long as it is installed from the clean system template provided by the panel, it is guaranteed to be successful, don't be afraid when you see a black screen in VNC, don't restart the machine in the middle , I don't know what Kali is, but you know that Kali is often used by hackers in daily life, movies and TV shows, and it comes with many security testing tools, it's just a cool Debian distribution. Kali has three versions, arranged in order of increasing aggressiveness: experimental > dev > rolling. For ordinary people who don't like to tinker, it is best to use the rolling version.
Alpine Linux Edge (recommended only for the edge branch)
bash InstallNET.sh -alpine
CentOS 9 stream (supports 7-9)
bash InstallNET.sh -centos
AlmaLinux 9 (supports 8-9)
bash InstallNET.sh -almalinux
RockyLinux 9 (supports 8-9)
bash InstallNET.sh -rockylinux
Fedora 38 (supports 37-38)
bash InstallNET.sh -fedora
Ubuntu 22.04 (supports 20.04 or 22.04)
bash InstallNET.sh -ubuntu
By booting the intermediate AlpineLinux system, dd the Ubuntu official image in the intermediate system to achieve the installation, only supports booting from IPv4 static or dynamic, dual-stack machines can configure IPv6 after entering Ubuntu, pure IPv6 and machines with less than 1GB of memory are not supported.
Thanks to the genius idea of Pancake Brother!
Wang Pancake Forum ID: https://hostloc.com/space-uid-35316.html
Wang Pancake GitHub homepage: https://github.com/bin456789/
Implementation principle and difficulties:
https://hostloc.com/thread-1180157-1-1.html
https://hostloc.com/thread-1180158-1-1.html
https://hostloc.com/thread-1180159-1-1.html
Use netbootxyz for manual reinstallation (only for x86 BIOS)
bash InstallNET.sh -netbootxyz
Specify the source, after entering the system and the corresponding version, add the parameter "-mirror", for example:
bash InstallNET.sh -debian 12 -mirror "http://ftp.riken.jp/Linux/debian/debian/"
Default password:
LeitboGi0ro
Because AlpineLinux and Ubuntu pass the password parameter to the configuration file in plain text, special characters may cause errors during sed processing, so the default password for AlpineLinux and Ubuntu is unified as LeitboGi0ro and cannot be modified temporarily.
If you want to customize the password, you can add -pwd 'password content' to modify it. It is recommended to enclose the password field with single quotation marks (' ') before and after to prevent the shell from treating the password with special characters in double quotation marks (" ") as a command, causing errors. Support all supported systems, do not set it too long or too complex, for example:
-pwd 'xiaoming'
In particular, if the password contains a single quotation mark ('), please be sure to add ''' before the single quotation mark to escape it, that is, the following escaped characters are equivalent to a single quotation mark :
'\''
That is to say, ''' is equivalent to the ' symbol in the actual password, for example, if your password is set to: 'xiaoming', then the following input is correct:
-pwd ''\''xiaoming'\'''
If you are using the default password, please change it immediately after installation!
The default SSH port is the same as the original system, you can add -port port number to modify it, support all supported systems, the range is "1-65535", if the port is given incorrectly or cannot determine the original system port, the fallback value is:
22
For example:
-port "12345"
If you want to force dual-network dynamic configuration, please enter:
bash InstallNET.sh -debian 12 --network "dhcp"
If you want to force dual-network static configuration, please enter:
bash InstallNET.sh -debian 12 --network "static"
If you want to install in pure manual mode, such as for debugging, please enter (VNC access to the machine is required):
bash InstallNET.sh -debian 12 --allbymyself
If you want to use netbootxyz to install the supported systems in pure manual mode, such as Archlinux, please enter (VNC access to the machine is required, only x86_64 AMD64 architecture, for machines with BIOS firmware, use netbootxyz to boot, please refer to this tutorial: https://zhuanlan.zhihu.com/p/97527349):
bash InstallNET.sh -netbootxyz
Now a parameter is enabled, --setipv6 "0 ", which specifies to forcibly disable loading IPv6 when installing the system, specifying 0 means to disable, specifying other values or not specifying the default means to enable. Regardless of whether the machine actually has an IPv6 network, as long as --setipv6 "0" is set, the IPv6 module in the new system will be completely disabled and unable to access the IPv6 network. Please choose according to the actual situation. It is effective for some merchants such as Racknerd and Virmach with pure IPv4 machines, because the DNS resolution of these machine models will forcibly return IPv6 addresses, but the machine does not have an IPv6 network, which causes continuous failures in ping and wget. Forcing the new system to not load the IPv6 module can solve this problem. However, this will cause the module that loads the IPv6 network in Nginx to fail and cause startup failure. Please go to the /etc/nginx/nginx.conf directory to comment out # listen [::]:80 default_server; This option is applicable to Debian/Kali/Ubuntu.
bash InstallNET.sh -debian 12 --setipv6 "0 to disable, 1 to enable"
Now a parameter is enabled: --nomemcheck, enter it to skip the memory capacity check, and you can try to install the target system on any machine with memory, even if you can successfully download and package the network installation startup kernel in the current system, but there is no guarantee that it can be installed successfully after restarting.
bash InstallNET.sh -debian 12 --nomemcheck
Debian mirror list in various countries and regions around the world:
https://www.debian.org/mirror/list.html
Kali mirror list in various countries and regions around the world:
https://http.kali.org/README.mirrorlist
CentOS 7 and 8-stream, mirror list in various countries and regions around the world:
https://www.centos.org/download/mirrors/
CentOS 9-stream and later, mirror list in various countries and regions around the world:
https://admin.fedoraproject.org/mirrormanager/mirrors/CentOS
AlmaLinux mirror list in various countries and regions around the world:
https://mirrors.almalinux.org/
RockyLinux mirror list in various countries and regions around the world:
https://mirrors.rockylinux.org/mirrormanager/mirrors
Fedora mirror list in various countries and regions around the world:
https://admin.fedoraproject.org/mirrormanager/mirrors/Fedora
Known issues:
-
Nginx has poor support for Debian 12, and apt-update will report an error after installation;
-
Debian 12 comes with the Linux 6.1.0.x version kernel. After installing the Xanmod 6.1 LTS kernel, there will be conflicts between the two. Whether you uninstall the system's own 6.1.0.x kernel before restarting and choose to start with the Xanmod 6.1 LTS kernel, or choose to keep the system's own kernel to start, it will restart indefinitely. Please operate with caution!
Uninstall the Debian 12 built-in kernel command:
apt autoremove -y --purge linux-image-6.1.0-7-amd64 linux-image-amd64
-
-
After the installation is completed on Linode machines, you need to change the machine's boot from its built-in grub2 to full disk in the panel to start normally. See my other post: https://hostloc.com/forum.php?mod=viewthread&tid=1166099
Reprinted from: https://hostloc.com/thread-1159839-1-1.html