- Does not include a boot partition (except for Fedora), nor a swap partition, maximizing disk space utilization.
- Does not include a boot partition (except for Fedora), nor a swap partition, maximizing disk space utilization.
- On virtual machines, the appropriate official slimmed-down kernel will be automatically installed.
- On virtual machines, the appropriate official slimmed-down kernel will be automatically installed.
- To install Red Hat, you need to provide the `qcow2` image link obtained from <https://access.redhat.com/downloads/content/rhel>.
- To install Red Hat, you need to provide the `qcow2` image link obtained from <https://access.redhat.com/downloads/content/rhel>.
- Username `root`, password `123@@@`. It may take a few minutes for the password to take effect on the first boot.
- Username `root`, Default password `123@@@`. It may take a few minutes for the password to take effect on the first boot.
- After reinstalling, if you need to change SSH port or switch to key-based login, be sure to modify the files inside `/etc/ssh/sshd_config.d/`.
- After reinstalling, if you need to change SSH port or switch to key-based login, be sure to modify the files inside `/etc/ssh/sshd_config.d/`.
- Optional parameters:
- Optional parameters:
- `--ssh-port PORT` to change the SSH port
- `--password PASSWORD` Set password
- `--hold 2` to prevent entering the system after installation. You can connect via SSH to modify system content, with the system mounted at `/os` (this feature is not supported on Debian/Kali).
- `--ssh-port PORT` Change SSH port
- `--hold 2` Prevent entering the system after installation. You can connect via SSH to modify system content, with the system mounted at `/os` (this feature is not supported on Debian/Kali).
```bash
```bash
bash reinstall.sh centos 9
bash reinstall.sh centos 9
@ -161,21 +162,27 @@ bash reinstall.sh centos 9
<summary>Experimental Features</summary>
<summary>Experimental Features</summary>
The following features are experimental and may not support modifying the SSH port or other options.
Install Debian using a cloud image, suitable for machines with slower CPUs
Install Debian using a cloud image, suitable for machines with slower CPUs
```bash
```bash
bash reinstall.sh debian --ci
bash reinstall.sh debian --ci
```
```
Install CentOS, Alma, Rocky, Fedora using ISO, only supports machines with more than 2G of memory and dynamic IP
Install CentOS, Alma, Rocky, Fedora using ISO, only supports machines with more than 2G of memory and dynamic IP.
Password `123@@@`, SSH Port `22`
Password and SSH port options are not supported.
```bash
```bash
bash reinstall.sh centos --installer
bash reinstall.sh centos --installer
```
```
Install Ubuntu using ISO, only supports machines with more than 1G of memory and dynamic IP
Install Ubuntu using ISO, only supports machines with more than 1G of memory and dynamic IP.
- When deploy a Windows image, the system disk will be expanded, and machines with static IPs will have their IPs configured. However, it may take a few minutes after the first boot for the configuration to take effect.
- When deploy a Windows image, the system disk will be expanded, and machines with static IPs will have their IPs configured. However, it may take a few minutes after the first boot for the configuration to take effect.
- When deploy a Linux image, the script will not modify any contents of the image.
- When deploy a Linux image, the script will not modify any contents of the image.
- Optional parameters:
- Optional parameters:
- `--rdp-port PORT`to change the RDP port (Windows only).
- `--rdp-port PORT`Change RDP port (Windows only).
### Feature 5: Install <imgwidth="16"height="16"src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png"/> Windows ISO
### Feature 5: Install <imgwidth="16"height="16"src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png"/> Windows ISO
- If remote login fails, try using the username `.\administrator`.
- If remote login fails, try using the username `.\administrator`.
- The machine with a static IP will automatically configure the IP. It may take a few minutes to take effect on the first boot.
- The machine with a static IP will automatically configure the IP. It may take a few minutes to take effect on the first boot.
- Optional parameters:
- Optional parameters:
- `--rdp-port PORT` to change the RDP port
- `--password PASSWORD` Set Password
- `--allow-ping` to allow ping responses
- `--rdp-port PORT` Change RDP port
- `--hold 2` to allow SSH connections for modifying the hard disk content before rebooting into the official Windows installation program, with the hard disk mounted at `/os`.
- `--allow-ping` Allow ping responses
- `--hold 2` Allow SSH connections for modifying the hard disk content before rebooting into the official Windows installation program, with the hard disk mounted at `/os`.
### 功能 5: 安装 <imgwidth="16"height="16"src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png"/> Windows ISO
### 功能 5: 安装 <imgwidth="16"height="16"src="https://blogs.windows.com/wp-content/uploads/prod/2022/09/cropped-Windows11IconTransparent512-32x32.png"/> Windows ISO
- 用户名 `administrator` 密码 `123@@@`
- 用户名 `administrator`默认密码 `123@@@`
- 如果远程登录失败,尝试使用用户名 `.\administrator`
- 如果远程登录失败,尝试使用用户名 `.\administrator`
- 静态机器会自动配置好 IP,可能首次开机几分钟后才生效
- 静态机器会自动配置好 IP,可能首次开机几分钟后才生效
- 可选参数
- 可选参数
- `--password PASSWORD` 设置密码
- `--rdp-port PORT` 更改 RDP 端口
- `--rdp-port PORT` 更改 RDP 端口
- `--allow-ping` 允许被 Ping
- `--allow-ping` 允许被 Ping
- `--hold 2` 在重启进入 Windows 官方安装程序前,可连接 SSH 修改硬盘内容,硬盘挂载在 `/os`
- `--hold 2` 在重启进入 Windows 官方安装程序前,可连接 SSH 修改硬盘内容,硬盘挂载在 `/os`